Installation#

The simplest way to install dwave-gate is from PyPI:

pip install dwave-gate

It can also be installed from source by cloning this GitHub repository and running:

make install

The makefile will also simplify running tests (make test), coverage (make coverage), documentation (make docs`), as well as formatting (make format) the code using the Black formatter (set to a line-length of 100) and isort. It’s available on both Unix as well as Windows systems, via the make.bat batch file.

Alternatively, the package can be built and installed in development mode using Python and pip. The simulator operations would need to be generated first by executing operation_generation.py, found in dwave/gate/simulator.

python setup.py build_ext --inplace
pip install -e .

Tests and coverage can be run using Pytest.

pytest tests/ --cov=dwave.gate