This project demonstrates Grover’s Quantum Search Algorithm implemented on IBM Quantum Composer and verified on both simulated and real IBM QPU hardware.
Grover’s algorithm provides a quadratic speed-up for searching an unsorted database.
This 3-qubit circuit searches for the marked state |101⟩ among 8 possible bitstrings, using 2 Grover iterations.
- Language: OpenQASM 2.0
- Platform: IBM Quantum Composer
- Backend: Aer Simulator / IBM Fez QPU
- Qubits: 3
- Target State:
101 - Iterations: 2
- Initialization: Apply Hadamard gates to all qubits to create a uniform superposition.
- Oracle: Flip the phase of the target state (|101⟩).
- Diffuser: Reflect the amplitudes about the average (amplitude amplification).
- Measurement: The target state’s probability dominates after two iterations.
| Backend | |101⟩ Probability | Notes | |----------|------------------|-------| | Simulator | ≈ 95–98 % | Nearly perfect amplification | | Real QPU (ibm_fez) | ≈ 75–85 % | Slight noise due to decoherence |
The histogram clearly peaks at 101, confirming correct algorithm behavior.
| File | Description |
|---|---|
grover_3qubit.qasm |
Full OpenQASM 2.0 code for Grover’s algorithm |
grover_circuit.png |
Circuit diagram exported from IBM Quantum Composer |
README.md |
Project documentation |
- Open the
.qasmfile in IBM Quantum Composer. - Select a simulator or available backend (e.g.,
ibm_fez). - Set shots = 1024, then Run circuit.
- View the histogram to verify the amplitude peak at
101.
Matthias Masiero
Santa Clara University • Computer Science, Class of 2028
- Lov Grover, “A fast quantum mechanical algorithm for database search,” 1996.
- IBM Quantum Documentation
