← Quantum Store · Guides · Lessons · Glossary · About · Türkçe

Intermediate course: quantum algorithms · Lesson 1 / 6 · 10 min

Phase and the Bloch sphere: the invisible dial

Phase, invisible in measurements, is the real raw material of quantum algorithms. Picture a single qubit with the Bloch sphere and see what the Z, S and T gates do.

Amplitudes have a direction too

In the beginner course we saw that the square of an amplitude gives a probability. But amplitudes are not only magnitudes; they also have a “direction”, their phase. (|0⟩ + |1⟩)/√2 and (|0⟩ − |1⟩)/√2 give exactly the same measurement result (50–50), yet they are different states.

Phase cannot be measured on its own. Only when an interference step, such as an H gate, brings paths with different phases together does the result change. That is why quantum algorithms first set up phases and then turn them into a measurable result through interference.

The Bloch sphere

Every state of a single qubit can be shown as a point on the surface of a sphere: the north pole is |0⟩, the south pole |1⟩. Points on the equator are equal superpositions; where you are along the equator shows the phase.

In this picture gates rotate the sphere. X swaps north and south. H moves |0⟩ to the equator. Z, S and T rotate the sphere about the vertical axis by a half, a quarter and an eighth of a turn: they leave the poles untouched and only shift the phase of points on the equator.

Phases add up

Because rotations add up, so do phases: two Ts make an S, two Ss make a Z. In the H·Z·H circuit the half turn made by Z shows up, thanks to the final H, as 1 instead of 0 on measurement. In the playground you can get the same result with two S gates.

With many qubits this idea grows: advanced algorithms such as the Fourier transform and phase estimation write information directly into phases and read it out at the end through interference.

Try it yourself

In the “two quarter turns” example (İki çeyrek tur: S, S) remove one of the S gates: a single S turns a quarter turn and the result becomes 50–50. The more the phase turns, the more the result changes.

Open the circuit in your browser

The circuit playground is in Turkish. Button guide: “1000 kez ölç” = measure 1000 times, “Durum vektörünü göster” = show the state vector, “Bu devrenin Qiskit kodu” = this circuit’s Qiskit code, “Geri al” = undo, “Temizle” = clear. Click a gate in the circuit to remove it.

Key points

Test yourself

If the circuit H, S, S, H starts in |0⟩, what does measurement give?

Show the answer

Always 1. Two S gates make a Z, and H·Z·H does the same as X, so the result is always 1.

Deutsch–Jozsa: a certain answer in one query →

Share: X · LinkedIn