qml.ftqc.pauli_tracker.pauli_prod

pauli_prod(ops)[source]

Get the result of a product of a list of Pauli operators. The result is a new Pauli operator up to a global phase. Mathematically, this function returns \(\prod_{i=0}^{n} ops[i]\).

Parameters:

ops (List[qml.operation.Operator]) – A list of Pauli operators with the same target wire.

Returns:

A xz tuple representing a new Pauli operator.

Example:

The following example shows how the pauli_prod works.

from pennylane.ftqc.pauli_tracker import pauli_prod
from pennylane import I, X, Y, Z
>>> pauli_prod([I(0),X(0),Y(0),Z(0)])
(0, 0)

The result is a new Pauli operator in the xz-encoding representation.