|q⟩ Bad Qubits

beginner · Physics · Observables, Operators & Measurement

Commutators

Given two operators A^\hat{A} and B^\hat{B}, their commutator is defined as

[A^,B^]  =  A^B^B^A^.[\hat{A},\,\hat{B}] \;=\; \hat{A}\hat{B} - \hat{B}\hat{A}.

The result is itself an operator. If [A^,B^]=0[\hat{A},\hat{B}] = 0 the operators commute; if the commutator is non-zero they do not.

Why commutators matter

In quantum mechanics an observable is represented by a Hermitian operator. Two observables can be measured simultaneously with arbitrary precision if and only if their operators commute. When [A^,B^]0[\hat{A},\hat{B}] \ne 0 the Robertson uncertainty relation imposes a lower bound on the product of their standard deviations:

σAσB    12[A^,B^].\sigma_A\,\sigma_B \;\ge\; \frac{1}{2}\bigl|\langle[\hat{A},\hat{B}]\rangle\bigr|.

The most famous example is position and momentum. In one dimension,

[x^,p^]=i,[\hat{x},\,\hat{p}] = i\hbar,

which leads directly to Heisenberg's uncertainty principle σxσp/2\sigma_x\,\sigma_p \ge \hbar/2.

Computing a commutator by hand

Take two 2×22\times 2 matrices. The commutator is computed by ordinary matrix multiplication, then subtraction. Consider the Pauli operators

X=(0110),Z=(1001).X = \begin{pmatrix}0&1\\1&0\end{pmatrix},\qquad Z = \begin{pmatrix}1&0\\0&-1\end{pmatrix}.

First multiply in the order XZXZ:

XZ=(01+1000+1(1)11+0010+0(1))=(0110).XZ = \begin{pmatrix}0\cdot1+1\cdot0 & 0\cdot0+1\cdot(-1)\\1\cdot1+0\cdot0 & 1\cdot0+0\cdot(-1)\end{pmatrix} = \begin{pmatrix}0&-1\\1&0\end{pmatrix}.

Then multiply in the reverse order ZXZX:

ZX=(10+0111+0000+(1)101+(1)0)=(0110).ZX = \begin{pmatrix}1\cdot0+0\cdot1 & 1\cdot1+0\cdot0\\0\cdot0+(-1)\cdot1 & 0\cdot1+(-1)\cdot0\end{pmatrix} = \begin{pmatrix}0&1\\-1&0\end{pmatrix}.

Subtracting,

[X,Z]=XZZX=(00111(1)00)=(0220).[X,Z] = XZ - ZX = \begin{pmatrix}0-0 & -1-1\\ 1-(-1) & 0-0\end{pmatrix} = \begin{pmatrix}0&-2\\2&0\end{pmatrix}.

This equals 2iY-2iY where Y=(0ii0)Y = \begin{pmatrix}0&-i\\i&0\end{pmatrix} is the Pauli-YY operator (you can verify: 2i(0ii0)=(0220)-2i \cdot \begin{pmatrix}0&-i\\i&0\end{pmatrix} = \begin{pmatrix}0&-2\\2&0\end{pmatrix}). In general the three Pauli operators satisfy

[X,Y]=2iZ,[Y,Z]=2iX,[Z,X]=2iY,[X,Y]=2iZ,\qquad [Y,Z]=2iX,\qquad [Z,X]=2iY,

a cyclic pattern that mirrors the cross-product relations for angular momentum. Since no two Pauli operators commute, no two of the corresponding spin components can be simultaneously sharp — a concrete physical consequence of non-commutativity.

Try it

This is a numerical exercise — your code should return a number. Using the matrices above, [X,Z]=(0220)[X,Z] = \begin{pmatrix}0&-2\\2&0\end{pmatrix}. The (1,0)(1,0) entry (row 1, column 0) of this commutator is 22. Return that entry divided by 22.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.