4

The Qunatum Depolarizing Channel is parametrized by a single real variable $\lambda, 0 \leq \lambda \leq 1$.

I have a system of $n$ qubits. I'd like to generate random errors from that channel. These would be strings of length $n$ with entries from $(0,1,2,3)$ with the right distribution. $(0,1,2,3)$ correspond to $(I,X,Z,Y)$ errors; $I$ error actually means no error applied to that qubit; the others mean $X,Z$ or $Y$ operators applied. For example $n=7$, error $e=(0,1,0,0,3,0,2)$ means $X$ is applied to qubit 2, $Y$ to qubit 5, $Z$ to qubit 7.

Does anyone know of a tried and tested method for doing that. Python or any other language (or even pseudo-code) are fine.

glS
  • 27,670
  • 7
  • 39
  • 126
unknown
  • 2,623
  • 1
  • 9
  • 22

1 Answers1

3

I will assume you want a symmetric depolarizing channel that acts globally on an $n$-qubit system and applies one of $4^n-1$ nontrivial Paulis with equal probability. Note that we can generalize and slightly modify the Kraus representation given in the Wikipedia link to:

\begin{equation}\label{eq:depol_kraus} \Delta_\lambda(\rho) = \sum_{j \in \{0,1, 2, 3\}^n} p_j K_j \rho K_j \end{equation}

where $p_0 = 1 - (1 - 4 ^{-n})\lambda$ and $p_j = 4^{-n} \lambda$ for $j\neq 0^n$ otherwise, and each $K_j = \sigma_{j_1} \otimes \dots \otimes \sigma_{j_n}$ is a Paulistring. So one strategy to do this might be

  1. Sample $j \in \{0, 1, 2, 3\}^n$ according to the distribution $p$ (or just sample integer $x \in \{0, 1, \dots, 4^n - 1\}$ and then convert it to base 4).

  2. For $i=1, \dots, n$ apply $\sigma_{j_i}$ to qubit $i$

If you are trying to apply this in a circuit model you could maybe make step 2 more efficient by inserting parameterized gates $X^{b_{i0}} Z^{b_{i1}}$ after each qubit $i$ wherever you want to place this channel in some fixed circuit. Then you can draw however many events $j$ as you need and then simulate the circuit by inserting the parameters $b_{i0} b_{i1} = \text{bin}(j)$. I know that Cirq supports this kind of parameterization for example.

If you just want single-qubit depolarizing channels then the above procedure can be done independently for each local system.

forky40
  • 8,168
  • 2
  • 13
  • 33