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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

qollage-0.2.1-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.2.1-cp312-cp312-macosx_11_0_arm64.whl (13.3 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

qollage-0.2.1-cp312-cp312-macosx_10_12_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

qollage-0.2.1-cp311-none-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.11 Windows x86-64

qollage-0.2.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.2.1-cp311-cp311-macosx_11_0_arm64.whl (13.3 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

qollage-0.2.1-cp311-cp311-macosx_10_12_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

qollage-0.2.1-cp310-none-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

qollage-0.2.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.2.1-cp310-cp310-macosx_11_0_arm64.whl (13.3 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

qollage-0.2.1-cp310-cp310-macosx_10_12_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

qollage-0.2.1-cp39-none-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.9 Windows x86-64

qollage-0.2.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.2.1-cp39-cp39-macosx_11_0_arm64.whl (13.3 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

qollage-0.2.1-cp39-cp39-macosx_10_12_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

qollage-0.2.1-cp38-none-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.8 Windows x86-64

qollage-0.2.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

qollage-0.2.1-cp38-cp38-macosx_11_0_arm64.whl (13.3 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

qollage-0.2.1-cp38-cp38-macosx_10_12_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.8 macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for qollage-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4902fbb97d3e5d434af0ee828ff516e00b4c3fa74c53b88c226e1a02e8a807cd
MD5 cbe810eaca2d90bf79ebc9e0493bd589
BLAKE2b-256 8a56fa7d5030bd223bdf0010ab38b462a0d3b656b0526e537e094bb71528cc2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e416686931fa3f69268f43862496a5559b6cb6a8f84e91e72fdfa60c5e85a2f
MD5 9278d68d72e23296199d367fe27daf85
BLAKE2b-256 68e2acbc7c8583867aaeaa0b589e32a81bb2dcb14ac179eb317752aa38be516d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 712851aa4da45092edebf677ebfd416fa381afa4ac32ef84c7d906232f1891f9
MD5 4c09aa3447d07c0ff8433d9a103e022b
BLAKE2b-256 d6af99364e9643555aad5d5ff28fe32fcec13b08472ac1bf5dd91ca9b036d5be

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qollage-0.2.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 5cc7c67fecdb279d0b42f50796b9300c874ea6268765497ac6b612b9d4c90bd4
MD5 9967923dd62ab6fe5dfd4f0595858d2e
BLAKE2b-256 58d4512620e50a30ec3f3933c311505ab14e37b0fdb584ac11547a7bd40b2115

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7717855970f648c12158588db59af1ae17ba6f9fdcf913c03219c624c7c5302
MD5 adde2061870c4a82d778a16b91f1a995
BLAKE2b-256 01ab0bd98e6ecb0219cfaa340107eecea172eb2fb3540ccf439f88baa7280c15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 449176d554290203de13ef651374ce3393cca8f2b5fc526381b2572d772e1345
MD5 73df8ef2467b44019e199001c2cbbe83
BLAKE2b-256 67aa58d83d0b35ca4c747c37160fb33811e55ed7f10c598a07a2b8b781e50998

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cd828b285b495634bf04ac82461181ee34705edf2fdbc6ce6377226fef680e68
MD5 7f2df501e3e70f16ef221845d80ed3d0
BLAKE2b-256 b784bcec16b627aa204dbeafb4a2d9582218f4bd6e32c07f73db8de4091e5a94

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qollage-0.2.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 b97bfcfc8443780ca172e2443e4ff40d1e22019041d78851c2876a775fc93728
MD5 3a1c3ad53421cae42224f800e9aa206c
BLAKE2b-256 a7ec01a622478c53997276fe4e8b09d33508963f6210ac444949699714f4e062

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 598afce99f53c36a51cda02ccf8276644ef43302ec78a2188ddfafccd0c2f6ff
MD5 8dd7c4b4446ee8400df95b27d3eb747e
BLAKE2b-256 ed02e3c6d00e31a7f25375d397c7997cbb7ec3984c5426fa74b65559213a60dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4230bba2517949dbe52ae84544367de3f66b2ebf4e29a011f154dd470bb34280
MD5 12159cba9e05b2cb91c81e8b4d4efcd0
BLAKE2b-256 6a43dbf778bba29df4a3f4fa0fd11b349d934aa2265f448d6bed75d12c68010a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5c7693552737d014a9433db358ecea44f9f16a6395eb3991cf31d8084ebb222c
MD5 739c407f89da98752a62493ad48f1c9f
BLAKE2b-256 b8ffe552ea3d67ffa1ae12f031d039535c7822a9edc83ffab5d02d7d1465f286

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qollage-0.2.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 57819b3b2c3bfa7c1029b002d0f9ab09fba8ce8245428e8bb1255e234b174a11
MD5 7bca74849a7025a619d16957503c7420
BLAKE2b-256 12a4b401770d0936a368212f129fc18397ace737525dbe89c09eb3c34f16d068

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d88488243b90abc4b90a850d092795fd94f7960b9062207a51b3777c2a6f30b0
MD5 b805e423bdc33a99d53612fce2407dc1
BLAKE2b-256 6e5d806fb6108b37e7b1827c4f177444304fb4a7f8b23f80457297aba89c7786

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dacc198a360782b3ba11d187acc3c9a9f0be8632f9682612d9300e204a47990f
MD5 248d09b89723713626eb15c1c71f943f
BLAKE2b-256 8abe85266a8501c6e57c58dbaa16211da2e5687372fcd9930fed7cf4f8bac881

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4bb13309b38f7cc840bd386dc061448cc409030bd168d724e56a5f56651704dd
MD5 ec6f81aa5ae7a2e6de3e7d83045ba754
BLAKE2b-256 3753c01bfce7e05458024e3db10b4bcd0d035aed59d68ca99a3ee023abbd6081

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qollage-0.2.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 20fe33d718fb2731ee4db59b83025f15b41c326f2831309c70031a1fd706e825
MD5 0b6f434ffff42161382ff96da3624343
BLAKE2b-256 f66af1aaaddb38e84211e9ec2fa5d17461c41e0c6bdca26d8fd238a7162db9c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d10703615efa39e9f3c184b77c9630d9036ba1417fedbb1a771132d50f045d7b
MD5 2baeed0d68a906b7007469a9c001722e
BLAKE2b-256 d0ffe39998de50f05b6798039ae248dea91efdf8c151ac9ce977d06fcccf4822

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10f6c9d44e9b7617e5567d002cfda6e8fd0596e14954de7d5301c03238e14213
MD5 c988e7ccd0f77da6267ae676bc1c1cd9
BLAKE2b-256 e2ed88cb457f17b35cbdae5c018c9fa0a9b66315957843b3b05411a36658b39e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c1d25249be803bf1ec70e3f119b643ea3facf52cfc333a3af41190dde8a8db02
MD5 ea9ad6f06da535b0f4a4eb665495d0f8
BLAKE2b-256 42972ee20488571a9a5c4f8c789a219fa707e09f160ec003e7e5e86e062e0c5d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qollage-0.2.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 16dfa2b9f8a2a3c2d10c62fcfc5e8836ea3fce93f2f8dd7161abc81da06d3db3
MD5 d9114d293bab13d843a9efe18095acad
BLAKE2b-256 8b1d54a660711e17c990ad8282d818fa7379524cfdbc746880561c533397b3ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c81513903350a452128a5a0cc25b4fea7ead3ae603d37793608156736de95e1b
MD5 eed160155b49e4f31a0e8148882d6538
BLAKE2b-256 a64ef583ba73d7ed234e755922756d786262b6bd631f884355798f633c4e84b6

See more details on using hashes here.

File details

Details for the file qollage-0.2.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qollage-0.2.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f5831b5540bc998dd496db4f0cf4b294f70c0c0f178197225f60d0f4323c846
MD5 1c3e87b7d8df31060d5ae6bb8486bc1d
BLAKE2b-256 964c766c2181c960732188ce1e75d89d9d224401c03c8d9c0b1042776be72dd2

See more details on using hashes here.

File details

Details for the file qollage-0.2.1-cp38-cp38-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.2.1-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 505eb9b215a8f0dd89853377c6394e32004ebf8830b3fc8d8338b02d704e61a7
MD5 d4d236a14b6a53e21debd3299a676ab3
BLAKE2b-256 0cd00a824f9eaed868391360246a35ba2ecae5d6dfb95b9aada4d41cddd3074b

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