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.1.tar.gz (88.6 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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (767.4 kB view details)

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

qdd-0.3.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (734.9 kB view details)

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

qdd-0.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (767.5 kB view details)

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

qdd-0.3.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (734.9 kB view details)

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

qdd-0.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (764.3 kB view details)

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

qdd-0.3.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (733.1 kB view details)

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

qdd-0.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (763.3 kB view details)

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

qdd-0.3.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (732.0 kB view details)

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

qdd-0.3.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (763.5 kB view details)

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

qdd-0.3.1-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (732.2 kB view details)

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

File details

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

File metadata

  • Download URL: qdd-0.3.1.tar.gz
  • Upload date:
  • Size: 88.6 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.1.tar.gz
Algorithm Hash digest
SHA256 28a24e6adb9b13f843b08a279a04c3a993032b2c6214105e8e52db9041dfdbe2
MD5 b6ae7c0f104a0b41e5263d442b19968f
BLAKE2b-256 08989e888f0eb78b536a947a94e696f521245db5e1e8fc501e3a7c9850520469

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1.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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a3417870d13276393a926fe0c41617532147a8173d61f2107d71032a397bec0
MD5 be7799efb7c6a4e9bf78872e13c3e922
BLAKE2b-256 2a9b4a782f05131e13fe98bd64fe603eedcf1e818f211cd86d38b8d848fff747

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 22f900500a4b6a5d855e248d6b1a95383e15ac1a034c84e5b2fa0052e0da07cc
MD5 528d66e578ceca357018f4f8a36276b9
BLAKE2b-256 1b28a710f2747c6b2af5e0fad1acd237c4bb00656d413315cc7184340f4a146c

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b18e7795478a4bef88610000d1dc4ec41018bc83b0ef1301823dd0ef6c9c1a3f
MD5 f0c7431783c970f193ce1d20340f0651
BLAKE2b-256 8531282ed977485458c28bdcae9013723cd2e731b6a8f4feb04c19b50ccb9fa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 95f48b572bc076b664df7cbdfedac8c7d24f01557d72737fe2d50ef97fc386ae
MD5 ef4acfd4e79c8f66c919163ab08da21f
BLAKE2b-256 a9188585cade4102da7f3c6225dd75d9b84ce6353f76d8106416888f7337a723

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2db2387a7d3cd168868ce7b4c8ed907cfe5829bdba7ba37c3860b1241a88c5b1
MD5 7dc0537ace76b360b3438f664803d423
BLAKE2b-256 0b66e105f8054fbd66380c597718a4cea33e28be84043d3e676f42147b3bce77

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fce94cf6bb48c0487a227e5826bd400ed9eefbb6a6e54d87af000a74ac93de12
MD5 374ce15fe9d70097701ca34871fb4441
BLAKE2b-256 527c68bb2f2fcc95797c0503e602b0c0721ccb7218b99f2c8b96eb4f6a7b5250

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3bc8f1a39bc8c52519618a5e069c8d00a35d6cce7b86561f918307802f23a241
MD5 7e6ded410c55f06c5fd9833bd35b3cee
BLAKE2b-256 77362fa1b265b226354f9f35c5d3980d16dfa94d7a43e6ee85514a0596812d2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 08c47f762260a960e4fa294c056f766a1c8912209edac86efd483cf7547d0edf
MD5 c2542acd578187926789d17cdd54fdb1
BLAKE2b-256 a251a9f18be2353c6b10d5cd2cbdfc4c0bc58ed1c6b9a6b498486614176e48e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 565ee8005c68d857581719fafcca5bce4cfc3982b455a6d80e5c36e60703566b
MD5 3bb43fdc8defba0baa76ba1b37555a28
BLAKE2b-256 2371c3ab9684a91ba1d77a46b2ecea1f0909dfbbfda6a1d6127fc3468cd256f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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.1-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qdd-0.3.1-cp39-cp39-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8c7b123e4a6609b9c0e580f10f2f6f838868107ae15b8481b696919a655922dc
MD5 15eadd4d3b01e07040239d7c14b644d9
BLAKE2b-256 e9cc585da9409c6de791d0e71469da7036cfc69e75b9034153503238d5bc5c7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for qdd-0.3.1-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