Uniform preparation
The targets are consecutive entries starting at the selected index, wrapping around at the end. The simulator knows them in advance.
Q047 · Mark / reflect / stop
Can one extra round make the answer harder to find? Past the optimal number of rounds, yes. Each oracle call plus reflection turns the state a fixed step toward the targets. Once it gets there, another round turns it beyond them and the chance of success falls, so knowing when to stop matters.
Pick a small search space, mark the target entries and step through the rounds. Follow the phase oracle and the reflection as probability flows toward the targets and then back out again. Sample the readout and use the measured success rates to choose when to stop.
Simulated measurement record
Acquire a record to begin.
Colored bars and points come from records; thin gray marks are the model with the configured errors. Whiskers are pointwise 95% Wilson intervals for output or success fractions. They are not phase confidence intervals, simultaneous bands or guarantees after optional stopping.
Recorded success, 95% Wilson range
Round with the highest observed success among those sampled
All circuit / verification queries
The best observed round is a descriptive choice from this finite scan, not a certified optimum. Every output is checked against the known teaching oracle; that adds one verification query. No real-data oracle construction or hardware advantage is demonstrated.
| Rounds | Trials | Successes | Circuit / verification queries |
|---|
| Trial | Setting | Reported bits | Integer | Circuit queries |
|---|
Physics tutorial
BackgroundThe state starts with equal amplitudes on every entry of a small search space. An oracle changes the phase of the marked entries. A second unitary then reflects the amplitudes about the uniform state.
Why it mattersThe algorithm moves probability around; it does not create any. Once the state has turned past the best direction, repeating the same operations can lower the chance of success.
Start with the essentials
The targets are consecutive entries starting at the selected index, wrapping around at the end. The simulator knows them in advance.
You enter the phase offset in degrees, and it is converted to radians. This coherent error is different from a random bit flip.
The overall minus sign in front makes the error-free operator the usual inversion about the mean. With an error, the operator is still unitary.
Every complex amplitude is updated step by step. You can view the state right after any oracle or reflection step.
This rotation formula holds for ideal phases, before any readout error. It serves as an independent check; the state vector is not computed from it.
Each reported output is also checked once against the target set. That extra query is counted separately as a verification query.
Typical misconceptionThe simulator discovers a secret in a real database.
Better mental modelThe target set is handed to the teaching oracle in advance. Building a real oracle can be expensive, and this model leaves that cost out.
Typical misconceptionAn arrow pointing the negative way means a negative chance.
Better mental modelThe arrow's direction is the complex phase and its length is the size of the amplitude. Probability is that size squared, so it is never negative.
Typical misconceptionThe browser animation runs fast, so it proves quantum advantage.
Better mental modelThis is a small simulation on a classical computer. The query counts describe this model; they are not measurements on quantum hardware or a complete comparison with classical search.
Choose Before amplification, set one round and inspect its oracle step.
What to observe: The marked amplitude changes sign but its probability does not yet increase.Compare Stop near the peak with Go too far.
What to observe: After a few extra rounds, the same targets can become much less likely.Acquire the full round scan.
What to observe: The measured success fractions fluctuate. The round with the highest observed success describes this finite data set; it is not guaranteed to be the best round.Try an imperfect oracle and readout flips separately.
What to observe: Coherent phase errors change the amplitudes during the evolution. Readout flips corrupt the reported bit strings after the evolution is over.