Skip to main content

Qiskit Provider for QDD

Project description

QDD

About

QDD is a decision diagram based quantum computing simulator. Memory usage can be significantly reduced compared to typical state vector based simulators.

It works as a Qiskit backend. At this point, we do not distribute wheel file, so you need to build it locally.

License

BSD 3-Clause Clear License

Installation

Standard (without MPI)

pip install qdd

With MPI support

pip install qdd-mpi

See README_MPI.md for prerequisites and details.


Supported environment

  • Linux x86_64 with Python3.9 ~ 3.12

Install from source

Build

You must prepare the following software.

You can manually build QDD as follows.

$ cmake . -DCMAKE_BUILD_TYPE=Release
$ cmake --build . -j
$ python3 -m pip install build
$ python3 -m build

BUILD_TYPE can be either Release, Debug or RelWithDebInfo. You can find an installable wheel file in 'dist' directory.

Alternatively, you can just execute the shell script in the project root to build it in one line:

$ ./scripts/local_build_and_test.sh build

If virtualenv is not used, it will create a new one named .venv-qdd under the project root. BUILD_TYPE is set to Release this way. If you want to just build C extension module (.so file), skipping distribution building process, you can specify cmake as the first argument of the shell script.

Test (Optional)

This source distribution provides functionality and performance tests with pytest and ./test/qdd_test.

Command

$ cmake . -DCMAKE_BUILD_TYPE=Release
$ cmake --build . -j
$ pip install -e .[test]
$ pytest test
$ ./test/qdd_test

If you want just to use this package, not editing itself, it is NOT recommended to execute these commands in your in-use virtualenv because it will install qdd package as editable, and qdd will not be installed under site-packages and python will try to import it from this directory whenever it is imported. In that case, it would be better to install qdd to your working virtualenv from binary distribution or without -e option, or execute these commands in a separated virtualenv. However, if you want to contribute to this package, it would be a nice way to keep using the environment because your edits will be reflected immediately to the package.

Alternatively, you can just execute the shell script in the project root to test this package in one line:

$ ./scripts/local_build_and_test.sh test

If virtualenv is not used, it will create a new one named .venv-qdd under the project root. This command includes the build of C++ extension module. BUILD_TYPE is set to Release.

If you pass all tests, please go on to create wheel file to install it as written in the section "Build" and "Wheel Installation". Note that some performance tests might fail depending on your computer's spec.

Wheel Installation

Please move to your working directory and install the wheel file created in the build phase.

$ pip install {QDD_DIR}/dist/qdd-XXX.whl

Usage

QDD works as a Qiskit backend.

from qiskit import QuantumCircuit
from qiskit.primitives import BackendSampler

from qdd import QddProvider

backend = QddProvider().get_backend()
circ = QuantumCircuit(3)
circ.h(0)
circ.cx(0,1)
circ.measure_all()
sampler = BackendSampler(backend=backend)
qdd_job = sampler.run(circuits=circ)
print(qdd_job.result())

QDD has its own implementation of the Sampler class

from qdd.qdd_sampler import Sampler
sampler = Sampler()
qdd_job = sampler.run(circuits=circ)
print(qdd_job.result())

If you need statevector, create the backend as follows.

backend = QddProvider().get_backend('statevector_simulator')

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qdd-0.3.0.tar.gz (105.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qdd-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (770.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qdd-0.3.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (737.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

qdd-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (770.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qdd-0.3.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (737.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

qdd-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (766.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qdd-0.3.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (735.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

qdd-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (765.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qdd-0.3.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (734.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

qdd-0.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (765.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

qdd-0.3.0-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (734.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file qdd-0.3.0.tar.gz.

File metadata

  • Download URL: qdd-0.3.0.tar.gz
  • Upload date:
  • Size: 105.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qdd-0.3.0.tar.gz
Algorithm Hash digest
SHA256 44343f7e14a1a931f8468f702e4ecf499e461fb85a85b182a704be006d35c586
MD5 5ca9769008bea4e44e80cdc30b0c3317
BLAKE2b-256 071e79653da7e7d2577b3ed621349a13885ecc5fb4743b5cbe43e02f1d6189e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0.tar.gz:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77fe2bb9afbc0997ffce1d1d6811d7e0c9281d3e34d0695638f1b2b91e2dc6b2
MD5 795faf495afc40d2ffbab37fca317e06
BLAKE2b-256 0c4dd8ba864f29767a401462cdfa42b86ab1a4895556d7c9b2b8cb38872a7dbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f1cd1e6c863d2acd9bbf941a03286152ad5eafbfa8ca60567f9ade32a4c7a331
MD5 4110bfe4e5368fbac7c80bf337e19e66
BLAKE2b-256 b5da72ad849baef8e783f0fd1771704d21d2709b27d05b662dba41778f4e4bf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6bb1c91713a17543b8dfc7414f33a795cc5b55b10e67286cdabf19f1b54d7a61
MD5 7b5ea935e75a5320fa0b22e00cf54871
BLAKE2b-256 2152d4debc4720a757958cbeee0222b0c678d2b17fe28eb104c188b58fd4d543

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9da784f25f2acd243053c163b21c785564bda2eedc8c84b7e47d5f0304557805
MD5 a04f625422849a394d8d80b5df161cc7
BLAKE2b-256 1cc7b3250f01e801b8ec0eb9ba745f686a65f0342cf4f26cc85326e7e1ef022b

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ad7ceb0e87087a76085f5e6d49ed1a47d831cf9679f9c931ab853f2bfa7d2d8a
MD5 f4bb60e47dcda0bff6fa6acc5df39e86
BLAKE2b-256 79e73dec6302f843c7575a5bbe3de0db1478c993964ab4ef83721bc34c297013

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f4cadac8386d7f7badf1265aadcc630f273d5e2ffe90d1287b73ca068356d934
MD5 a495026fef76b16dbaf98c885c01a344
BLAKE2b-256 155987fa53323c0090c93060d83dfd1e48bfb3f59cc194e636ae961c50b5e3a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 02e5fc5d4388f07bae8c19cc0f2d85130371885d370b7f119854a16f9386a2ed
MD5 c8979a81c75b90d10efe3202eaaa7a08
BLAKE2b-256 c5a7973bb9f29fdffd53317e82a98ec91845b8dac436c3699374ab6a4b8e67c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5fe65470a774556c8319495f33b6e47b44fd0736369499e13953a16b46308486
MD5 b03eaae27e0ceab40f2395dec5e327a6
BLAKE2b-256 4dc43237385292f7c4de1d3bf36bb0e4dc7a7305297a35db7e7ec926996db109

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ecada6295dd05150406229fb8da538dbbbab3fb2b307d813392da7c860b7effa
MD5 51b9ea18c4d6a3d77da073d726c1a342
BLAKE2b-256 b4131f717a2bfaa85f9e46b25845ab227e1ba12b6759fe9f93e5166b619179e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qdd-0.3.0-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.0-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f5873c99872a1ee5e335e4a10499cb3d4abf4599c5e497c71ec3062196a4388d
MD5 1aebdb2fa2168884676fd58681f9158b
BLAKE2b-256 98b4665544a9529fbe15431e536a845ae07f754f7f9a357f6d9d0e3bc55adf40

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.0-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish_to_pypi_ci.yml on Fujitsu-UTokyo-QDD/QDD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page