ψQuantum Playground
← All lessons·Lesson 6 of 6 · 9 min

Famous circuits: Grover & teleportation

Two small circuits with big ideas: searching faster than brute force, and moving states without moving matter.

Grover's search

Imagine a 'phone book' of four entries, one of which is marked — classically you'd check on average two or three. Grover's algorithm finds it in one query.

The trick has two moves, repeated: (1) an oracle flips the sign of the marked state's amplitude — invisible to measurement, but real; (2) a 'diffusion' step reflects every amplitude about the average, which converts that hidden sign flip into a larger magnitude. Amplitude flows from wrong answers to the right one.

Load the Grover preset and step through: after H gates the four states are equal; after the oracle nothing visibly changes (phases are hidden!); after diffusion, |11⟩ hits 100%. For n items, roughly √n iterations suffice — a quadratic speedup over any classical search.

Quantum teleportation

Teleportation transfers a qubit's state from one place to another using two resources: one shared Bell pair, and two classical bits of communication. The original state is destroyed in the process — no cloning allowed in quantum mechanics.

In our preset, qubit 0 carries a custom state (prepared by an Ry gate), qubits 1 and 2 share a Bell pair. After the protocol's gates run, check the Bloch spheres: qubit 2's arrow ends up exactly where qubit 0's arrow started. The state 'jumped' wires without any gate directly connecting them carrying it.

Teleportation isn't sci-fi transport — no matter moves, and it can't beat light speed (the classical bits still have to travel). But it is the backbone of proposed quantum networks and quantum error correction schemes.

Where to go next

You now know the core vocabulary: superposition, interference, entanglement, measurement. The famous big algorithms — Shor's factoring, quantum chemistry simulation — are built from exactly these ingredients at larger scale.

Keep experimenting in the workbench: try building a 3-qubit GHZ state from scratch, or see what HZH does compared with X. The intuition you build on 2–5 qubits is the same intuition researchers use on 100.

Try it yourself
Step through Grover's search
Open in simulator →
Key takeaways
  • Grover: flip the marked state's phase, reflect about the average, repeat ~√n times.
  • Teleportation spends one Bell pair + two classical bits to move a quantum state.
  • Every big algorithm is built from the ingredients you've now practiced.