This repository helps you reproduce the experiments of [1].
Clone the project
$ git clone --recurse-submodules https://github.com/joeyweii/QuantumAssertion.git <path>
$ cd <path>
Build binary with CMake
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
$ cd ..
A binary called VanQiRA
under the directory build
will be generated.
benchmarks/
: benchmarks used in the experiments of [1]lib/sliqsys
: bit-slicing BDD framework for manipulating quantum entitieslib/abc-exorcism-api
: exorcism algorithm for ESOP minimizationinlcude/
: header files of source codesrc/
: source codesscripts/
: python scripts for experiements
Synthesize the assertion circuit
$ ./build/VanQiRA --U <U qasm> --Ua <Ua qasm> --assert_point_scenario final
Example:
Tp synthesize the assertion circuit for the circuit bv_100.qasm
$ ./build/VanQiRA --U ./benchmarks/bv_100.qasm --Ua Ua.qasm --assert_point_scenirio final
Synthesize the assertion circuit
$ ./build/VanQiRA --U <U qasm> --Ua <Ua qasm> --assert_point_scenario 2/5
Run the script of obtaining tp/tn/fp/fn/detection rate
$ python3 scripts/detect.py <U qasm> <Ua qasm> <erro probability>
Example:
Synthesize the assertion circuit of bv_7.qasm
and obtain its tp/tn/fp/tn/detection rate with error probability 1.3%
$ ./build/VanQiRA --U benchmarks/bv_7.qasm --Ua Ua.qasm --assert_point_scenario 2/5
$ python3 scripts/detect.py benchmarks/bv_7.qasm Ua.qasm 0.013
Synthesize the assertion circuit
$ ./build/VanQiRA --U <U qasm> --Ua <Ua qasm> --assert_point_scenario success_rate --dp <Ua size>
$ ./build/VanQiRA --U <U qasm> --Ua <Ua qasm> --assert_point_scenario expected_gate_count --dp <Ua size>
Run the script of obtaining success rate/expected gate count
$ python3 scripts/executeErr.py <U.qasm> <Ua.qasm>
Example:
Synthesize the assertion circuit of hwb7.qasm
and obtain its success rate/expected gate count with different assertion point scenarios
$ ./build/VanQiRA --U benchmarks/hwb7.qasm --Ua Ua.qasm --assert_point_scenario success_rate --dp 8
$ ./build/VanQiRA --U benchmarks/hwb7.qasm --Ua Ua.qasm --assert_point_scenario expected_gate_count --dp 8
$ python3 scripts/executeErr.py benchmarks/hwb7.qasm Ua.qasm