qml.ftqc.pauli_tracker.commute_clifford_op¶
- commute_clifford_op(clifford_op, xz)[source]¶
Gets the list of xz-encoded bits representing the list of input Pauli ops after being commuted through the given Clifford op. Mathematically, this function applies the following equation: \(new\_xz \cdot clifford\_op = clifford\_op \cdot xz\) up to a global phase to move the \(xz\) through the \(clifford\_op\) and returns the \(new\_xz\). Note that \(xz\) and \(new\_xz\) represent a list of Pauli operations.
- Parameters:
clifford_op (Operator) – A Clifford operator class. Supported operators are:
qml.S
,qml.H
,qml.CNOT
.xz (list(tuple)) – A list of xz tuples which map to Pauli operators
- Returns:
A list of new xz tuples that the clifford_op commute the xz to.
- Example:
The following example shows how the commute_clifford_op works.
from pennylane.ftqc.pauli_tracker import commute_clifford_op from pennylane import I, CNOT >>> commute_clifford_op(CNOT(wires=[0,1]), [(1, 1), (1, 0)]) [(1, 1), (0, 0)]
A list of Pauli operators in the xz representation is returned.