Pauli gates
The X, Y and Z single-qubit unitaries that also form the basic nonidentity Pauli observables.
On this page
Definition and significance
Pauli gates serve two closely related roles. As unitaries they transform quantum states; as Hermitian observables they define measurements with outcomes +1 and -1. The same matrix can have both roles, but applying X is not the same physical instruction as measuring X. Pauli products supply a useful language for Hamiltonians, error models, stabilizers and quantum software.
Mechanism and mathematical treatment
The matrices are X=[[0,1],[1,0]], Y=[[0,-i],[i,0]], and Z=[[1,0],[0,-1]]. Each squares to I, each is Hermitian and each has eigenvalues +1 and -1. Their products obey XY=iZ, YZ=iX, ZX=iY; reversing an order changes the sign. Thus distinct nonidentity single-qubit Paulis anticommute.
Writing a state as rho=(I+rx X+ry Y+rz Z)/2 gives the expectation values <X>=rx, <Y>=ry and <Z>=rz. A Pauli gate conjugates this state. For example, XZX=-Z and XYX=-Y, so X reverses the y and z Bloch coordinates while retaining x. Global factors such as -i do not affect an isolated state's predictions, but can become relative phases when the operation is controlled.
Fully worked reference example
Let |psi>=(sqrt(3)/2)|0>+(i/2)|1>. Its probabilities in the computational basis are 3/4 and 1/4. The expectation <Z> is therefore 1/2. Also <X>=2 Re(a* b)=0 and <Y>=2 Im(a* b)=sqrt(3)/2. The Bloch-vector norm is sqrt(0+3/4+1/4)=1, as expected for a pure state.
Applying X gives (i/2)|0>+(sqrt(3)/2)|1>. Now <Z>=-1/2 and <Y>=-sqrt(3)/2. Applying Y instead gives (1/2)|0>+(i sqrt(3)/2)|1>. The changed amplitudes and phases follow directly from the matrix; “bit flip plus phase flip” is a useful mnemonic only when its global factor is handled consistently.
Limitations and common misconceptions
A Pauli error model approximates certain noise processes; it does not exhaust coherent over-rotations, leakage or general amplitude damping. Randomizing a noise process into a Pauli channel changes its representation and sometimes its operational behavior. A multi-qubit Pauli string is a tensor product, while a sequence of Paulis on one qubit is matrix multiplication; the distinction must remain visible in notation.
Scientific relationships
Pauli matrices generate axis rotations through exponentiation.
Pauli observables determine signed measurement outcomes.
Binary labels with a separate phase register
An n-qubit Pauli product can be represented by two binary vectors x and z together with a phase i^p. Choose the convention P=i^p X^x Z^z, with every X factor written before every Z factor on its qubit. The phase register is essential because XZ=-iY. For two represented operators, multiplication gives P(x,z,p)P(x',z',p')=P(x XOR x',z XOR z',p+p'+2 z dot x'), with the final phase exponent taken modulo four. The extra sign appears when a Z from the left operator passes an X from the right operator.
For a solved two-qubit example, represent Y tensor X by x=(1,1), z=(1,0), p=1, and Z tensor Y by x'=(0,1), z'=(1,1), p'=1. The dot product z dot x' is zero. The product has x''=(1,0), z''=(0,1), p''=2, so it is -X tensor Z. Direct local multiplication gives YZ=iX and XY=iZ; their tensor product is likewise -X tensor Z. The binary calculation and the matrix calculation therefore agree, including the easily lost sign.
The commutation test follows by comparing the two product orders. They differ by (-1)^[x dot z'+z dot x']. In the example the exponent is zero modulo two, so the two strings commute even though their local factors anticommute on both qubits. Counting local anticommutations modulo two is often the clearest manual check.
A commuting pair that still needs a joint basis
Consider A=X tensor X and B=Z tensor Z. They commute globally because their factors anticommute at two sites. The Bell states jointly diagonalize them. For |Phi+>=(|00>+|11>)/sqrt(2), both eigenvalues are +1. For |Phi-> they are -1 and +1; for |Psi+> they are +1 and -1; and for |Psi-> both are -1. These four labels completely specify the two commuting outcomes.
Apply a CNOT from q0 to q1 followed by H on q0. This maps |Phi+>, |Phi->, |Psi+>, |Psi-> to |00>, |10>, |01>, |11>, respectively. Computational measurement therefore reads the X tensor X eigenvalue as (-1)^q0 and the Z tensor Z eigenvalue as (-1)^q1. The circuit is the inverse of Bell-state preparation. It is a joint measurement of two commuting observables, not two independent local choices of X or Z basis on the same physical copy.
The product AB is -Y tensor Y. Consequently, the product of the two recorded eigenvalues estimates -Y tensor Y on the same shots. For |Phi+>, this predicts <Y tensor Y>=-1. A signless Pauli representation would incorrectly predict +1 and could corrupt a Hamiltonian expectation even while all measured bit strings looked plausible. This is why a simulator or compiler must track the phase of a Pauli product when multiplying observables or propagating them through gates.
Deriving an observable and its statistical cost
Let H=0.7 X tensor X-0.2 Z tensor Z+0.3 Y tensor Y. In the Bell basis, substitute Y tensor Y=-AB to obtain the per-shot estimator h(a,b)=0.7a-0.2b-0.3ab, where a,b are each plus or minus one. Its four possible values are 0.2, -0.6, 1.2 and -0.8 in the Bell-state order above. Their sum is zero, matching the zero trace of H. For an equal mixture of |Phi+> and |Psi+>, the mean is 0.7 and the variance is [(0.2-0.7)^2+(1.2-0.7)^2]/2=0.25.
With N independent preparations, the sample mean has variance 0.25/N. Measuring the three terms in unrelated batches would discard the available covariance information and lead to a different allocation problem. The advantage of this joint measurement is not guaranteed solely by commutation: its entangling basis-change circuit may introduce extra noise. The ideal variance calculation identifies a possible benefit, while a hardware comparison must include the actual measurement circuit.
A classical exact alternative diagonalizes the four-by-four H or simply uses the four values already derived. For large Pauli sums, binary multiplication and commutation checks require work proportional to the string length, or fewer machine operations with bit packing. This is much cheaper than forming dense matrices of dimension 2^n. The representation remains a description of operators; it does not by itself supply an efficient simulator for arbitrary states acted upon by those operators.
Sources
Verification scope
Selected source text checked ·
Source anchors gate-decomposition conventions. New worked instances are independent mathematical constructions, not reported experiments.