Skip to main content

Visualization tool for qoqo quantum computing toolkit by HQS Quantum Simulations

Project description

qollage

Documentation Status GitHub Workflow Status PyPI PyPI - Format Crates.io

Drawing tool for the qoqo quantum toolkit by HQS Quantum Simulations.

Qollage provides the save_circuit and draw_circuit functions that allows users to translate a qoqo circuit into a png image and either save it or display it.
These two functions will create a cache folder named .qollage containing fonts and Typst libraries in the current directory. You are free to delete it but the files will be downloaded again at the next use.
It also provides the circuit_to_typst_str that can be used to generate a string that can be copy pasted in the Typst interpreter if you want to edit the circuit further.
The latest qoqo gates might not be implemented in qollage yet. A circuit containing not supported operations can't be drawn and will result in an error.
If a gate has a string parameter it will be printed inside a typst mathematical expression and the typst symbols will be replaced.
Alphanumerical expressions will be preprocessed, if it doesn't represent any typst symbol it will be escaped by surrounding quotes.
qoqo.operations.RotateX(0, "theta") will be formatted as θ.
qoqo.operations.RotateX(0, "param") will be escaped with quotes and kept as it is.
qoqo.operations.RotateX(0, "\"param\"") will not be accepted because the extra quotes will interfere with the quotes added to escape param.
For more informations see the documentation.
Here is the list of symbols but be aware that not all of them are supported by the font used.

Example:

In a jupyter cell:

from qoqo import Circuit, operations as ops
from qollage import draw_circuit

circuit = Circuit()
circuit += ops.DefinitionBit("ro", 2, True)
circuit += ops.Hadamard(0)
circuit += ops.CNOT(0, 1)
circuit += ops.PauliX(1)
circuit += ops.RotateX(0, "theta")
circuit += ops.MeasureQubit(0, "ro", 0)
circuit += ops.MeasureQubit(1, "ro", 1)

draw_circuit(circuit)

General Notes

This software is still in the beta stage. Functions and documentation are not yet complete and breaking changes can occur.

Contributing

We welcome contributions to the project. If you want to contribute code, please have a look at CONTRIBUTE.md for our code contribution guidelines.

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

qollage-0.4.1.tar.gz (201.7 kB view details)

Uploaded Source

Built Distributions

qollage-0.4.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

qollage-0.4.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

qollage-0.4.1-cp312-none-win_amd64.whl (15.3 MB view details)

Uploaded CPython 3.12 Windows x86-64

qollage-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

qollage-0.4.1-cp311-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

qollage-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

qollage-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

qollage-0.4.1-cp311-cp311-macosx_10_12_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

qollage-0.4.1-cp310-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

qollage-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

qollage-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

qollage-0.4.1-cp310-cp310-macosx_10_12_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

qollage-0.4.1-cp39-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

qollage-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

qollage-0.4.1-cp39-cp39-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

qollage-0.4.1-cp39-cp39-macosx_10_12_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

qollage-0.4.1-cp38-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

qollage-0.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

Details for the file qollage-0.4.1.tar.gz.

File metadata

  • Download URL: qollage-0.4.1.tar.gz
  • Upload date:
  • Size: 201.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qollage-0.4.1.tar.gz
Algorithm Hash digest
SHA256 04b2ab8b525a0ee76cbe1fd107b51d1913abd32bb4a12d0633b05c690288f141
MD5 f557cfc09961ea119071d5cc625a343e
BLAKE2b-256 75511b82dd6347e70203022cd04b0c7006f4772f26dca7dae359fe504795549a

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 096dae377328da7521bf1c485f3d14791f42c269f6292548f59cfc7c5c699498
MD5 9d8237f4503a88ec91a8912b06d6c3ca
BLAKE2b-256 a232023f2584114ff3800421df25c70f0f98c984dd7771af2dfe943881491cd9

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3822b32f0bcf6e0cb9ff91d521014a83dde2a4e8a85b37bebe9f35b38888b3ed
MD5 252d65bc1d85adbac85b22d8ef10d810
BLAKE2b-256 908f8505e293a563f456c88bb97e03aa412c905b7de78f01c032a5be63135043

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp312-none-win_amd64.whl.

File metadata

  • Download URL: qollage-0.4.1-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 15.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qollage-0.4.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 db5d295db6ba4a3b4668adfb8c6f22b3a7df64eb540b407a0f0ef2988aa5cb74
MD5 5680b7e4b74f6fb12b6bf4bd74665c6f
BLAKE2b-256 acdfe81529c82ffb8dd3eb5520508a26d10aade3d948203a5808f627d457cd3c

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ada8054704787987c4be705139b3b346ceef57b362f2410272d09a9baaff53d9
MD5 637b7f96a55d73885b488d9f796c7fbd
BLAKE2b-256 b09a5c7d86342e47f3fea1e1c865c2a046d74aa4ddab0441db69e2ac2794355a

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp311-none-win_amd64.whl.

File metadata

  • Download URL: qollage-0.4.1-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qollage-0.4.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 3651a107fd763f45210d34ceed5517b1def962abc4a418b1582efc961abfca31
MD5 eebb8f627d8b433c939c1ef3cfe89417
BLAKE2b-256 0841931d896b2093ad7573b5259c17ec72b18650669a81a515d9e3fb3d1407f9

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a283cc752d16217e3f06c06c7717e8748be001845de1ee73a9deb9fdbd490c78
MD5 e9f03331f77f00c6758cb1892d755f13
BLAKE2b-256 63c17aec6660e134d77a5d5322188dbcbddf35f14f21551879aad50525a16b7a

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51d3321c154d522a085dd7c525068ac95712bffbce3886900ac81231e2879d5d
MD5 7e789f81b68394759eeec6ed9825fa94
BLAKE2b-256 9fc399c22f9aa7f10b3df9bbe59dc4e943ab8489c99011e0d39b35450c98e154

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0cd9655b8110d14b9f754f087efab27424a300922dec4a1f087aef740d6d7682
MD5 f613f6550871ea2b4e6d51ec7e8af43e
BLAKE2b-256 9b6875850d1f2cce688f4dba2d23a6372162532dc3f172da3b83c57ed4cbcc11

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: qollage-0.4.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qollage-0.4.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 66cfc07c2049782a5c588ad160dfe9875be5c5b70501eab7065b3149cd6aa5a0
MD5 73708214b488c4252f585418976cb284
BLAKE2b-256 ce70a0fca0ffc7de01a819b88a9b73ea699905900b35796de4da80bcaf01dd5e

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b8e55c0cdcb8678f19b59d4f5d25027a4e64079c3d0d3cd60eb2ddadd9b07d3
MD5 49b26b18162b8ed302e430cc721c71d1
BLAKE2b-256 299bcb2baa0464113b1d51b6b65acec13019f46ffe1cbe1b901c056d05b3c2f5

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 86ca2996ee0e62038223d0888a27f6d9cbdeab95fa04c572d94c981613902f09
MD5 ee6f8506308d4426928fa79b102450ef
BLAKE2b-256 9726e9ca8acc1674b86d649be5607488b7a967abf7eb7b9f0996fb6fea64e4a1

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c44c9d7e0215b01155a8800b3b90e25d9ede4ef47ee6ee21504eb79ad6336d08
MD5 e3f22084a7862d2a9490364b2359920a
BLAKE2b-256 6053d21343a8279b56f6bc08c35f04cce4ed5b1010d125f098762c3a7376516f

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: qollage-0.4.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qollage-0.4.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 b4a70b5b4acc3291e991a48dd68511d730fb8e0668e4f20d78bab2faa9147fd5
MD5 e4ff9e78aa8db8151e3dfe651a543df7
BLAKE2b-256 fc5fcf04e84041ba0ad1c581ec7c58dcb71bc302e101a99a998cbf744b2b9e9c

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3053a00ce7e7db38997529e7c6439776f6e8cc54503b2832494b86680a92f291
MD5 58bbe58b419087aef3c0ba4a400cae7a
BLAKE2b-256 d16f604b53a556c3042c2abf0aa9baf351cb5b67de200de5797027c0ed32d220

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f47acf5b1c2e1e0f5ad1be176dbe7f2bc803cb75d90e24a38b99bbbc286c800
MD5 feb13071db3abb19cbcee09ff7b3c7cd
BLAKE2b-256 78de093ee9742d35767d2974ca333b1f3669e3749c620abd863669e5f1c9317c

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e4013468c0aa623521eece363502f838432aa062e3c910b0c38b4804d89ec0fe
MD5 90c2a700e95196ab631e37c7edba0c43
BLAKE2b-256 e0983063ef0e94e84b7e8e854868628909147345b5885be89e3b993f5cc3697d

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp38-none-win_amd64.whl.

File metadata

  • Download URL: qollage-0.4.1-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qollage-0.4.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 cbad4d0cac5b60c5b6d59da5f6f130adf1cc4b9cc67723ea09f86538edcc5da0
MD5 2352b99aa2b2cd6c54718f4d630c200a
BLAKE2b-256 19b0dcf1b18d04a2d27026739c0c657877576fbd14bc931d4ac9f5dac931f85f

See more details on using hashes here.

File details

Details for the file qollage-0.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 453606935f7ac7a3e7b11e20e598374d925c380a9be5521eaf5bd8769486af3a
MD5 589ae1f5dec4f67bbf05f6af9d8c48a5
BLAKE2b-256 d675d61dbcdfc63df1fe2b7a0f4cb5089907ad22be568a78cec0a18989846416

See more details on using hashes here.

Supported by

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