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

Uploaded Source

Built Distributions

qollage-0.3.0-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.3.0-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.3.0-cp312-none-win_amd64.whl (15.3 MB view details)

Uploaded CPython 3.12 Windows x86-64

qollage-0.3.0-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.3.0-cp311-none-win_amd64.whl (15.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 macOS 10.12+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 macOS 10.12+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 macOS 10.12+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

qollage-0.3.0-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.3.0-cp38-cp38-macosx_11_0_arm64.whl (14.1 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

qollage-0.3.0-cp38-cp38-macosx_10_12_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.8 macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for qollage-0.3.0.tar.gz
Algorithm Hash digest
SHA256 49fe3a6742a795ae20d8af7ff9b3e62c4d9b046659f224e1d2fbb2ee470404eb
MD5 66adc719c142ab3e37672c4d3d1ca18e
BLAKE2b-256 1b82d2d0611082e10e4ccfd7c10a6e68fddab40541059a2d864ff33a976ddf82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8938944159372f7828bef2f294a093f6c2eb74b3e680ec76f5b433752d206c4c
MD5 289d5f8f8dd607ac606eda5c3a175d55
BLAKE2b-256 504ccfc9b35463c4db18472f85af2e61f7b9fb9dd940a500e7d083d0c06aad9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0caf459fa93d3001e4975ba91524342a398cc36ff2ebd31a259e59e1e2dea55d
MD5 544cda4150f0f12452e56fed7801c3fa
BLAKE2b-256 d5ee6276685fb893abe782c9f6cf4cf0b9c9423f8efa8de314985171da8c01fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.3.0-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.5

File hashes

Hashes for qollage-0.3.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 c245e07662022297b5dd3bedc62af81d61ed2738f9d7664d6de4c43224226a1e
MD5 f801feb51136644869c45b04593743c8
BLAKE2b-256 ba94afdc2888340f59bc018465e87c15d7d6476d282dba3723afecad618fcc7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c86e61fe2f8c47bfc537f3682b9ccdd72fc6925f8c9fc8da0736c98cbe3b825d
MD5 f9814ccb4824d8a998a04e34cedc8de4
BLAKE2b-256 71744c70650e5fcf41a05f060384d5626b6de2710cfb0def63cc0dbba2e50dfd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.3.0-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.5

File hashes

Hashes for qollage-0.3.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 4ffce196e0b80c68d16b32944e020f60418493b9f6e8b38dbf3c115fc6f345c7
MD5 12c34f07f41659f0552b225ab50e2475
BLAKE2b-256 8b52b1dd553d8f216f5033a437f05a83dfe8ef18f2220677f0b66cd45cc2c2ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37c758239ebccb999b9445fb79e935091fef743492b2003a2b492a6c77d19b8b
MD5 b9209d97e5895ac3a5b7af2ea91991bc
BLAKE2b-256 45cc5d281848baaffb6a6c117ad651e983658301fb59051a273288dadfe3c365

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb1c49d6a6cb071a510fa46a67e8b2129abc3a2387d608a3706c347c744171b1
MD5 9ef42bd59cb1c4e1a889cda14e243e1b
BLAKE2b-256 62c9911fd6367b84da67ead8a300a4afdb25dadb400d6b7e6081b339ab6ff853

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f1941af701460210c995048a0c7898116e5a1761337b6e97d94836e9de1de12b
MD5 5c452845fde2f17c618bb46c447f3e82
BLAKE2b-256 d89f804263be745e8b68462c9868b1f18db9d030ae10a11912505edf229319f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.3.0-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.5

File hashes

Hashes for qollage-0.3.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 3891dd2e02f16bce449290d377b5f685dad0dcc32181c18e90f2951c3b232859
MD5 bc343d9f4de3cce3676e743840b88699
BLAKE2b-256 c45609153d05dbda74b6314d89cce0607b5bd96fff92786af337416fe0578eaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 04f776f95ad9ca759790bc31d4735a91db59a861817cb42cb99b08f9069752d1
MD5 f32d0077f9dcfe0b181d9e9708862ec9
BLAKE2b-256 1c592c7ec86c1f71a7d7b431d851a641cd082b54372202339ce8863423536035

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f192d454f4b0ce32bcad96157f761ed3448ccf012c7bbbbb5bfcefcf6536b04c
MD5 9ce6f0aa57e930d10514a2b69ba0637b
BLAKE2b-256 b01160766d2a5001a62281d46067fc7bb2037e0c9b356e6173ea9a66e3d720e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c5cad51f11e0bee148abdbfb8e51b3133efade5c9a515123ddcdc87df56dec19
MD5 75f85ffc2e68afc823dc16391186d4a4
BLAKE2b-256 867b7b73b055794450f8332339507fd9f65985a7775ec50f56896c78304806fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.3.0-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.5

File hashes

Hashes for qollage-0.3.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 b73febe68d0774704e66e83429f4d5d05dc3eb6873da97ead833508e10f63aff
MD5 217fa0353bc38d8a5d513f2cf5b7c848
BLAKE2b-256 e6f2d7c578470f3c368558830344e890b054523c78ba8ac8aa6bb37b72ffcbd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbe36088ca3dcb09f28d791b0840f6b5f0722317bb5625d402de425a77fbfc9f
MD5 6e45db9aaf4e0045e0104cf9ee668f43
BLAKE2b-256 08b00494462131e8e2ac3e06c0bfbccbf21d3ffc3a1201c48e601a2e22025c6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d2020ccdedc568c2a0ea2e2d50db841094cf2c84dabaf53a7d86951e61c18777
MD5 149ae5ec426dfd54a2dd6727b184f87a
BLAKE2b-256 0b72a5ebecc370186ce2653ca39fbb6fe5749ffd5831d7346b44767add616a8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0f026b7059b67c6cbb7407a10214a35d2227f80031feb72be6108be100bde675
MD5 87dd8f4f4722b308f1be553690f16bff
BLAKE2b-256 0a34c5920d248c58396597a6ca6098bc0ce3a56b1240217263446fa6857baef9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.3.0-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.5

File hashes

Hashes for qollage-0.3.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 dec3a350ff80ad257e57e6e15a1ccac4ae852239cc0443f7918823337dbbfe1d
MD5 a715e233a80c48062c915e9a21e8aab3
BLAKE2b-256 e15bfd1337ed8949b22487e7364d66faee3de36622236f088d54f06dc529f653

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 637f41f8b96559a6603873e6557673a9805c0df2cd1326a1057ee15d2b8cf915
MD5 38f2810376b1fd6a4c920b4bfa8c48ca
BLAKE2b-256 8be407af57f56572a13ba0543ec524bf49bddd32aa05416c36e39f9d77666976

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 672308ed3297a96a81ea5f5ca8f36cfd5542a63eb765c9399b5530ddc406be52
MD5 303d51a08673a6f7f83cc5e22d8faf8a
BLAKE2b-256 327935050efdbc7f1bda3b14043a57a42f69954749588db9ad89aa27f7d170e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.3.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1e8e4a29b826503320c22bd6c1d8dfe8fdbceefd5f13031afb128bcc02732b35
MD5 6f0d2b3e4057c8d1d7036d64c621e921
BLAKE2b-256 c81f7afe59c489929ef10a5b30a671da8a9298b22433b1c32f13e6e57cda6cd9

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