NoiseError
QuICT.core.noise.NoiseGate ¶
QuICT.core.noise.QuantumNoiseError ¶
The based class for quantum noise error.
Example
quantum_error = QuantumNoiseError([(error_matrix1, 0.4), (error_matrix2, 0.6)])
Parameters:
-
ops(List[Tuple(error_matrix) –np.ndarray, prob: float)]): The noise error operators, the sum of the probabilities should be 1.
Source code in QuICT/core/noise/noise_error.py
compose ¶
generate composed noise error with self and other.
Source code in QuICT/core/noise/noise_error.py
prob_mapping_operator ¶
Return the related noise error's matrix with given probability. The given probability should within [0, 1].
Source code in QuICT/core/noise/noise_error.py
tensor ¶
generate tensor noise error with self and other.
Source code in QuICT/core/noise/noise_error.py
to_matrix ¶
generate kraus operator with given gate's matrix.
QuICT.core.noise.PauliError ¶
Bases: QuantumNoiseError
Pauli Error; Including Bit Flip and Phase Flip
Example
PauliError([('i', 0.3), ('x', 0.7)])
Parameters:
-
ops(List[Tuple[str, float]]) –The operators for pauli error.
-
num_qubits(int, default:1) –The number of target qubits. Defaults to 1.
Source code in QuICT/core/noise/noise_error.py
QuICT.core.noise.BitflipError ¶
Bases: PauliError
Special Case for PauilError, with fixed Pauil Operator: [('x', prob), ('i', 1 - prob)]
Parameters:
-
prob(float) –The probability to flip the qubit.
Source code in QuICT/core/noise/noise_error.py
QuICT.core.noise.PhaseflipError ¶
Bases: PauliError
Special Case for PauilError, with fixed Pauil Operator: [('z', prob), ('i', 1 - prob)]
Parameters:
-
prob(float) –The probability of fliping the phase.
Source code in QuICT/core/noise/noise_error.py
QuICT.core.noise.PhaseBitflipError ¶
Bases: PauliError
Special Case for PauilError, with fixed Pauil Operator: [('y', prob), ('i', 1 - prob)]
Parameters:
-
prob(float) –The probability of fliping the qubit and phase.
Source code in QuICT/core/noise/noise_error.py
QuICT.core.noise.DepolarizingError ¶
Bases: PauliError
The Depolarizing Error
Parameters:
-
prob(float) –The probability of depolarizing.
-
num_qubits(int, default:1) –The number of qubits have depolarizing error. Defaults to 1.
Source code in QuICT/core/noise/noise_error.py
QuICT.core.noise.DampingError ¶
Bases: QuantumNoiseError
Amplitude Damping, Phase Damping and Amp-Phase Damping
a = amp, b = phase, p = state prob
A0 = sqrt(1 - p1) * [[1, 0], [0, sqrt(1 - a - b)]]
A1 = sqrt(1 - p1) * [[0, sqrt(a)], [0, 0]]
A2 = sqrt(1 - p1) * [[0, 0], [0, sqrt(b)]]
B0 = sqrt(p1) * [[sqrt(1 - a - b), 0], [0, 1]]
B1 = sqrt(p1) * [[0, 0], [sqrt(a), 0]]
B2 = sqrt(p1) * [[sqrt(b), 0], [0, 0]]
Parameters:
-
amplitude_prob(float) –The probability for damping amplitude.
-
phase_prob(float) –The probability for damping phase.
-
dissipation_state(float, default:0.0) –The dissipation states. Defaults to 0.0.
Source code in QuICT/core/noise/noise_error.py
to_matrix ¶
generate kraus operator with given gate's matrix.