mimiqcircuits.operations.noisechannel.standards.ampdamping

Classes

AmplitudeDamping(gamma)

One-qubit amplitude damping noise channel.

GeneralizedAmplitudeDamping(p, gamma)

One-qubit generalized amplitude damping noise channel.

class GeneralizedAmplitudeDamping(p, gamma)[source]

Bases: krauschannel

One-qubit generalized amplitude damping noise channel.

Amplitude damping towards a thermal state instead of \(|0\rangle\): with weight \(p\) the qubit decays from \(|1\rangle\) to \(|0\rangle\), with weight \(1-p\) it is excited from \(|0\rangle\) to \(|1\rangle\), in both cases with probability \(\gamma\). The Kraus operators are

\[\begin{split}E_1 = \sqrt{p} \begin{pmatrix} 1 & 0 \\ 0 & \sqrt{1-\gamma} \end{pmatrix} ,\quad E_2 = \sqrt{1-p} \begin{pmatrix} \sqrt{1-\gamma} & 0 \\ 0 & 1 \end{pmatrix} ,\quad E_3 = \sqrt{p} \begin{pmatrix} 0 & \sqrt{\gamma} \\ 0 & 0 \end{pmatrix} ,\quad E_4 = \sqrt{1-p} \begin{pmatrix} 0 & 0 \\ \sqrt{\gamma} & 0 \end{pmatrix}.\end{split}\]

For \(p = 1\) it reduces to AmplitudeDamping.

Parameters:
  • p (float) – Weight of the decay towards \(|0\rangle\), in \([0, 1]\); may be symbolic.

  • gamma (float) – Damping probability, in \([0, 1]\); may be symbolic.

Raises:

ValueError – If a numeric p or gamma is outside \([0, 1]\).

See also

AmplitudeDamping, PhaseAmplitudeDamping

Examples

>>> from mimiqcircuits import *
>>> # p = 1: pure decay to |0>, same as AmplitudeDamping(0.1)
>>> c = Circuit()
>>> c.push(GeneralizedAmplitudeDamping(1, 0.1), 0)
1-qubit circuit with 1 instruction:
└── GeneralizedAmplitudeDamping((1, 0.1)) @ q[0]
evaluate(d={})[source]

Return a copy with symbols in p and gamma 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:

GeneralizedAmplitudeDamping

Raises:

ValueError – If a substituted parameter is outside \([0, 1]\).

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, DiagonalOp or RescaledGate) per Kraus operator.

Return type:

list

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)]
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:

list

Examples

>>> from mimiqcircuits import *
>>> AmplitudeDamping(0.36).krausmatrices()
[[1.0, 0]
[0, 0.8]
, [0, 0.6]
[0, 0]
]
iswrapper()[source]

Whether the operation wraps another operation.

True for composite operations such as Control, Power, Inverse, Parallel or IfStatement, False otherwise.

Returns:

bool

property num_qubits

Number of qubits the operation acts on.

Read-only: assigning to it raises ValueError.

property parnames

Names of the operation’s parameters, as a tuple of strings.

Read-only: assigning to it raises ValueError.

class AmplitudeDamping(gamma)[source]

Bases: krauschannel

One-qubit amplitude damping noise channel.

Models energy relaxation: the excited state \(|1\rangle\) decays to \(|0\rangle\) with probability \(\gamma\). The Kraus operators are

\[\begin{split}E_1 = \begin{pmatrix} 1 & 0 \\ 0 & \sqrt{1-\gamma} \end{pmatrix} ,\quad E_2 = \begin{pmatrix} 0 & \sqrt{\gamma} \\ 0 & 0 \end{pmatrix}.\end{split}\]
Parameters:

gamma (float) – Damping probability, in \([0, 1]\); may be symbolic.

Raises:

ValueError – If a numeric gamma is outside \([0, 1]\).

See also

GeneralizedAmplitudeDamping, PhaseAmplitudeDamping

Examples

>>> from mimiqcircuits import *
>>> # |1> decays to |0> with probability 0.1
>>> c = Circuit()
>>> c.push(AmplitudeDamping(0.1), 0)
1-qubit circuit with 1 instruction:
└── AmplitudeDamping(0.1) @ q[0]
evaluate(d={})[source]

Return a copy with symbols in gamma substituted by values.

Parameters:

d (dict) – Map from symbols to the values to substitute.

Returns:

A new channel; gamma becomes a float when it is fully numeric.

Return type:

AmplitudeDamping

Raises:

ValueError – If the substituted gamma is outside \([0, 1]\).

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, DiagonalOp or RescaledGate) per Kraus operator.

Return type:

list

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)]
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:

list

Examples

>>> from mimiqcircuits import *
>>> AmplitudeDamping(0.36).krausmatrices()
[[1.0, 0]
[0, 0.8]
, [0, 0.6]
[0, 0]
]
iswrapper()[source]

Whether the operation wraps another operation.

True for composite operations such as Control, Power, Inverse, Parallel or IfStatement, False otherwise.

Returns:

bool

property parnames

Names of the operation’s parameters, as a tuple of strings.

Read-only: assigning to it raises ValueError.