Skip to content

Investigating uniform random sampling of software product line configurations using quantum computing.

License

Notifications You must be signed in to change notification settings

KIT-TVA/grover-uniform-random-sampling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Banner

Python

Uniform Random Sampling of Configuration Spaces using Grover's Algorithm

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.

Requirements

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!

Usage

  1. Navigate to the root of this repository inside a terminal.
  2. Load your anaconda virtual environment conda activate <your_venv_name>.

Notebook

  1. Run the jupyter notebook command. A web browser will open.
  2. In the browser, navigate to configproblem and then open the SolvingSATWithGrover notebook.

cnfinfo tool

  1. 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

Other repositories

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.

About

Investigating uniform random sampling of software product line configurations using quantum computing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published