010 Deutsch's One Question Trick

Simulator

Tell a constant box from a balanced box. Ask two ordinary questions, or one quantum question.

Simulator running in your browser. Real hardware: coming soon (planned provider: IBM Quantum).

What's happening?

A simulator of Deutsch's algorithm: decide whether a hidden function is constant or balanced with one quantum question instead of two ordinary ones, and see interference make it work. Simulator only.

You will learn: Interference used to answer a question with fewer queries.

The circuit

Two coins, A (the input) and B (a helper). Start with A as Heads and B as Tails (a Flip it over on B). Spin both coins. Ask the box once: it flips B depending on what A is, using the hidden function. Spin A again and look at A. The circuit is X on B, H on A, H on B, box, H on A, measure A.

Why one question is enough

After the first spins, A is in a mix of 0 and 1, so the box is asked about both inputs at once. If the box is constant, both paths treat B the same, the paths for A add up and the second spin returns Heads. If the box is balanced, the two paths differ by a sign, so the second spin gives Tails. Never are both inputs revealed individually: you learn only the relationship between f(0) and f(1). It is the same add-or-cancel idea as the interference maze.

Honest notes

Run on real hardware: coming soon. The planned provider is IBM Quantum. It is not connected yet. Every result on this page comes from a simulator running in your browser, not from a quantum computer.

How it works: the simulator keeps the exact quantum state of the qubits as a list of complex numbers, applies each gate to it, and draws random samples from the resulting probabilities. The random numbers are ordinary pseudo random numbers from your browser, and a real device would add noise. No QNT, wallet or account is needed.

Sources

This is an educational simulator, not financial advice. QUANTUM (QNT) is an independent community token on Solana and does not perform quantum computation.

Updated | Free, no account, no token needed