Concept

Phase Oracle

Marks one computational basis state with a −1 phase using X-conjugated multi-controlled Z.

Qubits 3 Cost O(1) Default Mark |110⟩

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. 1
    Select zeros

    Target |110⟩ has a 0 on q0, so X 0.

  2. 2
    Phase

    CZ [0,1,2] flips |111⟩, which is the original |110⟩ after the X.

  3. 3
    Uncompute

    X 0 restores the computational labels.

Default Qubi (static)
X 0
CZ [0,1,2]
X 0

Function form: PhaseOracle(0b110)

Circuit
q0q1q2XZX
Expected result

State. On |000⟩: unchanged. On |110⟩: −|110⟩.

Z probabilities on |000⟩ stay P(000) = 1. The mark is a phase, invisible until you interfere.

BasisAmplitudeProbability
|000⟩ 1
100%

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.