Implementation (in Jupyter notebooks) of a hybrid quantum-classical Ant Colony Optimization (QACO) approach for NP-hard combinatorial optimization, using the Quadratic Assignment Problem (QAP) as a benchmark. The implementation follows the "implementable" QACO framework by Garcia de Andoin and Echanobe.
- Classical ACO baseline for QAP.
- Hybrid QACO variants (unconstrained, constrained, and parameter studies).
- Optional IBM Quantum runtime experiments.
The quantum part is used as an exploration mechanism for sampling candidate solutions. Evaluation and pheromone updates remain classical.
ACO_algorithm/- Classical ACO baseline notebook.QACO_algorithm/- QACO notebooks (simulation and IBM runtime).Trial_matrices/- QAP instances used in experiments (.csv and .txt).
ACO_algorithm/ACO_unconstrained.ipynb- Classical ACO for QAP.
QACO_algorithm/QACO_unconstrained.ipynb- QACO unconstrained variant.QACO_algorithm/QACO_constrained.ipynb- QACO with constrained exploration.QACO_algorithm/QACO_unconstrained_BETAparametric.ipynb- Parameter study over beta.
QACO_algorithm/QC_implementation/QACO_IBM_unconstrained.ipynb- QACO on IBM runtime.QACO_algorithm/QC_implementation/Real_Transpilation_for_IBMrun.ipynb- Transpilation and runtime workflow details.
git clone https://github.com/QuantumAlbe/QACO_implementation.git
cd QACO_implementationUse any Python environment you prefer (venv, conda). For example:
python -m venv .venvThe notebooks rely on standard scientific Python packages and Qiskit. Install only what you need for the notebooks you plan to run.
Core packages:
pip install numpy pandas matplotlibQiskit simulation (QACO notebooks):
pip install qiskit qiskit-aerIBM Quantum runtime (optional):
pip install qiskit-ibm-runtime qiskit-ibm-transpiler qiskit-ibm-catalogOpen a notebook in Jupyter or VS Code and run cells top-to-bottom. Adjust QAP instance files and experiment parameters in the first configuration cells.
Trial matrices are stored in Trial_matrices/ as both .csv and .txt. The notebooks typically load these as QAP instances; update the file path in the configuration cell if you want to switch instances.
IBM runtime notebooks require valid credentials. Follow IBM Quantum setup instructions and set your API token before running.
If you use this work, please cite the QACO framework by Garcia de Andoin and Echanobe, and reference this repository.