Quantum Channel Generators API
Quantum Channel Generators
- graphcalc.quantum.channel_generators.amplitude_damping_channel(gamma: float, *, tol: float = 1e-09) QuantumChannel[source]
Return the qubit amplitude-damping channel.
- Parameters:
gamma (float) – Damping parameter. Must satisfy
0 <= gamma <= 1.tol (float, default=1e-9) – Numerical tolerance passed to
QuantumChannel.
Notes
This channel models relaxation from
|1>to|0>with probabilitygamma.A Kraus representation is
K0 = [[1, 0], [0, sqrt(1-gamma)]],K1 = [[0, sqrt(gamma)], [0, 0]].In particular,
|0><0|is fixed,|1><1|is mapped togamma |0><0| + (1-gamma) |1><1|.
This channel is trace preserving and completely positive, but in general it is not unital.
- graphcalc.quantum.channel_generators.bit_flip_channel(p: float, *, tol: float = 1e-09) QuantumChannel[source]
Return the qubit bit-flip channel.
- Parameters:
p (float) – Flip probability. Must satisfy
0 <= p <= 1.tol (float, default=1e-9) – Numerical tolerance passed to
QuantumChannel.
Notes
This channel is defined by
Phi(rho) = (1 - p) rho + p X rho X,where
Xis the Pauli X operator.
- graphcalc.quantum.channel_generators.bit_phase_flip_channel(p: float, *, tol: float = 1e-09) QuantumChannel[source]
Return the qubit bit-phase-flip channel.
- Parameters:
p (float) – Flip probability. Must satisfy
0 <= p <= 1.tol (float, default=1e-9) – Numerical tolerance passed to
QuantumChannel.
Notes
This channel is defined by
Phi(rho) = (1 - p) rho + p Y rho Y,where
Yis the Pauli Y operator.
- graphcalc.quantum.channel_generators.depolarizing_channel(p: float, *, dim: int = 2, tol: float = 1e-09) QuantumChannel[source]
Return the depolarizing channel on a
dim-dimensional system.- Parameters:
p (float) – Mixing parameter. Must satisfy
0 <= p <= 1.dim (int, default=2) – Hilbert-space dimension.
tol (float, default=1e-9) – Numerical tolerance passed to
QuantumChannel.
Notes
This implementation uses the convention
Phi(rho) = (1 - p) rho + p * Tr(rho) * I / dim.For density operators with
Tr(rho)=1, this isPhi(rho) = (1 - p) rho + p I / dim.A Kraus representation is given by
K0 = sqrt(1-p) IK_{ij} = sqrt(p/dim) E_{ij}for all0 <= i,j < dim,
where
E_{ij}is the matrix unit with a 1 in position(i,j)and zeros elsewhere.
- graphcalc.quantum.channel_generators.identity_channel(dim: int, *, tol: float = 1e-09) QuantumChannel[source]
Return the identity channel on a
dim-dimensional system.
- graphcalc.quantum.channel_generators.phase_damping_channel(gamma: float, *, tol: float = 1e-09) QuantumChannel[source]
Return the qubit phase-damping channel.
- Parameters:
gamma (float) – Dephasing parameter. Must satisfy
0 <= gamma <= 1.tol (float, default=1e-9) – Numerical tolerance passed to
QuantumChannel.
Notes
This channel preserves populations and damps coherences:
[[rho00, rho01], [rho10, rho11]] -> [[rho00, sqrt(1-gamma) rho01], [sqrt(1-gamma) rho10, rho11]].A Kraus representation is
K0 = diag(1, sqrt(1-gamma)),K1 = diag(0, sqrt(gamma)).
- graphcalc.quantum.channel_generators.phase_flip_channel(p: float, *, tol: float = 1e-09) QuantumChannel[source]
Return the qubit phase-flip channel.
- Parameters:
p (float) – Flip probability. Must satisfy
0 <= p <= 1.tol (float, default=1e-9) – Numerical tolerance passed to
QuantumChannel.
Notes
This channel is defined by
Phi(rho) = (1 - p) rho + p Z rho Z,where
Zis the Pauli Z operator.