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.2.tar.gz (202.0 kB view details)

Uploaded Source

Built Distributions

qollage-0.4.2-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.2-cp312-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

qollage-0.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

qollage-0.4.2-cp312-cp312-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

qollage-0.4.2-cp312-cp312-macosx_10_12_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

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

Uploaded CPython 3.11 Windows x86-64

qollage-0.4.2-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.2-cp311-cp311-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

qollage-0.4.2-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.2-cp310-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

qollage-0.4.2-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.2-cp310-cp310-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

qollage-0.4.2-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.2-cp39-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

qollage-0.4.2-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.2-cp39-cp39-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

qollage-0.4.2-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.2-cp38-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

qollage-0.4.2-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.2.tar.gz.

File metadata

  • Download URL: qollage-0.4.2.tar.gz
  • Upload date:
  • Size: 202.0 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.2.tar.gz
Algorithm Hash digest
SHA256 185f80e592ccb13b2f696cc6f18b523aff9e2cfa636be9b4a5869d3d08d088ce
MD5 ca6e09165e825f0fb41137ba85b4380e
BLAKE2b-256 34176627b436f9f2ee82f65bd050ff3575c387c6701dde9b9f236c51effe1400

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f33832ee1bc07c38aff4ad49eda13ad6b0daded498f1d4f36ebc80e4358df98
MD5 1769548a4b147efe826a21e486058350
BLAKE2b-256 1aee38f17b927df5a2a00586274388683af326762608dc840e994da6d62845dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.2-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 15.2 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.2-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 921be3473ba711a9a2f4ea2618f0f0885533ee92a6578f110c93ed3e5a47784b
MD5 abb2e47afb6c018a076b910b7448991f
BLAKE2b-256 a8fba5ac0e9be15b794fb07daa60652a1e373a7ddc871395c3276bc09d5bdecc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee519e30a87e3ee51041ccca916cce4097834f2e49c89083e544ba005a79593f
MD5 7e9b0e67a89f60d3bb409743af3c5055
BLAKE2b-256 11897816a2081b25b53e94528941e449ee8ce4db1539decf3ad2d27bdde98fec

See more details on using hashes here.

File details

Details for the file qollage-0.4.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qollage-0.4.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e2f0cab1aae53c2d3ebbfb2afde557335799e79f2ac60949410dfcad6d8a1ca
MD5 9bc121fea606f2b55ea3f58120039904
BLAKE2b-256 73bdab680c4cb2621cfb8a23ac5062be93f75841a7f1d90978ef12598ba8fe49

See more details on using hashes here.

File details

Details for the file qollage-0.4.2-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.4.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2aed9582fbf61641325e049352fec64d6885d58495b3ff70244ef0178b917c74
MD5 b2309784f74f65b3f8c37c4f31d95417
BLAKE2b-256 cbf86e359befc4625ae52b3b09f3229b2173bcab1e0230533590b207afd177d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.2-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.2-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 13db535b51261f8a20f57450059545b401c90b04298d5585427165c2ff2a4e19
MD5 9b8ff07448d8a21c08810f987ce85b24
BLAKE2b-256 ad18bfd3159d9eabb74d4d905f9add6b8e5aa0d25bb71ba86f4c9cacb45f8e6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6402f6ccdff25b1f27084e556d65651d08a0e801e25e01702bc3fe4bf290266f
MD5 cebd61f61b57e36bfb69b494b23fc33b
BLAKE2b-256 e68db3eb8654787c8cf5ba92e5f4e76a43546db0c6c3859567f043a9c5ce86ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3946bb3dd751ac46ee23449d4aa5729f87b8ea93e1e4d653b74f34f1151512f4
MD5 174bf40cc958ab9914d4454f84f49901
BLAKE2b-256 535620e056508cde1fe2977d636aaf53d49785f0016efeaa64f843d8af116887

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fce2806f029e0c41d1365eb00cc9aa611cb0f5d4319dce48786c762f9f092717
MD5 1c9e8eb91871cb7ce138e46bb49ad54d
BLAKE2b-256 5be6763dc78f4449640ac7a11a25e2b941562f31ad589068c063910b4625b586

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.2-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.2-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 0eda69a653eac2b22c899a3462404090f36a478f6d0efbfb32f2b67823667fbd
MD5 87754dc606d0189aac73db19c31e905e
BLAKE2b-256 a8d7b23b5f3aad14b4d741f505daffcbfe40cf8a9f31077b7d4c64c29b18b4b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a028a0690076800b98b387596df234ab60d16abb01a38aae29bfb6ebc3527d4e
MD5 c69a6cd77ac481309d8768eab15f4a7d
BLAKE2b-256 6f22a83f4cec2caa94e9b75cbd18de087b3fc8ccf057bd769048c9f478d35f49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52cb01081b76e34e9cf27281bed78c2c4c3eca0901ce031db8372fcf4fea71eb
MD5 23ef0fb0de9b93e714ca8a16cbc25be3
BLAKE2b-256 3c6b7e293f79070491bc6fb3391323a2d5a680096415c4ba0139724a2a36ab05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5c891c29e10ce93e2317078b7fe16e5b8b332f83bc3ee81b473ea03a62c5e399
MD5 2ba232e83ac2bf1f4276fb77e1109d60
BLAKE2b-256 1e29eb9a14fd60a2652a70ecc62847b48ef1f7dd97b004d897db562368ef6c45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.2-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.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 c3cea7ebdab82537297cfbfce245cb704588ed2dd09254e97e22a4b4351fc196
MD5 5a0d0186407ee8094a2b31b50338b8c1
BLAKE2b-256 4db7e08866de29549390f0ee69115d64ae3574be05fc506c0b54f64b21f8a5e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c80fe3145eb63a1ef616e42c27261310208822beeb9d7efeb567cf52a8c57d6
MD5 21eb4b59f66b630019979d49f1bcf4b5
BLAKE2b-256 1f7b0ed8868c402e6226ab4ba65c250bd5073f10f8d18b2e62e6a06ea95a96ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab17b595dd5dbe4ce17e650c50dc56e3cc7bfa51b953bbfcf2b2cacf5ca92806
MD5 4a1f3213044b002fe2b9961f9b6beef7
BLAKE2b-256 ac982fd2fc2b8cc1fa464d54ab911fb69af2904a9a5c6529ea6fca7a8bda1f6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a3289d8e36386432fba51f2d69926a4a12bd96f5afabbb9599bf25069a3d83d4
MD5 516d6a29ad02b1a3c98f25af83b3db47
BLAKE2b-256 21b6eb8f45ea4684e2f28483ad53cd36976c75472c0f806b0d280215fbbd99e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.2-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.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 1662de9ae89007665eeb31b8167147ca98cc3f2c6709d909f7dd8d5d10de7c01
MD5 0cba3d7dad02a908223cd6b94b012309
BLAKE2b-256 94dfe96b1b9dc421118e3ef0b8328ce45539ee513e9cc601cf9c8e44103e5a4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5370f76c35240f7e0cb3e6a65eeb858847d6197f98c86f0145b941b13548e9a3
MD5 718339cc7e4b24450b0a9f8036d1365b
BLAKE2b-256 72b5fdf16ba82627af00c31ef7399301e87cc25c944bda94bbce073f88fc9c7f

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