Marks one computational basis state with a −1 phase using X-conjugated multi-controlled Z.
This is the Grover marking operator, not a full search. Flip every wire that should be 0 in the target, apply CZ on the whole register (phase kick of |1...1⟩), then uncompute the X gates. Only the chosen basis vector picks up -1.
On |000⟩ the oracle is identity. Apply H first if you want a search-style superposition.
How it works
-
1
Select zeros
Target |110⟩ has a 0 on q0, so X 0.
-
2
Phase
CZ [0,1,2] flips |111⟩, which is the original |110⟩ after the X.
-
3
Uncompute
X 0 restores the computational labels.
X 0 CZ [0,1,2] X 0
Function form: PhaseOracle(0b110)
State. On |000⟩: unchanged. On |110⟩: −|110⟩.
Z probabilities on |000⟩ stay P(000) = 1. The mark is a phase, invisible until you interfere.
| Basis | Amplitude | Probability |
|---|---|---|
|000⟩ |
1 |
Notes
- LSB of the bitstring is q0, same as Grover(0b...).
- A lone phase mark does not change measurement probabilities. Pair it with diffusion (see Grover).
Change parameters
The write-up above is for the default circuit. Use this control to generate other variants and load them in the simulator.