qat.quops.make_depolarizing_channel
- qat.quops.make_depolarizing_channel(prob: float, nqbits: int = 1, method_2q='tensor_1q_channels', depol_type='pauli') QuantumChannelKraus
Construct depolarizing channel.
For one qubit, it is defined by the following Kraus operators:
\[ \begin{align}\begin{aligned}K_0 = \sqrt{1-p} I\\K_1 = \sqrt{p/3} \sigma_x\\K_2 = \sqrt{p/3} \sigma_y\\K_3 = \sqrt{p/3} \sigma_z\end{aligned}\end{align} \]For two qubits, if method_2q == ‘tensor_1q_channels’ (default), the Kraus operators are
\[\lbrace K_i \otimes K_j \rbrace_{i,j=0\dots 3}.\]if method_2q == ‘equal_probs’, then the Kraus operators are the products of Pauli matrices, with coefficient \(\sqrt{1 - p}\) for the identity and \(\sqrt{p/15}\) for the other operators.
depol_type distinguishes between the two usual definitions of the depolarizing channel: with ‘randomizing’ denoting
\[\mathcal{E}(\rho) = (1-p) \rho + p I / d,\]and ‘pauli’ denoting
\[\mathcal{E}(\rho) = (1-p) \rho + \frac{p}{d^2 -1} \sum_i P_i \rho P_i.\]- Parameters
prob (float) – depolarizing probability
nqbits (int, optional) – number of qbits. Defaults to 1.
method_2q (string, optional) – method to construct the 2-qubit depolarizing channel. Default to ‘tensor_1q_channels’.
depol_type (str, optional) – type of depolarizing channel, among ‘pauli’ and ‘randomizing’. Defaults to ‘pauli’.
- Returns
the channel
- Return type
Example:
from qat.quops import make_depolarizing_channel depol = make_depolarizing_channel(prob=0.1, nqbits=2) print(depol)
Depolarizing channel, p = 0.1: [[0.9 0. 0. 0. ] [0. 0.9 0. 0. ] [0. 0. 0.9 0. ] [0. 0. 0. 0.9]] [[0. +0.j 0.17320508+0.j 0. +0.j 0. +0.j] [0.17320508+0.j 0. +0.j 0. +0.j 0. +0.j] [0. +0.j 0. +0.j 0. +0.j 0.17320508+0.j] [0. +0.j 0. +0.j 0.17320508+0.j 0. +0.j]] [[0.+0.j 0.-0.17320508j 0.+0.j 0.+0.j ] [0.+0.17320508j 0.+0.j 0.+0.j 0.+0.j ] [0.+0.j 0.+0.j 0.+0.j 0.-0.17320508j] [0.+0.j 0.+0.j 0.+0.17320508j 0.+0.j ]] [[ 0.17320508+0.j 0. +0.j 0. +0.j 0. +0.j] [ 0. +0.j -0.17320508+0.j 0. +0.j -0. +0.j] [ 0. +0.j 0. +0.j 0.17320508+0.j 0. +0.j] [ 0. +0.j -0. +0.j 0. +0.j -0.17320508+0.j]] [[0. +0.j 0. +0.j 0.17320508+0.j 0. +0.j] [0. +0.j 0. +0.j 0. +0.j 0.17320508+0.j] [0.17320508+0.j 0. +0.j 0. +0.j 0. +0.j] [0. +0.j 0.17320508+0.j 0. +0.j 0. +0.j]] [[0. +0.j 0. +0.j 0. +0.j 0.03333333+0.j] [0. +0.j 0. +0.j 0.03333333+0.j 0. +0.j] [0. +0.j 0.03333333+0.j 0. +0.j 0. +0.j] [0.03333333+0.j 0. +0.j 0. +0.j 0. +0.j]] [[0.+0.j 0.+0.j 0.+0.j 0.-0.03333333j] [0.+0.j 0.+0.j 0.+0.03333333j 0.+0.j ] [0.+0.j 0.-0.03333333j 0.+0.j 0.+0.j ] [0.+0.03333333j 0.+0.j 0.+0.j 0.+0.j ]] [[ 0. +0.j 0. +0.j 0.03333333+0.j 0. +0.j] [ 0. +0.j -0. +0.j 0. +0.j -0.03333333+0.j] [ 0.03333333+0.j 0. +0.j 0. +0.j 0. +0.j] [ 0. +0.j -0.03333333+0.j 0. +0.j -0. +0.j]] [[0.+0.j 0.+0.j 0.-0.17320508j 0.+0.j ] [0.+0.j 0.+0.j 0.+0.j 0.-0.17320508j] [0.+0.17320508j 0.+0.j 0.+0.j 0.+0.j ] [0.+0.j 0.+0.17320508j 0.+0.j 0.+0.j ]] [[0.+0.j 0.+0.j 0.+0.j 0.-0.03333333j] [0.+0.j 0.+0.j 0.-0.03333333j 0.+0.j ] [0.+0.j 0.+0.03333333j 0.+0.j 0.+0.j ] [0.+0.03333333j 0.+0.j 0.+0.j 0.+0.j ]] [[ 0. +0.j 0. +0.j 0. +0.j -0.03333333-0.j] [ 0. +0.j 0. +0.j 0.03333333+0.j 0. +0.j] [ 0. +0.j 0.03333333+0.j 0. +0.j 0. +0.j] [-0.03333333+0.j 0. +0.j 0. +0.j 0. +0.j]] [[ 0.+0.j 0.+0.j 0.-0.03333333j 0.+0.j ] [ 0.+0.j -0.+0.j 0.+0.j 0.+0.03333333j] [ 0.+0.03333333j 0.+0.j 0.+0.j 0.+0.j ] [ 0.+0.j -0.-0.03333333j 0.+0.j -0.+0.j ]] [[ 0.17320508+0.j 0. +0.j 0. +0.j 0. +0.j] [ 0. +0.j 0.17320508+0.j 0. +0.j 0. +0.j] [ 0. +0.j 0. +0.j -0.17320508+0.j -0. +0.j] [ 0. +0.j 0. +0.j -0. +0.j -0.17320508+0.j]] [[ 0. +0.j 0.03333333+0.j 0. +0.j 0. +0.j] [ 0.03333333+0.j 0. +0.j 0. +0.j 0. +0.j] [ 0. +0.j 0. +0.j -0. +0.j -0.03333333+0.j] [ 0. +0.j 0. +0.j -0.03333333+0.j -0. +0.j]] [[ 0.+0.j 0.-0.03333333j 0.+0.j 0.+0.j ] [ 0.+0.03333333j 0.+0.j 0.+0.j 0.+0.j ] [ 0.+0.j 0.+0.j -0.+0.j 0.+0.03333333j] [ 0.+0.j 0.+0.j -0.-0.03333333j -0.+0.j ]] [[ 0.03333333+0.j 0. +0.j 0. +0.j 0. +0.j] [ 0. +0.j -0.03333333+0.j 0. +0.j -0. +0.j] [ 0. +0.j 0. +0.j -0.03333333+0.j -0. +0.j] [ 0. +0.j -0. +0.j -0. +0.j 0.03333333-0.j]]