Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.45 KB

CONTRIBUTING.md

File metadata and controls

54 lines (39 loc) · 1.45 KB

Contributing Guide

Development

Fork this repository

pip install -r requirements.txt
pip install -e .

Style

It is recommended to use black to unify the code style.

Test

Use pytest

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 under benchmarks/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.

Use tox

Install tox following the official guidline.

tox run

It is encouraged to build similar unit test for newly supported backend.