This repository contains the necessary artefacts to reproduce the results of the experiments carried out as part of the work "Quantum Data Encoding Patterns and their Consequences". The Jupyter Notebook covers the steps from a provided Sudoku graph to the final QAOA circuit for every encoding instance.
The code and data folders contain the implementations and results of experiments conducted on the binary boolean encoding for a
We implemented the encodings on the quantum simulator QLM. As the QLM has restricted access, it may not be possible to execute the algorithms on the simulated QPU.
The notebook starts of by introducing the Sudoku graph representation. AFter some required functions, the encodings are initiated using the SymPy library. For each encoding the amount of CNOTs and the circuit depth is outputted. The depth can vary, as some Observable to Ansatz strategies rely on heuristics.
Due to prior research, we assessed the binary encoding on standard QAOA and two adapted Warm-Starting QAOA, as proposed by Egger et al.
The algorithm parameters and experiment details are as follows:
- Algorithm executions per variant =
$10$ - QAOA depth =
$1$ - max optimizer iterations =
$10000$ - number of shots =
$0$ (if$0$ => maximum possible number of shots)
Warm-starting specic details:
-
$\varepsilon$ =$0.25$
The python source code used in this project can be found in the code directory.
We simulated a relaxed solution to the general Sudoku problem by initializing the vector
For this variant, a random permuatation of the values from
To conserve the results, the result objects have been serialised with the pickling based dill module.
In each iteration folder the "minimize_result" object contains the results from the first QAOA phase, namely minimised final energy and optimal parameters
"success_probability" contains the total probability of retrieving a valid Sudoku.
"valid_samples" contain the set of valid binary encoded Sudokus with their measured probability after the number of shots.
To save on memory, we only evaluated the results for positive samples (valid Sudokus). With this, only