|
Maestro 0.3.1
Unified interface for quantum circuit simulation
|
A local completely-positive, trace-preserving map in Kraus form. More...
#include <QuantumChannel.h>
Public Types | |
| using | KrausOperators = std::vector<Matrix> |
| using | Matrix = Eigen::MatrixXcd |
Public Member Functions | |
| QuantumChannel (KrausOperators krausOperators) | |
| Construct and validate a CPTP channel from Kraus operators. | |
| Matrix | ChoiMatrix () const |
| Choi matrix of the channel: sum_k vec(E_k) vec(E_k)^dagger, with vec() stacking the operator column by column. | |
| const KrausOperators & | GetKrausOperators () const |
| size_t | GetNumberOfQubits () const |
| bool | IsApprox (const QuantumChannel &other, double tolerance=1e-12) const |
| Compare two channels as MAPS, not as Kraus lists. | |
Static Public Member Functions | |
| static QuantumChannel | AmplitudeDamping (double gamma) |
| |1> -> |0> relaxation with probability gamma. | |
| static QuantumChannel | BitFlip (double probability) |
| (1-p) rho + p X rho X. | |
| static QuantumChannel | BitPhaseFlip (double probability) |
| (1-p) rho + p Y rho Y. | |
| static QuantumChannel | CorrelatedPhaseFlip (double probability) |
| (1-p)rho + p (Z (x) Z) rho (Z (x) Z). | |
| static QuantumChannel | CorrelatedPhaseFlip (double probability, double correlation) |
| Interpolate between independent phase flips and a fully correlated ZZ phase flip. | |
| static QuantumChannel | Depolarizing (double errorProbability) |
| Depolarizing channel in the NoiseModel/QCSim convention: (1-p)rho + p/3 (XrhoX + YrhoY + ZrhoZ). | |
| static QuantumChannel | DepolarizingMixing (double mixingProbability) |
| Depolarizing channel in the replacement convention: (1-p)rho + p I/2. | |
| static QuantumChannel | GeneralizedAmplitudeDamping (double gamma, double excitedStatePopulation) |
| Finite-temperature amplitude damping. | |
| static QuantumChannel | Pauli (const std::vector< double > &probabilities) |
| Arbitrary local Pauli channel. | |
| static QuantumChannel | Pauli (double px, double py, double pz) |
| Single-qubit Pauli channel with X, Y and Z error probabilities. | |
| static QuantumChannel | PhaseDamping (double gamma) |
| Phase damping with coherence multiplier sqrt(1-gamma). | |
| static QuantumChannel | PhaseFlip (double probability) |
| (1-p) rho + p Z rho Z. | |
| static QuantumChannel | ThermalRelaxation (double duration, double t1, double t2, double excitedStatePopulation=0.0) |
| Hardware-style thermal relaxation for a duration, T1 and T2. | |
| static QuantumChannel | TwoQubitDepolarizing (double errorProbability) |
| Two-qubit depolarizing in the total-Pauli-error convention: identity has probability 1-p and each other Pauli has p/15. | |
| static QuantumChannel | TwoQubitDepolarizingMixing (double mixingProbability) |
| Two-qubit replacement depolarizing, fully mixed at probability one. | |
A local completely-positive, trace-preserving map in Kraus form.
Matrices use Maestro's gate convention: for a target list {q0, q1}, q0 is the least-significant local basis bit. Thus a product A on q0 and B on q1 is represented by B (x) A.
Definition at line 33 of file QuantumChannel.h.
| using Simulators::QuantumChannel::KrausOperators = std::vector<Matrix> |
Definition at line 36 of file QuantumChannel.h.
| using Simulators::QuantumChannel::Matrix = Eigen::MatrixXcd |
Definition at line 35 of file QuantumChannel.h.
|
inlineexplicit |
Construct and validate a CPTP channel from Kraus operators.
Definition at line 39 of file QuantumChannel.h.
Referenced by AmplitudeDamping(), BitFlip(), BitPhaseFlip(), CorrelatedPhaseFlip(), CorrelatedPhaseFlip(), Depolarizing(), DepolarizingMixing(), GeneralizedAmplitudeDamping(), IsApprox(), Pauli(), Pauli(), PhaseDamping(), PhaseFlip(), ThermalRelaxation(), TwoQubitDepolarizing(), and TwoQubitDepolarizingMixing().
|
inlinestatic |
|1> -> |0> relaxation with probability gamma.
Definition at line 194 of file QuantumChannel.h.
References QuantumChannel().
Referenced by Simulators::IState::ApplyAmplitudeDamping().
|
inlinestatic |
(1-p) rho + p X rho X.
Definition at line 91 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
Referenced by Simulators::IState::ApplyBitFlipNoise().
|
inlinestatic |
(1-p) rho + p Y rho Y.
Definition at line 97 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
Referenced by Simulators::IState::ApplyBitPhaseFlipNoise().
|
inline |
Choi matrix of the channel: sum_k vec(E_k) vec(E_k)^dagger, with vec() stacking the operator column by column.
Two channels are the same map if and only if their Choi matrices are equal.
Definition at line 78 of file QuantumChannel.h.
Referenced by IsApprox().
|
inlinestatic |
(1-p)rho + p (Z (x) Z) rho (Z (x) Z).
Definition at line 315 of file QuantumChannel.h.
References QuantumChannel(), and CorrelatedPhaseFlip().
Referenced by Simulators::IState::ApplyCorrelatedPhaseFlipNoise(), Simulators::IState::ApplyCorrelatedPhaseFlipNoise(), and CorrelatedPhaseFlip().
|
inlinestatic |
Interpolate between independent phase flips and a fully correlated ZZ phase flip.
correlation=0 is E_Z (x) E_Z; correlation=1 applies either II or ZZ.
Definition at line 324 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
|
inlinestatic |
Depolarizing channel in the NoiseModel/QCSim convention: (1-p)rho + p/3 (XrhoX + YrhoY + ZrhoZ).
Definition at line 178 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
Referenced by Simulators::IState::ApplyDepolarizingNoise(), and DepolarizingMixing().
|
inlinestatic |
Depolarizing channel in the replacement convention: (1-p)rho + p I/2.
Full mixing occurs at p=1.
Definition at line 188 of file QuantumChannel.h.
References QuantumChannel(), and Depolarizing().
Referenced by Simulators::IState::ApplyDepolarizingMixingNoise().
|
inlinestatic |
Finite-temperature amplitude damping.
excitedStatePopulation is the equilibrium population of |1>.
Definition at line 222 of file QuantumChannel.h.
References QuantumChannel().
Referenced by Simulators::IState::ApplyGeneralizedAmplitudeDamping().
|
inline |
Definition at line 44 of file QuantumChannel.h.
|
inline |
Definition at line 45 of file QuantumChannel.h.
|
inline |
Compare two channels as MAPS, not as Kraus lists.
The Kraus representation is not unique: {E_k} and {sum_j u_kj E_j} for any unitary u describe the same channel, and a channel may legitimately be built with a different number of operators (Pauli(), for instance, drops zero-probability terms, so the operator count depends on the parameter values). Comparing coefficient by coefficient therefore reports physically identical channels as different.
The Choi matrix sum_k vec(E_k) vec(E_k)^dagger is unique to the map, so comparing Choi matrices answers the question actually being asked.
Definition at line 60 of file QuantumChannel.h.
References QuantumChannel(), and ChoiMatrix().
|
inlinestatic |
Arbitrary local Pauli channel.
The array must contain 4^n probabilities. Base-4 digit i of an array index selects I, X, Y, or Z on targets[i], respectively. For two targets the order is therefore II, XI, YI, ZI, IX, XX, ... , ZZ.
Definition at line 130 of file QuantumChannel.h.
References QuantumChannel().
|
inlinestatic |
Single-qubit Pauli channel with X, Y and Z error probabilities.
The identity probability is 1-px-py-pz.
Definition at line 112 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
Referenced by Simulators::IState::ApplyPauliChannel(), Simulators::IState::ApplyPauliChannel(), BitFlip(), BitPhaseFlip(), CorrelatedPhaseFlip(), Depolarizing(), Pauli(), PhaseFlip(), and TwoQubitDepolarizing().
|
inlinestatic |
Phase damping with coherence multiplier sqrt(1-gamma).
This differs from phase flip, whose multiplier is 1-2p.
Definition at line 208 of file QuantumChannel.h.
References QuantumChannel().
Referenced by Simulators::IState::ApplyPhaseDamping().
|
inlinestatic |
(1-p) rho + p Z rho Z.
Definition at line 103 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
Referenced by Simulators::IState::ApplyPhaseFlipNoise().
|
inlinestatic |
Hardware-style thermal relaxation for a duration, T1 and T2.
Populations relax toward excitedStatePopulation with exp(-duration/T1), while coherences are multiplied by exp(-duration/T2). The physical Markovian constraint T2 <= 2*T1 is enforced. Positive infinity is accepted for either time constant.
Definition at line 250 of file QuantumChannel.h.
References QuantumChannel().
Referenced by Simulators::IState::ApplyThermalRelaxation().
|
inlinestatic |
Two-qubit depolarizing in the total-Pauli-error convention: identity has probability 1-p and each other Pauli has p/15.
Definition at line 344 of file QuantumChannel.h.
References QuantumChannel(), and Pauli().
Referenced by Simulators::IState::ApplyTwoQubitDepolarizingNoise(), and TwoQubitDepolarizingMixing().
|
inlinestatic |
Two-qubit replacement depolarizing, fully mixed at probability one.
Definition at line 352 of file QuantumChannel.h.
References QuantumChannel(), and TwoQubitDepolarizing().
Referenced by Simulators::IState::ApplyTwoQubitDepolarizingMixingNoise().