SpookyQubits

Ghost Hunt

When should you open the ghost’s door?

Learn Grover’s algorithm with eight rooms and one ghost. Work through a search round, test the odds in Ghost Hunt, and download the teacher guide.

Eight numbered hotel doors with one red door marked by a question mark.

Decide when to stop

  1. Open Wave Lab with eight rooms and one marked room.
  2. Run a round by flipping the marked sign and reflecting about the mean.
  3. Compare the estimated catch chance after rounds one, two, and three.
Which of the first three rounds is best?

Of the first three rounds, round two gives the highest catch chance at 94.5%. Round three drops it to 33.0%. Each round rotates the state, so continuing can lower the chance.

Grover’s Algorithm Explained With Eight Rooms

One of eight rooms hides a ghost. In Ghost Hunt’s Wave Lab, all eight rooms start with the same teaching amplitude, 4. A guess has a 1 in 8 chance (12.5%) of finding the ghost.

  1. Mark the room. The search oracle changes the ghost room’s amplitude from 4 to −4. The other seven amplitudes stay at 4.
  2. Find the mean. The new mean amplitude is (−4 + 7 × 4) ÷ 8 = 3.
  3. Reflect about the mean. Reflect each amplitude across 3. The ghost room moves from −4 to 10, and the other rooms move from 4 to 2.
  4. Square the amplitudes. The ghost room has weight 10² = 100. The total weight is 100 + 7 × 2² = 128, so the catch chance is 100 ÷ 128 ≈ 78.1% after one round.

Open Ghost Hunt and try Wave Lab. Compare round two (94.5%) with round three (33.0%). Ask students when they would open a door and what the numbers tell them.

Download the teacher guide (PDF) or print the classroom game (PDF).

Share the eight-room puzzle · Embed the challenge · Download the Canvas assignment

Try another challenge