QuantumLib is a state-of-the-art Python library built on Qiskit, designed for quantum computing research and education. Optimized for macOS M4 Pro and compatible with IBM Quantum hardware, QuantumLib provides comprehensive tools to simulate, execute, and benchmark advanced quantum algorithms.
- Quantum Approximate Optimization Algorithm (QAOA): Solves combinatorial optimization problems.
- Unitary Coupled Cluster (UCC): Quantum simulations for electronic structure problems.
- Grover's Search Algorithm: Efficiently searches unsorted databases with quantum speedup.
- Quantum Fourier Transform (QFT): Fundamental for phase estimation and algorithmic speedup.
- Quantum Phase Estimation (QPE): Accurately determines phases, essential for quantum simulations.
- Harrow-Hassidim-Lloyd (HHL) Algorithm: Exponentially faster solutions to linear systems.
- Quantum Annealing: Heuristic quantum optimization.
- Kernel-based Quantum Machine Learning: Integrates quantum methods into machine learning.
- Adam
- RMSProp
- Simultaneous Perturbation Stochastic Approximation (SPSA)
- Quantum Natural Gradient (QNG)
- Richardson Extrapolation
- Readout Calibration
- Command-Line Interface (CLI)
- Jupyter Notebooks demonstrating quantum applications in finance, cryptography, etc.
- Simulator vs. IBM Quantum hardware performance evaluation.
- Python ≥ 3.9
- Qiskit ≥ 1.0
- NumPy, SciPy, Matplotlib
Clone QuantumLib and set up:
git clone https://github.com/FarukAlpay/QuantumLib.git
cd QuantumLib
conda create -n quantum_env python=3.9
conda activate quantum_env
pip install -r requirements.txt
pip install -e .
Run Grover's Algorithm:
run_circuit grover --num_qubits 3 --marked_state 101 --iterations 1
Optimize QAOA:
run_circuit qaoa --qubits 5 --optimizer spsa
Solve linear systems with HHL:
run_circuit hhl
Run Variational Quantum Circuit (VQC):
run_circuit vqc --num_qubits 3 --num_layers 2 --rotation_gate Ry --entanglement_pattern chain
from quantumlib.circuits import QAOACircuit
from quantumlib.optimizers import SPSAOptimizer
circuit = QAOACircuit(qubits=5)
optimizer = SPSAOptimizer(maxiter=300)
result = optimizer.optimize(circuit)
Execute tests to ensure robust performance:
python test_all.py
Contributions are warmly welcomed! Please:
- Fork and clone the repository.
- Create a new branch (
git checkout -b feature-name
). - Implement and test your changes.
- Commit (
git commit -am "Feature description"
). - Push (
git push origin feature-name
) and open a Pull Request.
QuantumLib is released under the MIT License. See LICENSE.
Questions, suggestions, or contributions?
- Open an issue on GitHub.
- Email: faruk.alpay@example.com
Run comprehensive tests:
python test_all.py
Explore QuantumLib quickly:
- Run a basic Grover algorithm:
run_circuit grover --num_qubits 3 --marked_state 101
- Check out tutorials provided in Jupyter notebooks to dive deeper.
quantumlib/
├── cli/
│ └── run_circuit.py
├── circuits/
│ ├── qft.py
│ ├── grover.py
│ ├── hhl.py
│ └── vqc.py
├── optimizers/
│ ├── classical_opt.py
│ └── quantum_native_opt.py
├── execution/
│ └── backend_manager.py
├── tests/
│ └── test_all.py
├── requirements.txt
└── README.md
QuantumLib is distributed under the MIT License.
Crafted passionately by Faruk Alpay in Nidderau, Germany, on 11 March 2025. Inspired by the synergy of vaporized herbs, innovative code, and the smooth performance of a MacBook M4 Pro.
Euphoria in every quantum bit! 🌿💻✨