Spooky Labs SpookyQubits Give feedback

Spooky Qubits · College labs · Computing

Ghost Choir

Recover a hidden bit string using classical questions and a simulated quantum oracle.

Choir register

    Classical queriesIndependent answersQuantum queries

    Find the hidden pattern

    Recover all the bits with as few questions as possible. First use classical parity questions. Then predict the quantum readout and compare how many calls each method used.

    Ask about one voice

    Ask about several voices

    Select voices to ask whether their bits add to an even sum (0) or an odd sum (1).

    Classical questions asked
      College lab questions

      Ask about voices 1 and 2 together, then ask about each one on its own. Which of those three answers could you have worked out from the other two? Try this with five voices, then eight. Keep track of how many calls actually tell you something new.

      Look at an amplitude pair in the quantum view. Predict which bit you will read after the Hadamard. Try both (+,+) and (+,−). In your classical run, how could you tell whether you knew the whole string or happened to guess it?

      Model and experiment

      A classical answer tells you whether a sum is even or odd. It gives at most one new bit of information. To recover an arbitrary N-bit secret in the worst case, you need N answers that you couldn’t deduce from each other.

      The Bernstein–Vazirani circuit makes one coherent call to the same parity rule. For a question x and hidden string s, the rule computes x · s modulo 2. The quantum call records that parity as a plus or minus sign, (−1)x · s, on each amplitude. Afterward, a Hadamard on each voice turns its sign pattern into the corresponding secret bit. The display shows the exact ideal result.

      The counter tracks calls to the parity rule. The circuit also takes work to prepare, apply gates, and read out.

      Bernstein and Vazirani, Quantum Complexity Theory