Repository containing data and code for Q-SE 2023 submission 9292: Can Quantum Computing Improve Uniform Random Sampling of Large Configuration Spaces?
A Jupyer Notebook is available that contains our sampling method alongside detailed explanations and examples.
The accompanying Python File was used to evaluate our method using the commandline tool cnfinfo, which also gathers additional data about the feature models.
Anaconda virtual environment with the requirements of this repository installed via pip
.
To use the cnfinfo
tool, in particular model counting, the operating system needs to be x86 Linux.
Further, GANAK is assumed to be available through the system PATH.
For approximate model counting the pyapproxmc
wheel also needs to be installed via pip
.
Keep in mind that simulating quantum circuits requires a lot of system RAM!
- Navigate to the root of this repository inside a terminal.
- Load your anaconda virtual environment
conda activate <your_venv_name>
.
- Run the
jupyter notebook
command. A web browser will open. - In the browser, navigate to
configproblem
and then open theSolvingSATWithGrover
notebook.
- Run
python configproblem/cnfinfo.py <your_cnf_file>
to get data about an individual cnf file.
You can also pass in folders that will be recursively walked to analyze all cnf files found. See the code for additional flags that cnfinfo accepts.
A practical example would be to run analysis on the FeatureIDE examples, count model solutions and output as CSV:
python configproblem/cnfinfo.py --ssat --csv benchmarks/featureide-examples
Here is a list of tools that we used during our evaluation.
- FeatureIDE for modelling feature models and some example benchmarks.
- GANAK for exact model counting.
- ApproxMC for approximate model counting.
- BURST for their suite of benchmark cnf files.
- Qiskit for creating and simulating quantum circuits.