Fork this repository
pip install -r requirements.txt
pip install -e .
It is recommended to use black to unify the code style.
We have a collection of qasm benchmarks for testing and experiment.
git clone https://github.com/Zhaoyilunnn/qcs.git
Pass the following cases
# Test run on quafu backend
pytest -s -k test_run_quafu_any_qasm tests/qdao/engine_test.py --nq 12 --np 10 --nl 8 --qasm random_12_9_max_operands_2_gen.qasm
# Test run on qiskit backend
pytest -s -k test_run_qiskit_any_qasm tests/qdao/engine_test.py --nq 12 --np 10 --nl 8 --qasm random_12_9_max_operands_2_gen.qasm
Command line options
--qasm
: Test qasm file name underbenchmarks/qasm/
directory.--nq
: Number of qubits.--np
: Number of qubits in a compute unit.--nl
: Number of qubits in a storage unit.--device
: "CPU" or "GPU", now this is only enabled for qiskit backend.--sv_location
: "memory" or "disk", for GPU mode, it is recommended to use "memory".
It is encouraged to build similar unit test for newly supported backend.
Install tox following the official guidline.
tox run
It is encouraged to build similar unit test for newly supported backend.