PauliLindbladError#

class PauliLindbladError(generators: Sequence[Pauli], rates: Sequence[float])[source]#

Bases: BaseQuantumError, TolerancesMixin

A Pauli channel generated by a Pauli Lindblad dissipator.

This operator represents an N-qubit quantum error channel \(E(ρ) = e^{\sum_j r_j D_{P_j}}(ρ)\) generated by Pauli Lindblad dissipators \(D_P(ρ) = P ρ P - ρ\), where \(P_j\) are N-qubit Pauli operators.

The list of Pauli generator terms are stored as a PauliList and can be accessed via the generators attribute. The array of dissipator rates \(r_j\) can be accessed via the rates attribute.

A Pauli lindblad error is equivalent to a PauliError and can be converted using the to_pauli_error() method. Though note that for a sparse generated PauliLindbladError there may in general be exponentially many terms in the converted PauliError operator. Because of this, this operator can be used to more efficiently represent N-qubit Pauli channels for simulation if they have few generator terms.

The equivalent Pauli error is constructed as a composition of single-Pauli channel terms

\[e^{\sum_j r_j D_{P_j}} = \prod_j e^{r_j D_{P_j}} = prod_j \left( (1 - p_j) S_I + p_j S_{P_j} \right)\]

where \(p_j = \frac12 - \frac12 e^{-2 r_j}\).

Note

This operator can also represent a non-physical (non-CPTP) channel if any of the rates are negative. Non-physical operators cannot be converted to a QuantumError or used in an AerSimulator simulation. You can check if an operator is physical using the is_cptp() method.

Initialize a Pauli-Lindblad dissipator model.

Parameters:
  • generators – A list of Pauli’s corresponding to the Lindblad dissipator generator terms.

  • rates – The Pauli Lindblad dissipator generator rates.

Attributes

atol = 1e-08#
dim#

Return tuple (input_shape, output_shape).

generators#

Return the Pauli Lindblad dissipator generator terms

id#

Return unique ID string for error

num_qubits#

Return the number of qubits if a N-qubit operator or None otherwise.

qargs#

Return the qargs for the operator.

rates#

Return the Lindblad dissipator generator rates

rtol = 1e-05#
settings#

Settings for IBM RuntimeEncoder JSON encoding

size#

Return the number of error circuit.

Methods

__call__(*qargs)[source]#

Return a shallow copy with qargs attribute set

compose(other, qargs=None, front=False) PauliLindbladError[source]#

Return the operator composition with another CLASS.

Parameters:
  • other (CLASS) – a CLASS object.

  • qargs (list or None) – Optional, a list of subsystem positions to apply other on. If None apply on all subsystems (default: None).

  • front (bool) – If True compose using right operator multiplication, instead of left multiplication [default: False].

Returns:

The composed CLASS.

Return type:

CLASS

Raises:

QiskitError – if other cannot be converted to an operator, or has incompatible dimensions for specified subsystems.

Note

Composition (&) by default is defined as left matrix multiplication for matrix operators, while @ (equivalent to dot()) is defined as right matrix multiplication. That is that A & B == A.compose(B) is equivalent to B @ A == B.dot(A) when A and B are of the same type.

Setting the front=True kwarg changes this to right matrix multiplication and is equivalent to the dot() method A.dot(B) == A.compose(B, front=True).

copy()[source]#

Make a copy of current QuantumError.

dot(other, qargs=None) Self[source]#

Return the right multiplied operator self * other.

Parameters:
  • other (Operator) – an operator object.

  • qargs (list or None) – Optional, a list of subsystem positions to apply other on. If None apply on all subsystems (default: None).

Returns:

The right matrix multiplied Operator.

Return type:

Operator

Note

The dot product can be obtained using the @ binary operator. Hence a.dot(b) is equivalent to a @ b.

expand(other) PauliLindbladError[source]#

Return the reverse-order tensor product with another CLASS.

Parameters:

other (CLASS) – a CLASS object.

Returns:

the tensor product \(b \otimes a\), where \(a\)

is the current CLASS, and \(b\) is the other CLASS.

Return type:

CLASS

static from_dict(error: dict) PauliLindbladError[source]#

Implement current error from a dictionary.

ideal() bool[source]#

Return True if this error object is composed only of identity operations. Note that the identity check is best effort and up to global phase.

input_dims(qargs=None)[source]#

Return tuple of input dimension for specified subsystems.

inverse() PauliLindbladError[source]#

Return the inverse (non-CPTP) channel

is_cp(atol: float | None = None, rtol: float | None = None) bool[source]#

Test if Choi-matrix is completely-positive (CP)

is_cptp(atol: float | None = None, rtol: float | None = None) bool[source]#

Return True if completely-positive trace-preserving (CPTP).

is_tp(atol: float | None = None, rtol: float | None = None) bool[source]#

Test if a channel is trace-preserving (TP)

output_dims(qargs=None)[source]#

Return tuple of output dimension for specified subsystems.

power(n: float) PauliLindbladError[source]#

Return the compose of a operator with itself n times.

Parameters:

n (int) – the number of times to compose with self (n>0).

Returns:

the n-times composed operator.

Return type:

Clifford

Raises:

QiskitError – if the input and output dimensions of the operator are not equal, or the power is not a positive integer.

reshape(input_dims: None | tuple | int = None, output_dims: None | tuple | int = None, num_qubits: None | int = None) BaseOperator[source]#

Return a shallow copy with reshaped input and output subsystem dimensions.

Parameters:
  • input_dims (None or tuple) – new subsystem input dimensions. If None the original input dims will be preserved [Default: None].

  • output_dims (None or tuple) – new subsystem output dimensions. If None the original output dims will be preserved [Default: None].

  • num_qubits (None or int) – reshape to an N-qubit operator [Default: None].

Returns:

returns self with reshaped input and output dimensions.

Return type:

BaseOperator

Raises:

QiskitError – if combined size of all subsystem input dimension or subsystem output dimensions is not constant.

simplify(atol: float | None = None, rtol: float | None = None) PauliLindbladError[source]#

Simplify PauliList by combining duplicates and removing zeros.

Parameters:
  • atol (float) – Optional. Absolute tolerance for checking if coefficients are zero (Default: 1e-8).

  • rtol (float) – Optional. relative tolerance for checking if coefficients are zero (Default: 1e-5).

Returns:

the simplified SparsePauliOp operator.

Return type:

SparsePauliOp

subsystem_errors() list[tuple[PauliLindbladError, tuple[int, ...]]][source]#

Return a list errors for the subsystem decomposed error.

Note

This uses a greedy algorithm to find the largest non-identity subsystem Pauli, checks if its non identity terms are covered by any previously selected Pauli’s, and if not adds it to list of covering subsystems. This is repeated until no generators remain.

In terms of the number of Pauli terms this has runtime O(num_terms * num_coverings), which in the worst case is O(num_terms ** 2).

Returns:

A list of pairs of component PauliLindbladErrors and subsystem indices for the that decompose the current errors.

tensor(other: PauliLindbladError) PauliLindbladError[source]#

Return the tensor product with another CLASS.

Parameters:

other (CLASS) – a CLASS object.

Returns:

the tensor product \(a \otimes b\), where \(a\)

is the current CLASS, and \(b\) is the other CLASS.

Return type:

CLASS

Note

The tensor product can be obtained using the ^ binary operator. Hence a.tensor(b) is equivalent to a ^ b.

to_dict()[source]#

Return the current error as a dictionary.

to_instruction()[source]#

Convert the QuantumError to a circuit Instruction.

to_pauli_error(simplify: bool = True) PauliError[source]#

Convert to a PauliError operator.

Note

If this objects represents an non-CPTP inverse channel with negative rates the returned “probabilities” will be a quasi-probability distribution containing negative values.

Parameters:

simplify – If True call simplify() each single Pauli channel composition to reduce the number of duplicate terms.

Returns:

The PauliError of the current Pauli channel.

to_quantum_error() QuantumError[source]#

Convert to a general QuantumError object.

to_quantumchannel() SuperOp[source]#

Convert to a dense N-qubit QuantumChannel