This Jupyter Notebook constructs a QUBO cost function whose minimization corresponds to finding the Hamming distance of a self-dual Stabilizer code. Solving the minimization problem can be done using classical algorithms like Simulated Annealing (SA) or quantum ones like Quantum Annealing (QA) or using hybrid approaches, ex QBsolv. More details can be found in this paper (link will soon be posted on arxiv) along with an investigation into the efficiency of the three approaches. This code was written in collaboration between Refat Ismail and Ashish Kakkar, while the paper was in collaboration with Anatoly Dymarsky too.
To install the correct package versions use "environment.txt". Download the file and run
pip install -r "filepath/requirements.txt"
to install.
The code constructs the QUBO and solves it using Neal's Simulated Annealing Sampler. It can be easily adjusted to run using other classical, quantum, and hybrid algorithms depending on the user's purpose.
The uploaded program is a minimalist implementation of the code to show the core ideas using code instances from Grassl database. The program constructs the QUBO matrix using the generator matrix "G" of a circulant self-dual code:
This can be straightforwardly extended to non-circulant and non-self dual codes as well (see the paper for info).