Binary phase representation of a Pauli string (source code)

= Binary phase representation of a Pauli string
{title2=$P=i^s\bigotimes_jX^{a_j}Z^{b_j}$}

Store a <Pauli group> element with binary exponents $a_j,b_j$ and a phase exponent $s$ modulo four. This ordered $XZ$ convention uses $2n+2$ bits for $n$ <qubits>. Since $XZ=-iY$, phase factors are essential when converting to Hermitian <Pauli operators> and evaluating measurement probabilities.