Skip to content

Repository files navigation

Q-Refine Logo

Q-Refine ⚛️

An open-source educational utility and platform for evaluating hardware noise in Quantum circuits and visualizing Zero-Noise Extrapolation (ZNE) mitigation.

Python Qiskit Streamlit Status License Build Status

Live Demo

Quick Start💻 Demos Architecture🐞 Report Bug


🎯 Key Features at a Glance

🧠 Quantum AI Circuits 📡 Hardware Profiling 🛡️ ZNE Mitigation 🗺️ Topology Optimizer
Complete Algorithm Suite
Benchmarks QNNs, VQE, Bernstein-Vazirani, Simon's, Grover's, and QFT.
Advanced Noise Models
Tests Depolarizing, Amplitude Damping, Phase Damping, and live IBM T1/T2 times.
ZNE Implementation
Custom circuit folding and Richardson extrapolation for error mitigation.
Smart Routing
Analyzes physical backend layout to minimize SWAP gate errors.

📑 Table of Contents


🛠️ Installation

# Clone the repository
git clone https://github.com/shlok926/q-refine.git
cd q-refine

# Install dependencies
pip install qiskit>=1.0.0 qiskit-aer>=0.14.0 matplotlib numpy streamlit>=1.30.0 jupyter

How to Run (3 Ways)

Q-Refine is designed for different types of users, from enterprise managers to core quantum researchers.

1. 🌐 The Streamlit Web Dashboard (Live Cloud & Local)

You can test the platform instantly without installing anything via our cloud deployment: 👉 Live Cloud Dashboard: q-refine.streamlit.app

Or run it locally on your own machine:

streamlit run app.py

This will open a browser window at http://localhost:8501.

2. ⚡ The Command-Line Pipeline (For Automation & CI/CD)

Run the automated pipeline to execute the entire benchmarking process in one shot. It will print the analysis and generate a q_refine_dashboard.png image.

python q_refine_pipeline.py

3. 📓 Jupyter Notebook (For Developers & Researchers)

If you want to play with the Q-Sanitizer step-by-step or modify the circuits mathematically, use the interactive notebook.

jupyter notebook demo.ipynb

🏗️ Architecture

q_refine/
├── circuits/            # Quantum Algorithms (QNN, VQE, BV, Simon's, Grover, QFT)
├── benchmark_engine/    # Hardware Profilers & IBM Digital Twins
├── mitigation_engine/   # Custom ZNE Engine & Topology Optimizers
└── core/                # Dashboards & Utilities

🌍 Applications & Use Cases

Q-Refine is built to accelerate research and production in the most critical areas of quantum computing:

  • Quantum Machine Learning (QML) & Quantum AI: Evaluate how hardware noise degrades the accuracy of Parameterized Quantum Circuits (PQCs) and Quantum Neural Networks, and use ZNE to restore predictive power.
  • Quantum Cryptography & Security: Benchmark cryptographic cracking algorithms (like Grover's) against real-world decoherence to understand the true timeline and threat level of quantum attacks.
  • Quantum Hardware Development: Hardware engineers can use Q-Refine as a diagnostic tool to test the efficacy of their physical qubits against standard algorithmic workloads.

🔮 Future Scope

While Q-Refine is actively being developed, the roadmap for future expansion includes:

  1. Machine Learning Predictor: Utilizing classical ML models to predict the robustness of arbitrary quantum circuits before execution.
  2. Live QPU Execution: Transitioning from Digital Twins (FakeBackends) to live, queued execution on IBM's physical Quantum Processing Units (QPUs) using premium cloud accounts.
  3. Hybrid Algorithm Support: Adding support for QAOA (Quantum Approximate Optimization Algorithm) for solving logistics and financial modeling problems under noisy conditions.

🛡️ Security Note

This tool evaluates algorithms locally. If you switch use_real_hardware=True in the Profiler, ensure your IBM Quantum API Token is saved using QiskitRuntimeService.save_account() and never hardcoded into the scripts.


🤝 Contributing & Feedback

Contributions, suggestions, and feedback are highly welcome!

  • Got suggestions or feature requests? Feel free to open a new Issue or share your ideas.
  • Want to contribute? Feel free to fork this repository, make your changes, and submit a Pull Request.

⭐ Show Your Support

Love this tool? Help us grow:
✨ Star the repository    (GitHub Star Button)
🐛 Report bugs            (GitHub Issues)
💡 Suggest features       (GitHub Discussions)
📣 Share with others      (LinkedIn/Twitter)
🤝 Contribute code        (Pull Requests)

👤 Author & Contact

👨‍💻 Shlok Thorat
Let's connect on LinkedIn, collaborate, and build amazing things together!

Email GitHub LinkedIn



Made with Shlok!for Quantum Computing Innovation • Back to Top

About

An enterprise-grade platform for evaluating and mitigating hardware noise in Quantum AI circuits using Zero-Noise Extrapolation (ZNE).

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages