Quantum Computing Master Course — 025. Global and Relative Phase
Lesson 025: Global and Relative Phase
Smartyfy Quantum Computing Master Course
Prerequisites and objectives
Earlier lessons showed that some phase factors can be ignored while others affect interference. This lesson gives the precise rule. You will prove global-phase invariance, compare pure-state vectors up to phase, identify relative phase, and understand why a phase that is global in one description can become relative inside a larger controlled construction.
One factor for the entire state
Two normalized pure-state vectors represent the same physical state when one is a common unit-magnitude complex multiple of the other. Write φ = e^(iγ)ψ. The same factor multiplies every coordinate. We call this a global phase, because it belongs to the whole vector rather than one selected component.
For example, ψ = [3/5, 4i/5] and iψ = [3i/5, −4/5] are physically equivalent. Their coordinate lists differ, but every measurement prediction agrees. A pure state is therefore represented by a family of phase-equivalent normalized vectors, not one uniquely preferred list.
Normalization matters. Multiplication by two changes the norm and does not give another normalized representative. A nonzero unnormalized vector can be normalized first, but do not confuse arbitrary scalar rescaling in algebra with a phase change between two already normalized state vectors.
Why no measurement can reveal global phase
For a normalized measurement-basis vector u, the amplitude on input e^(iγ)ψ is ⟨u|e^(iγ)ψ⟩ = e^(iγ)⟨u|ψ⟩. Its squared magnitude is unchanged because |e^(iγ)|² = 1. Thus the result holds in every orthonormal basis, not only the computational basis.
More generally, for an orthogonal projector P, the outcome probability is ||Pψ||². Linearity gives P(e^(iγ)ψ) = e^(iγ)Pψ, whose norm is the same. This covers higher-rank projective outcomes as well. The projector framework makes the argument independent of a specific basis.
An intervening unitary cannot help: U(e^(iγ)ψ) = e^(iγ)Uψ. The global factor remains common to the full output. No choice of subsequent ideal gates and measurements turns this genuinely common state phase into an observable distinction.
Relative phase changes relationships
Now compare |+⟩ = [1, 1]/√2 and |−⟩ = [1, −1]/√2. Their first nonzero coordinates agree, which would force a common multiplier of one. Their second coordinates disagree, so no global factor relates the vectors. The sign difference is relative between the two occupied basis components.
Both states have equal computational-basis probabilities, but H maps them to |0⟩ and |1⟩ respectively. A later transformation converts that phase relationship into different probabilities. Therefore matching coordinate magnitudes is necessary but not sufficient for pure-state equivalence.
When both amplitudes are nonzero, the ratio β/α is unchanged by a common global factor and captures their relative complex relationship. The phase of a zero amplitude is undefined: zero times any phase is still zero. Avoid assigning physical importance to an angle attached to a zero coordinate.

Worked example checking equivalence
Let ψ = [(2 + i)/3, 2/3] and φ = [(-1 + 2i)/3, 2i/3]. Multiplying the first vector by i gives precisely the second, since i(2 + i) = −1 + 2i. They are equivalent up to global phase.
Compare instead χ = [(2 + i)/3, −2/3]. The unchanged first coordinate demands multiplier one, while the second coordinate demands multiplier minus one. These conditions conflict. Thus ψ and χ are different states even though their computational-basis probability vectors both equal [5/9, 4/9].
A convenient general test for normalized pure vectors is |⟨ψ|φ⟩| = 1. Equality in the inner-product bound means the vectors are proportional; normalization makes the proportionality factor unit magnitude. Orthogonal vectors have overlap zero, and intermediate values indicate distinct, nonorthogonal states.
Choosing a convenient representative
For calculations, we can choose the first nonzero amplitude to be real and positive by multiplying the entire vector by a suitable phase. This is a coordinate convention, sometimes called fixing a gauge. It does not physically modify the state or reveal an unknown phase experimentally.
For instance, [i/√2, −1/√2] becomes [1/√2, i/√2] after multiplying both coordinates by −i. If the first coordinate is zero, choose another nonzero coordinate. Do not divide by a coordinate that vanishes or independently make every coordinate positive; the latter would generally change relative phases.
The controlled-operation caveat
Operators U and e^(iγ)U give phase-equivalent outputs when applied to an entire isolated target state. However, a controlled version applies the operator only on one coherent control branch. The phase can then be relative between the apply and do-nothing branches of the larger system.
Consider control A in |+⟩ and target B in |0⟩, giving (|00⟩ + |10⟩)/√2. An operation that does nothing on both branches leaves this state unchanged. An operation that multiplies the target by −I only when A is one instead produces (|00⟩ − |10⟩)/√2.
The second transformation has introduced a relative sign between joint-system components. Applying H to A yields control zero for the first state and control one for the second. This does not make a genuine global state phase observable: the conditional phase was never common to the entire joint vector. We will construct controlled gates explicitly in the next module.
A local equivalence check
The code below checks normalized vectors using their overlap. The tolerance handles floating-point rounding, and the input normalization check avoids interpreting an arbitrary overlap as physical equivalence. Official Qiskit Statevector documentation provides a related equivalence method for later programming.
from math import isclose, sqrt
def equivalent_up_to_global_phase(a, b):
if len(a) != len(b):
return False
for vector in (a, b):
norm_squared = sum(abs(z)**2 for z in vector)
if not isclose(norm_squared, 1, abs_tol=1e-12, rel_tol=0):
raise ValueError("Expected normalized vectors")
overlap = sum(complex(x).conjugate()*y for x, y in zip(a, b))
return isclose(abs(overlap), 1, abs_tol=1e-12, rel_tol=0)
plus = [1/sqrt(2), 1/sqrt(2)]
minus = [1/sqrt(2), -1/sqrt(2)]
phase_plus = [1j*z for z in plus]
print("plus and i times plus:", equivalent_up_to_global_phase(plus, phase_plus))
print("plus and minus:", equivalent_up_to_global_phase(plus, minus))
assert equivalent_up_to_global_phase(plus, phase_plus)
assert not equivalent_up_to_global_phase(plus, minus)
Four exercises with worked solutions
-
Are [1, i]/√2 and [−i, 1]/√2 equivalent? Find the factor if so.
Solution. Multiplying the first vector by −i gives [−i, 1]/√2 because (−i)i = 1. The factor has magnitude one, so the states are equivalent.
-
Are [1, i]/√2 and [1, −i]/√2 equivalent?
Solution. No. The first entries force factor one while the second require minus one. Their inner product is (1 + (−i)(−i))/2 = 0, so they are actually orthogonal.
-
Choose a representative of [0, −i] whose nonzero entry is positive real.
Solution. Multiply the entire vector by i. The result is [0, 1]. The zero coordinate remains zero; no division by it is needed.
-
Why is changing only the amplitude of |10⟩ by a sign in (|00⟩ + |10⟩)/√2 not a global phase?
Solution. One nonzero joint amplitude stays fixed while the other changes sign. No common scalar does both. The state changes from |+⟩A|0⟩B to |−⟩A|0⟩B, which H on A distinguishes.
Five explained multiple-choice questions
-
A global phase multiplies: A. Only one chosen entry. B. Every amplitude by the same unit-magnitude factor. C. Every probability by i. D. The norm by two.
Answer: B. Commonality across the entire state is the defining condition.
-
Equal computational-basis probabilities prove pure-state equivalence: A. Always. B. Only for normalized vectors. C. No. D. Only for real probabilities.
Answer: C. Relative phases can differ despite equal squared magnitudes.
-
The phase of a zero amplitude is: A. Always π. B. Always physically measurable. C. Always π/2. D. Undefined and irrelevant to that zero entry.
Answer: D. Multiplying zero by any phase leaves zero.
-
For normalized pure vectors, equivalence implies overlap magnitude: A. One. B. Zero. C. Two. D. Their dimension.
Answer: A. Unit overlap magnitude identifies proportional unit vectors.
-
A phase applied to only one coherent control branch can be: A. Necessarily global. B. Relative in the joint state. C. A negative probability. D. A normalization error.
Answer: B. Other occupied branches supply a reference within the larger vector.
Pitfalls and summary
Ignore only a phase common to the full state under discussion. Keep relative phases, avoid zero-coordinate divisions, and distinguish standalone operator equivalence from controlled constructions. These distinctions make later Bloch-sphere pictures and multi-qubit circuits mathematically trustworthy.
Primary sources and further study
These sources support the definitions and context. The numerical examples, exercises, and explanations here were prepared for this lesson. Research papers are optional advanced reading.