Grover Search
Suppose there are many possible candidates and only one is the target. You can verify whether a candidate is correct, but you do not know where the target is. How can it be found?
Set your search problem
q qubits represent N = 2^q candidate states.
|0111⟩
The final quantum state is measured repeatedly.
How QPRIMORA transforms the problem
The important step is not simply asking a quantum computer to “find the answer.” The search problem must first be represented as quantum states, and the target condition must become an Oracle that can mark the desired state.
See the transformation step by step
Open each layer to see how an ordinary search request becomes a quantum-state representation and then a Grover computation.
A
REAL PROBLEM
What exactly are we searching?
+
There are 16 numbered candidates. Exactly one is the target.
B
SEARCH PREDICATE
How is the target recognized?
+
We define a predicate f(x). It returns 1 only when x is the target.
Grover's complexity advantage assumes that this predicate can be accessed as an Oracle.
C
ENCODING
How do candidates become quantum states?
+
q qubits provide 2^q computational-basis states.
D
SUPERPOSITION
How are all candidates represented together?
+
The register begins in |00...0⟩. Hadamard gates create a uniform superposition over all N candidate states.
E
ORACLE + DIFFUSION
How does Grover amplify the target?
+
The Oracle phase-marks the target. The diffusion operation then increases its amplitude relative to the other states. Repeating these operations concentrates measurement probability on the target.
F
RETURN TO REALITY
How does measurement become the answer?
+
The Virtual QPU is measured repeatedly. The most frequently observed bitstring is decoded back into the candidate number.
The same problem, two computational paths
Both paths receive exactly the same problem: find target 7 among 16 candidates.
Grover Search
Why Grover Search matters
For an unstructured search problem, classical query complexity grows linearly with N, while Grover's query complexity grows approximately with √N under the Oracle model.
The comparison above concerns Oracle-query complexity. It does not mean that one billion ordinary real-world objects can automatically be searched with only 31,623 simple physical operations. Real implementations must also account for Oracle construction, state preparation, circuit depth, gate errors, error correction, data loading and hardware cost. The Virtual QPU on this website is simulated on classical hardware, so webpage runtime is not evidence of quantum hardware speedup.
From real-world intent to quantum computation
The purpose of this demo is to make the entire path visible: from a simple search request, through quantum representation and computation, and finally back to an understandable answer.