This framework enables us to verify quantum applications through assertions. We can write any assertions about the pre-states and post-states of quantum circuits. These assertions are verified on a quantum computer simulator using test cases. Additionally, the framework allows us to verify the post-processing of measurement results.
Install python 3.11 via pyenv or directly and run the following at the root of this repository.
python -m venv .venv # recommended
source .venv/bin/activate # recommended
pip install --upgrade pip # recommended
pip install dist/dbcquantum-*.whl
If you want to use jupyter notebook example:
pip install -r requirements-jupyter.txt
You can see example codes in the example
directory.
An example of a success pattern.
python example/hadamard_test/success.py
An example of a failed pattern.
python example/hadamard_test/fail.py
The API references are available at https://fujitsuresearch.github.io/dbcquantum/
Please refer to the notebook/paper
directory.
You can run them by the following command:
python -m venv .venv # recommended
source .venv/bin/activate # recommended
pip install --upgrade pip # recommended
pip install dist/dbcquantum-*.whl
pip install -r requirements-jupyter.txt
jupyter notebook
Our project is managed by poetry (version 1.8.2).
You can install all dependencies via poetry.
-
via poetry:
python -m venv .venv # recommended poetry config --local virtualenvs.in-project true # recommended poetry install
When you update something, run the following code and solve all errors.
chmod u+x run_before_push.sh
./run_before_push.sh