Quantum channels and noise models

Kraus channel

class graphix.channels.KrausChannel(kraus_data)[source]

quantum channel class in the Kraus representation. Defined by Kraus operators \(K_i\) with scalar prefactors coef) \(c_i\), where the channel act on density matrix as \(\rho' = \sum_i K_i^\dagger \rho K_i\). The data should satisfy \(\sum K_i^\dagger K_i = I\)

nqubit

number of qubits acted on by the Kraus operators

Type

int

size

number of Kraus operators (== Choi rank)

Type

int

kraus_ops

the data in format array_like(dict): [{coef: scalar, operator: array_like}, {coef: scalar, operator: array_like}, …]

Type

array_like(dict())

Returns

containing the corresponding Kraus operators

Return type

Channel object

__init__(kraus_data)[source]
Parameters

kraus_data (array_like) – array of Kraus operator data. array_like(dict): [{coef: scalar, operator: array_like}, {parameter: scalar, operator: array_like}, …] only works for square Kraus operators

Raises

ValueError – If empty array_like is provided.

graphix.channels.dephasing_channel(prob: float) KrausChannel[source]

single-qubit dephasing channel, \((1-p) \rho + p Z \rho Z\)

Parameters

prob (float) – The probability associated to the channel

Returns

containing the corresponding Kraus operators

Return type

graphix.channel.KrausChannel object

graphix.channels.depolarising_channel(prob: float) KrausChannel[source]

single-qubit depolarizing channel

\[(1-p) \rho + \frac{p}{3} (X \rho X + Y \rho Y + Z \rho Z) = (1 - 4 \frac{p}{3}) \rho + 4 \frac{p}{3} id\]
Parameters

prob (float) – The probability associated to the channel

graphix.channels.pauli_channel(px: float, py: float, pz: float) KrausChannel[source]

single-qubit pauli channel,

\[(1-p_X-p_Y-p_Z) \rho + p_X X \rho X + p_Y Y \rho Y + p_Z Z \rho Z)\]
graphix.channels.two_qubit_depolarising_channel(prob: float) KrausChannel[source]

two-qubit depolarising channel.

\[\mathcal{E} (\rho) = (1-p) \rho + \frac{p}{15} \sum_{P_i \in \{id, X, Y ,Z\}^{\otimes 2}/(id \otimes id)}P_i \rho P_i\]
Parameters

prob (float) – The probability associated to the channel

Returns

containing the corresponding Kraus operators

Return type

graphix.channel.KrausChannel object

graphix.channels.two_qubit_depolarising_tensor_channel(prob: float) KrausChannel[source]

two-qubit tensor channel of single-qubit depolarising channels with same probability. Kraus operators:

\[\Big\{ \sqrt{(1-p)} id, \sqrt{(p/3)} X, \sqrt{(p/3)} Y , \sqrt{(p/3)} Z \Big\} \otimes \Big\{ \sqrt{(1-p)} id, \sqrt{(p/3)} X, \sqrt{(p/3)} Y , \sqrt{(p/3)} Z \Big\}\]
Parameters

prob (float) – The probability associated to the channel

Returns

containing the corresponding Kraus operators

Return type

graphix.channel.KrausChannel object

Noise model classes

class graphix.noise_models.noise_model.NoiseModel[source]

Abstract base class for all noise models.

abstract __init__()[source]
abstract byproduct_x()[source]

apply noise to qubits that happens in the X gate process

abstract byproduct_z()[source]

apply noise to qubits that happens in the Z gate process

abstract clifford()[source]

apply noise to qubits that happens in the Clifford gate process

abstract confuse_result()[source]

assign wrong measurement result

abstract entangle()[source]

apply noise to qubits that happens in the CZ gate process

abstract measure()[source]

apply noise to qubits that happens in the measurement process

abstract prepare_qubit()[source]

return qubit to be added with preparation errors.

abstract tick_clock()[source]

notion of time in real devices - this is where we apply effect of T1 and T2. we assume commands that lie between ‘T’ commands run simultaneously on the device.

class graphix.noise_models.noiseless_noise_model.NoiselessNoiseModel[source]

Noiseless noise model for testing. Only return the identity channel.

Parameters

NoiseModel (class) – Parent abstract class class:graphix.noise_model.NoiseModel

__init__()[source]
byproduct_x()[source]

apply noise to qubits after X gate correction

byproduct_z()[source]

apply noise to qubits after Z gate correction

clifford()[source]

apply noise to qubits that happens in the Clifford gate process

confuse_result(cmd)[source]

assign wrong measurement result

entangle()[source]

return noise model to qubits that happens after the CZ gats

measure()[source]

apply noise to qubit to be measured.

prepare_qubit()[source]

return the channel to apply after clean single-qubit preparation. Here just identity.

tick_clock()[source]

notion of time in real devices - this is where we apply effect of T1 and T2. we assume commands that lie between ‘T’ commands run simultaneously on the device.