Skip to content

Automatic Diagnosis of Quantum Software Bug Fix Motifs

License

Notifications You must be signed in to change notification settings

KrishnKher/Q-AutoDiaBFM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Diagnosis of Quantum Software Bug Fix Motifs GitHub version

Q-Diff

Visual Studio GitHub

Q-Diff is an automated tool that detects bug-fix patterns in quantum codes. The tools classifies pairs of buggy and patched codes based on AST-parsers, RegEx checks and other semantic checks. Currently, the tool is still in a proof-of-concept (PoC) stage and has been designed only for certain classes of Qiskit codes, namely those which only have a single bug in a single line in the buggy code, of any of the following $3$ types:

  • IncorrectGate.
  • IncorrectInit.
  • IncorrectMeasurement.

Examples demonstrations have been provided under the tests folder.

Instructions to run the source code:

  1. Clone this repository:
git clone https://github.com/KrishnKher/Q-AutoDiaBFM
  1. Navigate to the directory of the main.py file:
cd src
  1. Pass in two strings of code, one being the buggy and the other, the patched one to the bugInvestigator.classifyBugs($\cdot$, $\cdot$, $\cdot$) method.

  2. Run the following command in the console:

python3 main.py

Instructions to run the tests:

  1. Clone this repository:
git clone https://github.com/KrishnKher/Q-AutoDiaBFM
  1. Navigate to the directory of the testRunner.py file:
cd tests
  1. Pick a test method from tests/testGenerator.py and run it inside tests.

  2. Run the following command in the console:

python3 testRunner.py

Please note that an example is already present in the tests folder.

About

Automatic Diagnosis of Quantum Software Bug Fix Motifs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages