mimiqcircuits.operations.noisechannel.standards.phaseamplitudedamping¶
Classes
|
One-qubit phase amplitude damping noise channel. |
|
One-qubit thermal noise channel. |
- class ThermalNoise(T1, T2, time, ne)[source]¶
Bases:
krauschannelOne-qubit thermal noise channel.
The thermal noise channel is equivalent to the
PhaseAmplitudeDampingchannel, but it is parametrized instead as:\[\begin{split}\mathcal{E}(\rho) = \begin{pmatrix} e^{-\Gamma_1 t}\rho_{00} + (1-n_e)(1-e^{-\Gamma_1 t}) & e^{-\Gamma_2 t}\rho_{01} \\ e^{-\Gamma_2 t}\rho_{10} & e^{-\Gamma_1 t}\rho_{11} + n_e(1-e^{-\Gamma_1 t}) \end{pmatrix}\end{split}\]where \(\Gamma_1 = 1/T_1\) and \(\Gamma_2 = 1/T_2\), and the parameters must fulfill \(T_1 > 0\), \(0 < T_2 \leq 2 T_1\), \(t \geq 0\), and \(0 \leq n_e \leq 1\).
The parameters of the equivalent
PhaseAmplitudeDampingchannel are \(p = 1-n_e\), \(\gamma = 1-e^{-\Gamma_1 t}\), and \(\beta = \frac{1}{2}(1-e^{-(\Gamma_2-\Gamma_1/2)t})\).- Parameters:
T1 (float | int) – Longitudinal relaxation time \(T_1\), greater than 0.
T2 (float | int) – Transverse relaxation (dephasing) time \(T_2\), greater than 0 and at most \(2 T_1\).
time (float | int) – Duration \(t\) over which the noise acts, at least 0.
ne (float | int) – Excited-state population \(n_e\) at thermal equilibrium with the environment, in \([0, 1]\).
Any of the parameters may be symbolic; the checks then apply only to the numeric ones.
- Raises:
ValueError – If a numeric parameter breaks one of the constraints above.
See also
PhaseAmplitudeDamping,AmplitudeDamping,GeneralizedAmplitudeDampingExamples
>>> from mimiqcircuits import * >>> # T1 = 0.5, T2 = 0.6, t = 1.2, ne = 0.3 on qubit 1 >>> c = Circuit() >>> c.push(ThermalNoise(0.5, 0.6, 1.2, 0.3), 1) 2-qubit circuit with 1 instruction: └── ThermalNoise(0.5, 0.6, 1.2, 0.3) @ q[1]
- evaluate(d={})[source]¶
Return a copy with symbols in the parameters substituted by values.
- Parameters:
d (dict) – Map from symbols to the values to substitute.
- Returns:
A new channel; each parameter becomes a float when it is fully numeric.
- Return type:
- Raises:
ValueError – If a substituted parameter breaks the constraints of the class.
- krausmatrices()[source]¶
Return the matrices of the Kraus operators \(E_k\) of the channel.
These are the matrices of
krausoperators(), in the same order. For a parametric channel the entries are symbolic expressions.- Returns:
One symengine matrix per Kraus operator.
- Return type:
Examples
>>> from mimiqcircuits import * >>> AmplitudeDamping(0.36).krausmatrices() [[1.0, 0] [0, 0.8] , [0, 0.6] [0, 0] ]
- krausoperators()[source]¶
Return the Kraus operators \(E_k\) of the channel as operator objects.
Every concrete channel implements this method; the base class raises.
- Returns:
One operator (for example
Operator,DiagonalOporRescaledGate) per Kraus operator.- Return type:
- Raises:
NotImplementedError – When called on a class that does not define it.
Examples
>>> from mimiqcircuits import * >>> # projective noise in Z: project on |0> or on |1> >>> ProjectiveNoise("Z").krausoperators() [P₀(1), P₁(1)]
- property parnames¶
Names of the operation’s parameters, as a tuple of strings.
Read-only: assigning to it raises
ValueError.
- class PhaseAmplitudeDamping(p, gamma, beta)[source]¶
Bases:
krauschannelOne-qubit phase amplitude damping noise channel.
The channel maps a density matrix \(\rho\) to
\[\begin{split}\mathcal{E}(\rho) = \begin{pmatrix} (1-\gamma)\rho_{00} + \gamma p & (1-2\beta)\sqrt{1-\gamma}\rho_{01} \\ (1-2\beta)\sqrt{1-\gamma}\rho_{10} & (1-\gamma)\rho_{11} + (1-p)\gamma \end{pmatrix}\end{split}\]with \(p, \gamma, \beta \in [0,1]\). It is the same channel as
GeneralizedAmplitudeDamping(p, gamma)followed byPauliZ(beta).krausmatrices()returns a Kraus representation.- Parameters:
Any of the parameters may be symbolic; the range checks then apply only to the numeric ones.
- Raises:
ValueError – If a numeric parameter is outside \([0, 1]\).
See also
AmplitudeDamping,GeneralizedAmplitudeDamping,ThermalNoise,PauliZExamples
>>> from mimiqcircuits import * >>> # p = 0.1, gamma = 0.2, beta = 0.3 on qubit 1 >>> c = Circuit() >>> c.push(PhaseAmplitudeDamping(0.1, 0.2, 0.3), 1) 2-qubit circuit with 1 instruction: └── PhaseAmplitudeDamping(0.1, 0.2, 0.3) @ q[1]
- evaluate(d={})[source]¶
Return a copy with symbols in the parameters substituted by values.
- Parameters:
d (dict) – Map from symbols to the values to substitute.
- Returns:
A new channel; each parameter becomes a float when it is fully numeric.
- Return type:
- Raises:
ValueError – If a substituted parameter is outside \([0, 1]\).
- krausmatrices()[source]¶
Return the matrices of the Kraus operators \(E_k\) of the channel.
These are the matrices of
krausoperators(), in the same order. For a parametric channel the entries are symbolic expressions.- Returns:
One symengine matrix per Kraus operator.
- Return type:
Examples
>>> from mimiqcircuits import * >>> AmplitudeDamping(0.36).krausmatrices() [[1.0, 0] [0, 0.8] , [0, 0.6] [0, 0] ]
- krausoperators()[source]¶
Return the Kraus operators \(E_k\) of the channel as operator objects.
Every concrete channel implements this method; the base class raises.
- Returns:
One operator (for example
Operator,DiagonalOporRescaledGate) per Kraus operator.- Return type:
- Raises:
NotImplementedError – When called on a class that does not define it.
Examples
>>> from mimiqcircuits import * >>> # projective noise in Z: project on |0> or on |1> >>> ProjectiveNoise("Z").krausoperators() [P₀(1), P₁(1)]
- property parnames¶
Names of the operation’s parameters, as a tuple of strings.
Read-only: assigning to it raises
ValueError.