# Implementing a depolarizing channel for 2 qubits on IBM Q

I am trying to use IBM Q to perform the following depolarizing channel on a state of 2 qubits $$\rho=|\psi \rangle \langle \psi |$$:

$$\rho \to (1-\lambda)\rho + \frac{\lambda}{4}I$$

This is within the limitations of the IBM Q. Namely 5 channels.

How can I come up with a combination of gates that will give this result?

A specific case I want to try would be

$$|\psi\rangle = \cos \theta |00\rangle + \sin \theta |11\rangle$$

• See also : [quantumcomputing.stackexchange.com/a/4369/124] – Niel de Beaudrap Apr 29 at 9:00
• I did, but I am still confused. That's why I posted this question. – The Bosco Apr 29 at 10:48
• What did you find confusing? With IBM Q, you have just enough qubits to do this sort of thing, though at the very least you may need to re-prepare some of the qubits involved. – Niel de Beaudrap Apr 29 at 10:51
• For example, I can do it with 5 cables if I use the cables $1$ and $2$ for the input state, cables $3$ and $4$ to prepare a completely mixed $I/4$ state (unsure how to do that too) and the last cable ($5$) for the $(1-\lambda)|0\rangle + \lambda|1\rangle$ state and then use two $\mathrm{CSWAP}$ gates to switch the $1 \leftrightarrow 3$ and $2 \leftrightarrow 4$ cables controlled by cable $5$. – The Bosco Apr 29 at 11:02
• My apologies, I didn't read your question carefully: I was thinking of independent applications of the one-qubit depolarising channel on a two-qubit state, but this is clearly not what you are asking about. You certainly can use an approach such as the one you describe, so you have almost completely answered your own question --- you just need to describe how to perform the CSWAP, which you can do if you consider how a SWAP operation can be decomposed and then consider how to make that coherently controllable. The main problem I can see for the IBM Q is that it will require quite a few gates. – Niel de Beaudrap Apr 29 at 12:37