qat.synthopline.interface.WeylOperator
- class qat.synthopline.interface.WeylOperator
Class representing a Pauli operator in a Weyl basis.
Pauli operators are represented via a \(\mathbb{Z}_4\)-vector of length \(2n + 1\).
The first entry represents a global phase as a power of \(\omega=i\).
The \(n\) next entries correspond to powers of \(Z_i\) for each qubit \(i\).
The \(n\) last entries correspond to powers of \(X_i\) for each qubit \(i\).
The operator represented by the string \(1|11|23\) will be:
\[i^{-2 - 2 - 3}(Z_0^1 Z_1^1)(X_0^2 X_1^3)\]More generally, \(\phi|a|b\) represents the operator:
\[i^{-2\phi - a\cdot b} Z^a X^b\]where \(P^x = P_0^{x_0}...P_{n-1}^{x_{n-1}}\) and \(\cdot\) represent the scalar product between vectors over \(\mathbb{Z}_4\).
A detailed introduction can be found in [dB12].
- Parameters
pauli_string (str) – a string of Pauli operators
from qat.synthopline.interface import WeylOperator pauli_operator = "IZY" weyl_operator = WeylOperator(pauli_operator) print(weyl_operator)
( 0 | 0 1 3 |0 0 3 )
- conjugate_with(self: qat.synthopline.interface.WeylOperator, arg0: qat.synthopline.interface.OperatorTableau) None
Conjugate the Weyl operator using an
OperatorTableau
.The conjugation happens in place.
- Parameters
tableau (
OperatorTableau
) – a Tableau
- to_pauli(self: qat.synthopline.interface.WeylOperator) Tuple[bool, str]
Converts the Weyl operator back to a Pauli operator and a global phase.
- Returns
- a pair (phase, pauli_string). If phase is True, then the operator
picked up a global phase of \(\pi\)
- Return type
(bool, str)