Fundamental Mathematics of Quantum Computing III

Abstract

This section introduces the mathematical foundations of quantum gates and qubit transformations. It covers Pauli operators, phase and basis changes, gate composition, tensor-product operations, and CNOT, culminating in the construction of a Bell state and the transition to entanglement.

Published
Reading time
14 min
Level
Introductory

Share article

Pauli Operators, Quantum Gates, and Qubit Transformations

Core question: How do we deliberately transform a quantum state?

A quantum computation does not only measure a state.
Before measurement, we deliberately transform the state using quantum gates.

For a state ∣ψ⟩|\psi\rangle, a gate UU produces

∣ψ′⟩=U∣ψ⟩.|\psi'\rangle = U|\psi\rangle.

The central mathematical requirement is that UU is unitary.


1. Why Quantum Gates Must Be Unitary

A normalized quantum state satisfies

⟨ψ∣ψ⟩=1.\langle \psi|\psi\rangle = 1.

After applying UU,

∣ψ′⟩=U∣ψ⟩.|\psi'\rangle = U|\psi\rangle.

Then

⟨ψ′∣ψ′⟩=(U∣ψ⟩)†(U∣ψ⟩)=⟨ψ∣U†U∣ψ⟩.\begin{aligned} \langle \psi'|\psi'\rangle &= (U|\psi\rangle)^\dagger(U|\psi\rangle)\\ &= \langle\psi|U^\dagger U|\psi\rangle. \end{aligned}

If

U†U=I,U^\dagger U = I,

then

⟨ψ′∣ψ′⟩=⟨ψ∣I∣ψ⟩=⟨ψ∣ψ⟩=1.\begin{aligned} \langle \psi'|\psi'\rangle &= \langle\psi|I|\psi\rangle\\ &= \langle\psi|\psi\rangle\\ &= 1. \end{aligned}

Therefore,

∥Uψ∥=∥ψ∥.\boxed{\|U\psi\|=\|\psi\|}.

Simple English: A unitary gate changes the state without destroying its normalization.
The total probability remains 11.

A stronger statement is that unitary operators preserve inner products:

⟨Uϕ∣Uψ⟩=⟨ϕ∣U†U∣ψ⟩=⟨ϕ∣ψ⟩.\langle U\phi|U\psi\rangle = \langle\phi|U^\dagger U|\psi\rangle = \langle\phi|\psi\rangle.

So the geometry of the state space is preserved.


2. Computational Basis

For a single qubit,

∣0⟩=(10),∣1⟩=(01).|0\rangle = \begin{pmatrix} 1\\ 0 \end{pmatrix}, \qquad |1\rangle = \begin{pmatrix} 0\\ 1 \end{pmatrix}.

A general qubit is

∣ψ⟩=α∣0⟩+β∣1⟩,|\psi\rangle = \alpha|0\rangle+\beta|1\rangle,

with normalization

∣α∣2+∣β∣2=1.|\alpha|^2+|\beta|^2=1.

3. Pauli XX: Bit Flip

The Pauli XX matrix is

X=(0110).\boxed{ X= \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix} }.

3.1 Derivation of X∣0⟩X|0\rangle

X∣0⟩=(0110)(10).X|0\rangle = \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix} \begin{pmatrix} 1\\ 0 \end{pmatrix}.

Compute each entry:

0⋅1+1⋅0=0,0\cdot1+1\cdot0=0, 1⋅1+0⋅0=1.1\cdot1+0\cdot0=1.

Therefore,

X∣0⟩=(01)=∣1⟩.X|0\rangle = \begin{pmatrix} 0\\ 1 \end{pmatrix} = |1\rangle.

Hence

X∣0⟩=∣1⟩.\boxed{X|0\rangle=|1\rangle}.

Similarly,

X∣1⟩=∣0⟩.\boxed{X|1\rangle=|0\rangle}.

Simple English: XX exchanges the two computational-basis states.
It behaves like a classical NOT gate on ∣0⟩|0\rangle and ∣1⟩|1\rangle.


4. Pauli XX on a Superposition

Let

∣ψ⟩=α∣0⟩+β∣1⟩.|\psi\rangle = \alpha|0\rangle+\beta|1\rangle.

Because XX is linear,

X∣ψ⟩=X(α∣0⟩+β∣1⟩)=αX∣0⟩+βX∣1⟩=α∣1⟩+β∣0⟩.\begin{aligned} X|\psi\rangle &= X(\alpha|0\rangle+\beta|1\rangle)\\ &= \alpha X|0\rangle+\beta X|1\rangle\\ &= \alpha|1\rangle+\beta|0\rangle. \end{aligned}

Reordering the basis terms,

X∣ψ⟩=β∣0⟩+α∣1⟩.\boxed{ X|\psi\rangle = \beta|0\rangle+\alpha|1\rangle }.

In matrix form,

(0110)(αβ)=(βα).\begin{pmatrix} 0&1\\ 1&0 \end{pmatrix} \begin{pmatrix} \alpha\\ \beta \end{pmatrix} = \begin{pmatrix} \beta\\ \alpha \end{pmatrix}.

Simple English: XX swaps the amplitudes.

Worked Example

Take

∣ψ⟩=32∣0⟩+12∣1⟩.|\psi\rangle = \frac{\sqrt3}{2}|0\rangle + \frac12|1\rangle.

Before applying XX,

P(0)=∣32∣2=34,P(0) = \left|\frac{\sqrt3}{2}\right|^2 = \frac34, P(1)=∣12∣2=14.P(1) = \left|\frac12\right|^2 = \frac14.

After applying XX,

X∣ψ⟩=12∣0⟩+32∣1⟩.X|\psi\rangle = \frac12|0\rangle + \frac{\sqrt3}{2}|1\rangle.

Therefore,

P(0)=14,P(1)=34.P(0)=\frac14, \qquad P(1)=\frac34.

So the two computational-basis probabilities are exchanged.


5. Pauli ZZ: Phase Flip

The Pauli ZZ matrix is

Z=(100−1).\boxed{ Z= \begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix} }.

Its action on the computational basis is

Z∣0⟩=∣0⟩,Z|0\rangle=|0\rangle, Z∣1⟩=−∣1⟩.Z|1\rangle=-|1\rangle.

For a general state,

∣ψ⟩=α∣0⟩+β∣1⟩,|\psi\rangle = \alpha|0\rangle+\beta|1\rangle,

we obtain

Z∣ψ⟩=α∣0⟩−β∣1⟩.\boxed{ Z|\psi\rangle = \alpha|0\rangle-\beta|1\rangle }.

The magnitudes of the amplitudes do not change.

Only the phase of the ∣1⟩|1\rangle component changes.


6. Why a Minus Sign Is a Phase

Euler's formula is

eiθ=cos⁡θ+isin⁡θ.e^{i\theta} = \cos\theta+i\sin\theta.

For θ=π\theta=\pi,

eiπ=cos⁡π+isin⁡π=−1.e^{i\pi} = \cos\pi+i\sin\pi = -1.

Therefore,

−1=eiπ.\boxed{-1=e^{i\pi}}.

So multiplying an amplitude by −1-1 is equivalent to rotating its complex phase by π\pi.

Simple English: ZZ does not change the size of the amplitude.
It changes its phase.


7. Global Phase vs. Relative Phase

7.1 Global Phase

Consider

∣ψ⟩⟶eiθ∣ψ⟩.|\psi\rangle \longrightarrow e^{i\theta}|\psi\rangle.

For any measurement state ∣k⟩|k\rangle,

P(k)=∣⟨k∣eiθψ⟩∣2=∣eiθ⟨k∣ψ⟩∣2=∣eiθ∣2∣⟨k∣ψ⟩∣2=∣⟨k∣ψ⟩∣2.\begin{aligned} P(k) &= \left| \langle k|e^{i\theta}\psi\rangle \right|^2\\ &= \left| e^{i\theta} \langle k|\psi\rangle \right|^2\\ &= |e^{i\theta}|^2 |\langle k|\psi\rangle|^2\\ &= |\langle k|\psi\rangle|^2. \end{aligned}

Since

∣eiθ∣=1,|e^{i\theta}|=1,

the measurement probabilities are unchanged.

Thus

∣ψ⟩∼eiθ∣ψ⟩\boxed{ |\psi\rangle \sim e^{i\theta}|\psi\rangle }

as physical pure states.

Simple English: If every amplitude rotates by the same phase, the physical state does not change.

7.2 Relative Phase

Compare

α∣0⟩+β∣1⟩\alpha|0\rangle+\beta|1\rangle

with

α∣0⟩−β∣1⟩.\alpha|0\rangle-\beta|1\rangle.

Only one component changes phase.

That changes the phase relation between the two amplitudes.

This relative phase can affect later interference.


8. Relative Phase Is Observable

Define

∣+⟩=∣0⟩+∣1⟩2,|+\rangle = \frac{|0\rangle+|1\rangle}{\sqrt2}, ∣−⟩=∣0⟩−∣1⟩2.|-\rangle = \frac{|0\rangle-|1\rangle}{\sqrt2}.

Apply ZZ to ∣+⟩|+\rangle:

Z∣+⟩=12(Z∣0⟩+Z∣1⟩)=12(∣0⟩−∣1⟩)=∣−⟩.\begin{aligned} Z|+\rangle &= \frac1{\sqrt2} \left( Z|0\rangle+Z|1\rangle \right)\\ &= \frac1{\sqrt2} \left( |0\rangle-|1\rangle \right)\\ &= |-\rangle. \end{aligned}

Therefore,

Z∣+⟩=∣−⟩.\boxed{Z|+\rangle=|-\rangle}.

Now compute the overlap:

⟨+∣−⟩=12(⟨0∣+⟨1∣)(∣0⟩−∣1⟩)=12(⟨0∣0⟩−⟨0∣1⟩+⟨1∣0⟩−⟨1∣1⟩).\begin{aligned} \langle+|-\rangle &= \frac12 (\langle0|+\langle1|) (|0\rangle-|1\rangle)\\ &= \frac12 \left( \langle0|0\rangle - \langle0|1\rangle + \langle1|0\rangle - \langle1|1\rangle \right). \end{aligned}

Using orthonormality,

⟨0∣0⟩=1,⟨1∣1⟩=1,\langle0|0\rangle=1, \qquad \langle1|1\rangle=1, ⟨0∣1⟩=⟨1∣0⟩=0.\langle0|1\rangle = \langle1|0\rangle = 0.

Hence

⟨+∣−⟩=12(1−1)=0.\langle+|-\rangle = \frac12(1-1) = 0.

Therefore,

⟨+∣−⟩=0.\boxed{\langle+|-\rangle=0}.

Simple English: Changing only one relative phase transformed ∣+⟩|+\rangle into an orthogonal state ∣−⟩|-\rangle.
Relative phase becomes observable through interference and basis changes.


9. Pauli YY: Bit Flip with Phase

The Pauli YY matrix is

Y=(0−ii0).\boxed{ Y= \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix} }.

Its basis action is

Y∣0⟩=i∣1⟩,Y|0\rangle=i|1\rangle, Y∣1⟩=−i∣0⟩.Y|1\rangle=-i|0\rangle.

So YY flips the basis state and adds a phase.


10. Deriving Y=iXZY=iXZ

Compute

XZ=(0110)(100−1).XZ = \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix} \begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix}.

Therefore,

XZ=(0−110).XZ = \begin{pmatrix} 0&-1\\ 1&0 \end{pmatrix}.

Multiply by ii:

iXZ=(0−ii0).iXZ = \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix}.

Thus,

Y=iXZ.\boxed{Y=iXZ}.

Also,

ZX=−XZ,ZX = - XZ,

so

XZ=−ZX.XZ=-ZX.

Therefore,

Y=iXZ=−iZX.\boxed{Y=iXZ=-iZX}.

Simple English: YY combines a bit flip and a phase change.
This also shows that XX and ZZ do not commute.


11. Pauli Matrices Are Hermitian

A matrix AA is Hermitian when

A†=A.A^\dagger=A.

For XX,

X†=X.X^\dagger=X.

For ZZ,

Z†=Z.Z^\dagger=Z.

For YY,

Y=(0−ii0).Y= \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix}.

Take the complex conjugate:

Y‾=(0i−i0).\overline{Y} = \begin{pmatrix} 0&i\\ -i&0 \end{pmatrix}.

Then transpose:

Y†=(0−ii0)=Y.Y^\dagger = \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix} = Y.

Therefore,

X†=X,Y†=Y,Z†=Z.\boxed{ X^\dagger=X, \qquad Y^\dagger=Y, \qquad Z^\dagger=Z }.

Simple English: Because the Pauli matrices are Hermitian, they can represent observables.


12. Pauli Matrices Are Also Unitary

First,

X2=(0110)2=I.X^2 = \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix}^2 = I.

Similarly,

Y2=I,Z2=I.Y^2=I, \qquad Z^2=I.

Since every Pauli matrix PP is Hermitian,

P†=P.P^\dagger=P.

Therefore,

P†P=P2=I.P^\dagger P = P^2 = I.

Hence

X,  Y,  Z are unitary.\boxed{ X,\;Y,\;Z \text{ are unitary} }.

Important: Hermitian does not imply unitary in general.
The Pauli matrices are unitary because they are Hermitian and satisfy P2=IP^2=I.


13. Why Pauli Eigenvalues Are ±1\pm1

Let PP be a Pauli operator.

Since

P2=I,P^2=I,

suppose

P∣ψ⟩=λ∣ψ⟩.P|\psi\rangle = \lambda|\psi\rangle.

Apply PP again:

P2∣ψ⟩=Pλ∣ψ⟩.P^2|\psi\rangle = P\lambda|\psi\rangle.

Because λ\lambda is a scalar,

P2∣ψ⟩=λP∣ψ⟩.P^2|\psi\rangle = \lambda P|\psi\rangle.

Using the eigenvalue equation again,

P2∣ψ⟩=λ2∣ψ⟩.P^2|\psi\rangle = \lambda^2|\psi\rangle.

But

P2=I.P^2=I.

Hence

∣ψ⟩=λ2∣ψ⟩.|\psi\rangle = \lambda^2|\psi\rangle.

Since an eigenvector is nonzero,

λ2=1.\lambda^2=1.

Therefore,

λ=±1.\boxed{\lambda=\pm1}.

Simple English: Because applying a Pauli operator twice gives the identity, its eigenvalues can only square to 11.


14. The ZZ-Basis

We already know

Z∣0⟩=+∣0⟩,Z|0\rangle=+|0\rangle, Z∣1⟩=−∣1⟩.Z|1\rangle=-|1\rangle.

Therefore,

Z-basis={∣0⟩,∣1⟩}.\boxed{ Z\text{-basis} = \{|0\rangle,|1\rangle\} }.

The corresponding eigenvalues are

+1,−1.+1,\quad -1.

15. Deriving the XX-Eigenbasis

Let

∣v⟩=(ab).|v\rangle = \begin{pmatrix} a\\ b \end{pmatrix}.

Solve

X∣v⟩=λ∣v⟩.X|v\rangle = \lambda|v\rangle.

The left-hand side is

X∣v⟩=(0110)(ab)=(ba).X|v\rangle = \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix} \begin{pmatrix} a\\ b \end{pmatrix} = \begin{pmatrix} b\\ a \end{pmatrix}.

The right-hand side is

λ∣v⟩=(λaλb).\lambda|v\rangle = \begin{pmatrix} \lambda a\\ \lambda b \end{pmatrix}.

Therefore,

b=λa,a=λb.b=\lambda a, \qquad a=\lambda b.

15.1 Eigenvalue +1+1

If

λ=1,\lambda=1,

then

b=a.b=a.

So an eigenvector is

(11).\begin{pmatrix} 1\\ 1 \end{pmatrix}.

Its norm is

12+12=2.\sqrt{1^2+1^2} = \sqrt2.

Therefore the normalized eigenvector is

∣+⟩=12(11)=∣0⟩+∣1⟩2.\boxed{ |+\rangle = \frac1{\sqrt2} \begin{pmatrix} 1\\ 1 \end{pmatrix} = \frac{|0\rangle+|1\rangle}{\sqrt2} }.

15.2 Eigenvalue −1-1

If

λ=−1,\lambda=-1,

then

b=−a.b=-a.

A normalized eigenvector is

∣−⟩=12(1−1)=∣0⟩−∣1⟩2.\boxed{ |-\rangle = \frac1{\sqrt2} \begin{pmatrix} 1\\ -1 \end{pmatrix} = \frac{|0\rangle-|1\rangle}{\sqrt2} }.

Thus,

X∣+⟩=+∣+⟩,\boxed{ X|+\rangle=+|+\rangle }, X∣−⟩=−∣−⟩.\boxed{ X|-\rangle=-|-\rangle }.

Simple English: The XX-basis is the eigenbasis of the Pauli XX operator.


16. Hadamard Gate

The Hadamard gate is

H=12(111−1).\boxed{ H = \frac1{\sqrt2} \begin{pmatrix} 1&1\\ 1&-1 \end{pmatrix} }.

Apply it to ∣0⟩|0\rangle:

H∣0⟩=12(111−1)(10)=12(11)=∣+⟩.\begin{aligned} H|0\rangle &= \frac1{\sqrt2} \begin{pmatrix} 1&1\\ 1&-1 \end{pmatrix} \begin{pmatrix} 1\\ 0 \end{pmatrix}\\ &= \frac1{\sqrt2} \begin{pmatrix} 1\\ 1 \end{pmatrix}\\ &= |+\rangle. \end{aligned}

So

H∣0⟩=∣+⟩.\boxed{H|0\rangle=|+\rangle}.

Similarly,

H∣1⟩=∣−⟩.\boxed{H|1\rangle=|-\rangle}.

Therefore,

H:Z-basis⟷X-basis.\boxed{ H: Z\text{-basis} \longleftrightarrow X\text{-basis} }.

Simple English: Hadamard is more precisely a basis-change gate than merely a “superposition maker.”


17. Proof That H2=IH^2=I

Compute

H2=12(111−1)(111−1).H^2 = \frac12 \begin{pmatrix} 1&1\\ 1&-1 \end{pmatrix} \begin{pmatrix} 1&1\\ 1&-1 \end{pmatrix}.

The entries are

1⋅1+1⋅1=2,1\cdot1+1\cdot1=2, 1⋅1+1⋅(−1)=0,1\cdot1+1\cdot(-1)=0, 1⋅1+(−1)⋅1=0,1\cdot1+(-1)\cdot1=0, 1⋅1+(−1)(−1)=2.1\cdot1+(-1)(-1)=2.

Therefore,

H2=12(2002)=I.H^2 = \frac12 \begin{pmatrix} 2&0\\ 0&2 \end{pmatrix} = I.

Hence

H2=I,\boxed{H^2=I},

and therefore

H−1=H.\boxed{H^{-1}=H}.

So

H∣+⟩=∣0⟩,H|+\rangle=|0\rangle, H∣−⟩=∣1⟩.H|-\rangle=|1\rangle.

18. Measuring in the XX-Basis

Suppose

∣ψ⟩=α∣+⟩+β∣−⟩.|\psi\rangle = \alpha|+\rangle+\beta|-\rangle.

Apply HH:

H∣ψ⟩=αH∣+⟩+βH∣−⟩=α∣0⟩+β∣1⟩.\begin{aligned} H|\psi\rangle &= \alpha H|+\rangle+\beta H|-\rangle\\ &= \alpha|0\rangle+\beta|1\rangle. \end{aligned}

Now measure in the computational basis.

Therefore,

X-basis measurement=H+Z-basis measurement.\boxed{ X\text{-basis measurement} = H + Z\text{-basis measurement} }.

Simple English: Rotate the XX-basis into the computational basis, then perform the usual measurement.

Worked Example

Take

∣ψ⟩=32∣+⟩+12∣−⟩.|\psi\rangle = \frac{\sqrt3}{2}|+\rangle + \frac12|-\rangle.

Applying HH,

H∣ψ⟩=32∣0⟩+12∣1⟩.H|\psi\rangle = \frac{\sqrt3}{2}|0\rangle + \frac12|1\rangle.

Therefore,

P(+)=34,P(−)=14.P(+)=\frac34, \qquad P(-)=\frac14.

The XX-basis probabilities become ordinary computational-basis probabilities after HH.


19. Phase Gate SS

The SS gate is

S=(100i).\boxed{ S= \begin{pmatrix} 1&0\\ 0&i \end{pmatrix} }.

Since

i=eiπ/2,i=e^{i\pi/2},

we have

S∣0⟩=∣0⟩,S|0\rangle=|0\rangle, S∣1⟩=i∣1⟩.S|1\rangle=i|1\rangle.

Therefore,

S(α∣0⟩+β∣1⟩)=α∣0⟩+iβ∣1⟩.S(\alpha|0\rangle+\beta|1\rangle) = \alpha|0\rangle+i\beta|1\rangle.

So SS changes the relative phase by

π/2.\boxed{\pi/2}.

20. TT Gate

The TT gate is

T=(100eiπ/4).\boxed{ T= \begin{pmatrix} 1&0\\ 0&e^{i\pi/4} \end{pmatrix} }.

Thus,

T∣0⟩=∣0⟩,T|0\rangle=|0\rangle, T∣1⟩=eiπ/4∣1⟩.T|1\rangle=e^{i\pi/4}|1\rangle.

For a general state,

T(α∣0⟩+β∣1⟩)=α∣0⟩+eiπ/4β∣1⟩.T( \alpha|0\rangle+\beta|1\rangle ) = \alpha|0\rangle + e^{i\pi/4}\beta|1\rangle.

So the relative phase changes by

π/4.\boxed{\pi/4}.

The phase gates satisfy

T2=S,\boxed{T^2=S},

because

(eiπ/4)2=eiπ/2=i.\left(e^{i\pi/4}\right)^2 = e^{i\pi/2} = i.

Similarly,

S2=Z,\boxed{S^2=Z},

because

i2=−1.i^2=-1.

21. Gate Composition

Suppose U1U_1 acts first:

∣ψ1⟩=U1∣ψ⟩.|\psi_1\rangle = U_1|\psi\rangle.

Then U2U_2 acts:

∣ψ2⟩=U2∣ψ1⟩.|\psi_2\rangle = U_2|\psi_1\rangle.

Substitute the first equation:

∣ψ2⟩=U2(U1∣ψ⟩).|\psi_2\rangle = U_2(U_1|\psi\rangle).

By associativity,

∣ψ2⟩=(U2U1)∣ψ⟩.|\psi_2\rangle = (U_2U_1)|\psi\rangle.

Therefore,

Utotal=U2U1.\boxed{ U_{\mathrm{total}} = U_2U_1 }.

Simple English: If U1U_1 happens first and U2U_2 happens second, the matrix product is U2U1U_2U_1.
The rightmost operator acts first.


22. Gate Order Matters: HZ≠ZHHZ\neq ZH

Compute

HZ=12(111−1)(100−1).HZ = \frac1{\sqrt2} \begin{pmatrix} 1&1\\ 1&-1 \end{pmatrix} \begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix}.

Therefore,

HZ=12(1−111).\boxed{ HZ = \frac1{\sqrt2} \begin{pmatrix} 1&-1\\ 1&1 \end{pmatrix} }.

Now reverse the order:

ZH=(100−1)12(111−1).ZH = \begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix} \frac1{\sqrt2} \begin{pmatrix} 1&1\\ 1&-1 \end{pmatrix}.

Hence

ZH=12(11−11).\boxed{ ZH = \frac1{\sqrt2} \begin{pmatrix} 1&1\\ -1&1 \end{pmatrix} }.

Thus,

HZ≠ZH.\boxed{HZ\neq ZH}.

State Example

Start from ∣0⟩|0\rangle.

First ZZ, then HH:

HZ∣0⟩=H∣0⟩=∣+⟩.HZ|0\rangle = H|0\rangle = |+\rangle.

First HH, then ZZ:

ZH∣0⟩=Z∣+⟩=∣−⟩.ZH|0\rangle = Z|+\rangle = |-\rangle.

Therefore,

HZ∣0⟩=∣+⟩,\boxed{ HZ|0\rangle=|+\rangle },

while

ZH∣0⟩=∣−⟩.\boxed{ ZH|0\rangle=|-\rangle }.

Simple English: Quantum gate order is part of the computation.
Swapping two gates can produce a completely different state.


23. Two-Qubit State Space

For two qubits,

H=C2⊗C2.\mathcal H = \mathbb C^2\otimes\mathbb C^2.

The computational basis is

∣00⟩,∣01⟩,∣10⟩,∣11⟩.|00\rangle,\quad |01\rangle,\quad |10\rangle,\quad |11\rangle.

For product states,

∣a⟩⊗∣b⟩|a\rangle\otimes|b\rangle

describes the combined two-qubit system.


24. Applying a Gate to Only One Qubit

The tensor-product rule is

(A⊗B)(∣a⟩⊗∣b⟩)=A∣a⟩⊗B∣b⟩.\boxed{ (A\otimes B) (|a\rangle\otimes|b\rangle) = A|a\rangle\otimes B|b\rangle }.

To apply XX only to the first qubit,

X⊗I.X\otimes I.

For example,

(X⊗I)∣00⟩=X∣0⟩⊗I∣0⟩=∣1⟩⊗∣0⟩=∣10⟩.\begin{aligned} (X\otimes I)|00\rangle &= X|0\rangle\otimes I|0\rangle\\ &= |1\rangle\otimes|0\rangle\\ &= |10\rangle. \end{aligned}

Therefore,

(X⊗I)∣00⟩=∣10⟩.\boxed{ (X\otimes I)|00\rangle = |10\rangle }.

25. Deriving the Matrix X⊗IX\otimes I

We have

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

By the Kronecker product,

X⊗I=(0I1I1I0I).X\otimes I = \begin{pmatrix} 0I&1I\\ 1I&0I \end{pmatrix}.

Therefore,

X⊗I=(0010000110000100).\boxed{ X\otimes I = \begin{pmatrix} 0&0&1&0\\ 0&0&0&1\\ 1&0&0&0\\ 0&1&0&0 \end{pmatrix} }.

Simple English: Tensor products let us extend a local one-qubit operation to the full multi-qubit state space.


26. Controlled-NOT Gate

CNOT has

  • a control qubit,
  • a target qubit.

Its basis action is

∣00⟩→∣00⟩,|00\rangle\rightarrow|00\rangle, ∣01⟩→∣01⟩,|01\rangle\rightarrow|01\rangle, ∣10⟩→∣11⟩,|10\rangle\rightarrow|11\rangle, ∣11⟩→∣10⟩.|11\rangle\rightarrow|10\rangle.

If the control is cc and the target is tt,

∣c,t⟩⟶∣c,t⊕c⟩,\boxed{ |c,t\rangle \longrightarrow |c,t\oplus c\rangle },

where ⊕\oplus is XOR.

Simple English: If the control is 11, flip the target.
If the control is 00, leave the target unchanged.


27. Building the CNOT Matrix from Basis Images

Use the ordered basis

∣00⟩,  ∣01⟩,  ∣10⟩,  ∣11⟩.|00\rangle,\; |01\rangle,\; |10\rangle,\; |11\rangle.

A linear operator is determined by its action on the basis.

For a matrix MM,

Mej=mj,Me_j=m_j,

where mjm_j is the jj-th column.

Therefore:

∣00⟩→∣00⟩|00\rangle\rightarrow|00\rangle

gives column 1,

(1000).\begin{pmatrix} 1\\0\\0\\0 \end{pmatrix}. ∣01⟩→∣01⟩|01\rangle\rightarrow|01\rangle

gives column 2,

(0100).\begin{pmatrix} 0\\1\\0\\0 \end{pmatrix}. ∣10⟩→∣11⟩|10\rangle\rightarrow|11\rangle

gives column 3,

(0001).\begin{pmatrix} 0\\0\\0\\1 \end{pmatrix}. ∣11⟩→∣10⟩|11\rangle\rightarrow|10\rangle

gives column 4,

(0010).\begin{pmatrix} 0\\0\\1\\0 \end{pmatrix}.

Thus,

CNOT⁡=(1000010000010010).\boxed{ \operatorname{CNOT} = \begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{pmatrix} }.

28. Why CNOT Is Unitary

The columns of the CNOT matrix are

(1000),(0100),(0001),(0010).\begin{pmatrix}1\\0\\0\\0\end{pmatrix}, \quad \begin{pmatrix}0\\1\\0\\0\end{pmatrix}, \quad \begin{pmatrix}0\\0\\0\\1\end{pmatrix}, \quad \begin{pmatrix}0\\0\\1\\0\end{pmatrix}.

These form an orthonormal basis.

Therefore,

CNOT⁡†CNOT⁡=I.\boxed{ \operatorname{CNOT}^\dagger \operatorname{CNOT} = I }.

Hence CNOT is unitary.


29. Why CNOT⁡2=I\operatorname{CNOT}^2=I

Apply CNOT twice.

For example,

∣10⟩→∣11⟩→∣10⟩.|10\rangle \rightarrow |11\rangle \rightarrow |10\rangle.

Similarly, every computational-basis state returns to itself after two applications.

Therefore,

CNOT⁡2=I.\boxed{ \operatorname{CNOT}^2=I }.

Hence,

CNOT⁡−1=CNOT⁡.\boxed{ \operatorname{CNOT}^{-1} = \operatorname{CNOT} }.

30. The Bell Circuit

Start from

∣ψ0⟩=∣00⟩.|\psi_0\rangle = |00\rangle.

The circuit is

  1. Apply HH to the first qubit.
  2. Apply CNOT.

30.1 Step 1: Apply H⊗IH\otimes I

(H⊗I)∣00⟩.(H\otimes I)|00\rangle.

Since

∣00⟩=∣0⟩⊗∣0⟩,|00\rangle = |0\rangle\otimes|0\rangle,

we have

(H⊗I)(∣0⟩⊗∣0⟩)=H∣0⟩⊗I∣0⟩=∣0⟩+∣1⟩2⊗∣0⟩.\begin{aligned} (H\otimes I) (|0\rangle\otimes|0\rangle) &= H|0\rangle\otimes I|0\rangle\\ &= \frac{|0\rangle+|1\rangle}{\sqrt2} \otimes |0\rangle. \end{aligned}

Distribute the tensor product:

∣ψ1⟩=12(∣0⟩⊗∣0⟩+∣1⟩⊗∣0⟩)=∣00⟩+∣10⟩2.\begin{aligned} |\psi_1\rangle &= \frac1{\sqrt2} \left( |0\rangle\otimes|0\rangle + |1\rangle\otimes|0\rangle \right)\\ &= \boxed{ \frac{|00\rangle+|10\rangle}{\sqrt2} }. \end{aligned}

This is still a product state:

∣ψ1⟩=∣+⟩⊗∣0⟩.\boxed{ |\psi_1\rangle = |+\rangle\otimes|0\rangle }.

Simple English: Hadamard creates a superposition on the first qubit, but the two qubits are still separable.


30.2 Step 2: Apply CNOT

Now apply CNOT:

CNOT⁡∣00⟩+∣10⟩2.\operatorname{CNOT} \frac{|00\rangle+|10\rangle}{\sqrt2}.

By linearity,

∣ψ2⟩=12(CNOT⁡∣00⟩+CNOT⁡∣10⟩)=12(∣00⟩+∣11⟩).\begin{aligned} |\psi_2\rangle &= \frac1{\sqrt2} \left( \operatorname{CNOT}|00\rangle + \operatorname{CNOT}|10\rangle \right)\\ &= \frac1{\sqrt2} \left( |00\rangle+|11\rangle \right). \end{aligned}

Therefore,

∣Φ+⟩=∣00⟩+∣11⟩2.\boxed{ |\Phi^+\rangle = \frac{|00\rangle+|11\rangle}{\sqrt2} }.

This is the Bell state ∣Φ+⟩|\Phi^+\rangle.

The complete state evolution is

∣00⟩→H⊗I∣00⟩+∣10⟩2→CNOT∣00⟩+∣11⟩2.\boxed{ |00\rangle \xrightarrow{H\otimes I} \frac{|00\rangle+|10\rangle}{\sqrt2} \xrightarrow{\mathrm{CNOT}} \frac{|00\rangle+|11\rangle}{\sqrt2} }.

Simple English: A local Hadamard creates a superposition.
CNOT then correlates the two computational-basis branches.


31. Numerical View of the Bell Circuit

Using basis order

∣00⟩,  ∣01⟩,  ∣10⟩,  ∣11⟩,|00\rangle,\; |01\rangle,\; |10\rangle,\; |11\rangle,

the initial amplitude vector is

∣ψ0⟩=(1000).|\psi_0\rangle = \begin{pmatrix} 1\\ 0\\ 0\\ 0 \end{pmatrix}.

After H⊗IH\otimes I,

∣ψ1⟩=(1/201/20).|\psi_1\rangle = \begin{pmatrix} 1/\sqrt2\\ 0\\ 1/\sqrt2\\ 0 \end{pmatrix}.

After CNOT,

∣ψ2⟩=(1/2001/2).|\psi_2\rangle = \begin{pmatrix} 1/\sqrt2\\ 0\\ 0\\ 1/\sqrt2 \end{pmatrix}.

Therefore,

P(00)=12,P(00)=\frac12, P(11)=12,P(11)=\frac12,

and

P(01)=P(10)=0.P(01)=P(10)=0.

Simple English: The final state has probability only on 0000 and 1111, with equal magnitude amplitudes.


32. What Has Changed?

Initially,

∣00⟩=∣0⟩⊗∣0⟩|00\rangle = |0\rangle\otimes|0\rangle

is clearly a product state.

After Hadamard,

∣00⟩+∣10⟩2=(∣0⟩+∣1⟩2)⊗∣0⟩,\frac{|00\rangle+|10\rangle}{\sqrt2} = \left( \frac{|0\rangle+|1\rangle}{\sqrt2} \right) \otimes |0\rangle,

so the state is still separable.

After CNOT,

∣Φ+⟩=∣00⟩+∣11⟩2.\boxed{ |\Phi^+\rangle = \frac{|00\rangle+|11\rangle}{\sqrt2} }.

This state is the Bell state that motivates the next topic: entanglement.

Simple English: The important transition is
product state →\rightarrow local superposition →\rightarrow Bell state.

A formal proof that this Bell state cannot be written as a product state belongs naturally to the next discussion on entanglement.


33. Summary of the Main Mathematical Results

X∣0⟩=∣1⟩,X∣1⟩=∣0⟩\boxed{ X|0\rangle=|1\rangle, \qquad X|1\rangle=|0\rangle } Z∣+⟩=∣−⟩\boxed{ Z|+\rangle=|-\rangle } X2=Y2=Z2=I\boxed{ X^2=Y^2=Z^2=I } P2=I⇒λ=±1\boxed{ P^2=I \Rightarrow \lambda=\pm1 } ∣+⟩=∣0⟩+∣1⟩2,∣−⟩=∣0⟩−∣1⟩2\boxed{ |+\rangle = \frac{|0\rangle+|1\rangle}{\sqrt2}, \qquad |-\rangle = \frac{|0\rangle-|1\rangle}{\sqrt2} } H2=I\boxed{ H^2=I } HZ≠ZH\boxed{ HZ\neq ZH } (A⊗B)(∣a⟩⊗∣b⟩)=A∣a⟩⊗B∣b⟩\boxed{ (A\otimes B) (|a\rangle\otimes|b\rangle) = A|a\rangle\otimes B|b\rangle } CNOT⁡=(1000010000010010)\boxed{ \operatorname{CNOT} = \begin{pmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&0&1\\ 0&0&1&0 \end{pmatrix} } ∣00⟩→H⊗I∣00⟩+∣10⟩2→CNOT⁡∣00⟩+∣11⟩2\boxed{ |00\rangle \xrightarrow{H\otimes I} \frac{|00\rangle+|10\rangle}{\sqrt2} \xrightarrow{\operatorname{CNOT}} \frac{|00\rangle+|11\rangle}{\sqrt2} }

34. Final Perspective

The mathematical progression is

Pauli operators→phase and basis control→Hadamard→gate composition→tensor-product operations→CNOT.\boxed{ \text{Pauli operators} \rightarrow \text{phase and basis control} \rightarrow \text{Hadamard} \rightarrow \text{gate composition} \rightarrow \text{tensor-product operations} \rightarrow \text{CNOT} }.

The most important conceptual lesson is:

Quantum gates do not directly manipulate classical probabilities.
They transform complex amplitudes and relative phases, and those amplitudes later determine measurement statistics.

The Bell circuit is the natural endpoint:

∣Φ+⟩=∣00⟩+∣11⟩2.\boxed{ |\Phi^+\rangle = \frac{|00\rangle+|11\rangle}{\sqrt2} }.

This state leads directly to the next topic:

entanglement, separability, and quantum correlations.

Comments

Loading…

When we write, it can land here.