Maestro 0.3.1
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Simulators::QuantumChannel Class Reference

A local completely-positive, trace-preserving map in Kraus form. More...

#include <QuantumChannel.h>

Collaboration diagram for Simulators::QuantumChannel:

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 KrausOperatorsGetKrausOperators () 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.

Detailed Description

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.

Member Typedef Documentation

◆ KrausOperators

Definition at line 36 of file QuantumChannel.h.

◆ Matrix

using Simulators::QuantumChannel::Matrix = Eigen::MatrixXcd

Definition at line 35 of file QuantumChannel.h.

Constructor & Destructor Documentation

◆ QuantumChannel()

Simulators::QuantumChannel::QuantumChannel ( KrausOperators krausOperators)
inlineexplicit

Member Function Documentation

◆ AmplitudeDamping()

QuantumChannel Simulators::QuantumChannel::AmplitudeDamping ( double gamma)
inlinestatic

|1> -> |0> relaxation with probability gamma.

Definition at line 194 of file QuantumChannel.h.

References QuantumChannel().

Referenced by Simulators::IState::ApplyAmplitudeDamping().

◆ BitFlip()

QuantumChannel Simulators::QuantumChannel::BitFlip ( double probability)
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().

◆ BitPhaseFlip()

QuantumChannel Simulators::QuantumChannel::BitPhaseFlip ( double probability)
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().

◆ ChoiMatrix()

Matrix Simulators::QuantumChannel::ChoiMatrix ( ) const
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().

◆ CorrelatedPhaseFlip() [1/2]

QuantumChannel Simulators::QuantumChannel::CorrelatedPhaseFlip ( double probability)
inlinestatic

◆ CorrelatedPhaseFlip() [2/2]

QuantumChannel Simulators::QuantumChannel::CorrelatedPhaseFlip ( double probability,
double correlation )
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().

◆ Depolarizing()

QuantumChannel Simulators::QuantumChannel::Depolarizing ( double errorProbability)
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().

◆ DepolarizingMixing()

QuantumChannel Simulators::QuantumChannel::DepolarizingMixing ( double mixingProbability)
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().

◆ GeneralizedAmplitudeDamping()

QuantumChannel Simulators::QuantumChannel::GeneralizedAmplitudeDamping ( double gamma,
double excitedStatePopulation )
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().

◆ GetKrausOperators()

const KrausOperators & Simulators::QuantumChannel::GetKrausOperators ( ) const
inline

Definition at line 44 of file QuantumChannel.h.

◆ GetNumberOfQubits()

size_t Simulators::QuantumChannel::GetNumberOfQubits ( ) const
inline

Definition at line 45 of file QuantumChannel.h.

◆ IsApprox()

bool Simulators::QuantumChannel::IsApprox ( const QuantumChannel & other,
double tolerance = 1e-12 ) const
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().

◆ Pauli() [1/2]

QuantumChannel Simulators::QuantumChannel::Pauli ( const std::vector< double > & probabilities)
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().

◆ Pauli() [2/2]

QuantumChannel Simulators::QuantumChannel::Pauli ( double px,
double py,
double pz )
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().

◆ PhaseDamping()

QuantumChannel Simulators::QuantumChannel::PhaseDamping ( double gamma)
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().

◆ PhaseFlip()

QuantumChannel Simulators::QuantumChannel::PhaseFlip ( double probability)
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().

◆ ThermalRelaxation()

QuantumChannel Simulators::QuantumChannel::ThermalRelaxation ( double duration,
double t1,
double t2,
double excitedStatePopulation = 0.0 )
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().

◆ TwoQubitDepolarizing()

QuantumChannel Simulators::QuantumChannel::TwoQubitDepolarizing ( double errorProbability)
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().

◆ TwoQubitDepolarizingMixing()

QuantumChannel Simulators::QuantumChannel::TwoQubitDepolarizingMixing ( double mixingProbability)
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().


The documentation for this class was generated from the following file: