The Oracle: a Black Box That Behaves as One Gate
Every algorithm from here on queries a function without seeing inside it. Build an oracle below, drop it into a circuit as a single chip, then expand it to see what it's actually doing underneath.
Configure oracle
What "oracle" means here. f(x) is implemented as CNOTs from input qubits into an ancilla qubit — flip the ancilla exactly when f(x)=1. The algorithm never gets to look at these gates directly; it can only query the oracle by running the circuit. Click the ORACLE chip below to peek anyway, since you're building the thing.
Qubits (last qubit is the ancilla)
Circuit sequence
No operations yet.
Add single-qubit gate (build your own circuit around the oracle)
Full state — amplitudes
Try this. Put every input qubit through H, drop in a Balanced (parity) oracle, then H the input qubits again. Watch what happens to the ancilla versus the inputs — that's the core trick every algorithm in Phase 7 reuses.