Python bindings for DQCsim
Project description
DQCsim
DQCsim, short for Delft Quantum & Classical simulator, is a framework that can be used to tie components of quantum computer simulators together in a standardized yet flexible, developer-friendly, and reproducible way. Click here for more information!
Install
The recommended method to install DQCsim is through Python's package manager:
sudo pip3 install dqcsim
This installs DQCsim's core files and plugins. More information is available in the Installation section of the documentation.
Getting started
Users
New users are encouraged to check out the documentation.
Plugin developers
Plugin developers can check out the examples, existing plugins and refer to the API documentation:
Plugins
Frontend
Plugin | Description | Download | License | Platforms | Language |
---|---|---|---|---|---|
openqasm | OpenQASM 2.0 frontend | Apache-2.0 | Linux, macOS | Rust | |
cqasm | cQASM 1.0 frontend | Apache-2.0 | Linux, macOS | C++ | |
null | No-op frontend | Apache-2.0 | Linux, macOS | Rust |
Operator
Plugin | Description | Download | License | Platforms | Language |
---|---|---|---|---|---|
openql-mapper | OpenQL mapper operator | Apache-2.0 | Linux | C++ | |
null | No-op operator | Apache-2.0 | Linux, macOS | Rust |
Backend
Plugin | Description | Download | License | Platforms | Language |
---|---|---|---|---|---|
quantumsim | Quantumsim backend | GPL-3.0 | Linux, macOS | Python | |
qx | QX backend | Apache-2.0 | Linux, macOS | C++ | |
null | No-op backend | Apache-2.0 | Linux, macOS | Rust | |
iqs | Intel QS backend | Apache-2.0 | Linux, macOS | C++ |
Please open a PR to have your plugin added to this list.
Build and test from source
Setup
The core of DQCsim is written in Rust. The crate defines a set of C-bindings to support plugin development in other languages. DQCsim is distributed as a batteries included Python package that includes the shared library and headers for C and C++ plugin development.
Requirements
- Rust (stable)
Python support:
C/C++ tests:
- CMake (3.14+)
Documentation:
Python
To build the dqcsim
Python package:
python3 setup.py bdist_wheel
This builds a release wheel to target/python/dist/
. For debug builds set the
DQCSIM_DEBUG
environment variable.
C/C++
To build the C and C++ headers build the dqcsim
Rust crate with the
bindings
feature enabled:
cargo build --manifest-path=rust/Cargo.toml --features=bindings
The generated headers are stored in target/include
.
Rust
The dqcsim
crate can be built with the following (non-default) features:
cli
: the command-line interface binarynull-plugins
: the null (no-op) plugin binariesbindings
: genertion of headers required for C, C++ and Python plugin development
To build all targets and features:
cargo build --all-targets --all-features
Add --release
for release builds.
Documentation
To build the documentation use the Makefile in the doc directory directly from the root of the repository:
make -C doc
Documentation output is stored in target/book
.
Test
Rust
To test all targets and features:
cargo test --all-targets --all-features
C/C++
To test the C-bindings and C++ wrapper:
mkdir build
cd build
cmake .. -DBUILD_TESTS=ON
make
CTEST_OUTPUT_ON_FAILURE=1 make test
Add -DCMAKE_BUILD_TYPE=DEBUG
to CMake for debug builds.
Python
To test the Python package:
python3 setup.py build test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file dqcsim-0.4.1-cp39-cp39-manylinux2014_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d493866b6b3f60c7cb7b201d5cfcd6ff0d020027d8afcd5ad5e7b6414cc103cc |
|
MD5 | 239b13257b4aa4a98fb6e22ff2c54909 |
|
BLAKE2b-256 | 7525f07e770ecc1dcec1e39664efcced0a12136b4684ba12d6c6730bfe980b1d |
File details
Details for the file dqcsim-0.4.1-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2285d80bec79e25c5cee5de556879e3d6dd1f5d0a924cccf9a965ee187424f81 |
|
MD5 | 614e0e7080f216631f0909776c2c21ce |
|
BLAKE2b-256 | c006a6e7742bb02442dfba5dee9b62caec2dab3fca26fab0d46839aac05d7cc0 |
File details
Details for the file dqcsim-0.4.1-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3c625fe3e836ab809c91ec2793382937df9669a3523400b43ab77f6e6f7a5f6 |
|
MD5 | 0507123243cb9adc87069c3813990f3a |
|
BLAKE2b-256 | 349da1ffe3543469ab24e2994db0ec365a545db98a50f0dd6f0c3e9b7edff6b7 |
File details
Details for the file dqcsim-0.4.1-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bcf8826c3062a9732ec643e00ebe20a079fdf0c81ea72c196b45d7e88e41c29 |
|
MD5 | 0f6c7f5676523e378c8476f7bd79a7f8 |
|
BLAKE2b-256 | 0e81364ec07b4431497a95524bb5e72a21d4e4db57fdb7d9615bcd377f602085 |
File details
Details for the file dqcsim-0.4.1-cp37-cp37m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36a620b0cb07d47909986253ae443b96e76b164f205dce913b5d975754ec2ab8 |
|
MD5 | b96345187ffaa0f8416cc4853c4105d6 |
|
BLAKE2b-256 | 4a4c5decf0c754d96f1315717a9dda478bd66fa07b0246181d4d5a14b22cd0fe |
File details
Details for the file dqcsim-0.4.1-cp37-cp37m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp37-cp37m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.7m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d2cc3842668fef6ef9e947e90e58cfa6bae346d052573aa174c22e29b9cd871 |
|
MD5 | a84935782ede9e355d64e795046b6e3c |
|
BLAKE2b-256 | b2ba25cc8df3af77f0c99c5e6c32b8d308f08a4de71856eb0ff04b7369322e8b |
File details
Details for the file dqcsim-0.4.1-cp36-cp36m-manylinux2014_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad79365f5799116fcdb0186e37d39b179e6bdf8e07fb44ae8fe82596931cd696 |
|
MD5 | 73c963af4891aa336ab72722b48f7091 |
|
BLAKE2b-256 | 6b5ea7e2773e0eede208b873b4081e5887bd4bf568d97704c47cc787db4a07c7 |
File details
Details for the file dqcsim-0.4.1-cp36-cp36m-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: dqcsim-0.4.1-cp36-cp36m-macosx_10_15_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.6m, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 975b05aca76b5def4dc42e13181ec6863f65168700146e246ee36ec098debcce |
|
MD5 | b0b88782eb2d8814da645505b74ad3fa |
|
BLAKE2b-256 | fa98a05dfcad5342a22803ea97ff5f0b670df88ab480a5f63f447e7bfea9d1cc |