Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧭 Grover’s Algorithm — 3-Qubit Quantum Search

This project demonstrates Grover’s Quantum Search Algorithm implemented on IBM Quantum Composer and verified on both simulated and real IBM QPU hardware.


🧩 Overview

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.


⚙️ Implementation Details

  • Language: OpenQASM 2.0
  • Platform: IBM Quantum Composer
  • Backend: Aer Simulator / IBM Fez QPU
  • Qubits: 3
  • Target State: 101
  • Iterations: 2

🧠 Algorithm Steps

  1. Initialization: Apply Hadamard gates to all qubits to create a uniform superposition.
  2. Oracle: Flip the phase of the target state (|101⟩).
  3. Diffuser: Reflect the amplitudes about the average (amplitude amplification).
  4. Measurement: The target state’s probability dominates after two iterations.

📊 Results

| 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.


🖼️ Circuit Visualization

Grover Algorithm Circuit


📂 Files

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

🧪 How to Run

  1. Open the .qasm file in IBM Quantum Composer.
  2. Select a simulator or available backend (e.g., ibm_fez).
  3. Set shots = 1024, then Run circuit.
  4. View the histogram to verify the amplitude peak at 101.

✨ Author

Matthias Masiero
Santa Clara University • Computer Science, Class of 2028


📘 Reference

About

Working Grover Algorithm in IBM Quantum Platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages