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

Uploaded Source

Built Distributions

qollage-0.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

qollage-0.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

qollage-0.4.0-cp312-none-win_amd64.whl (15.4 MB view details)

Uploaded CPython 3.12 Windows x86-64

qollage-0.4.0-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.0-cp312-cp312-macosx_11_0_arm64.whl (14.2 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

qollage-0.4.0-cp312-cp312-macosx_10_12_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

qollage-0.4.0-cp311-none-win_amd64.whl (15.4 MB view details)

Uploaded CPython 3.11 Windows x86-64

qollage-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

qollage-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (14.2 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

qollage-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

qollage-0.4.0-cp310-none-win_amd64.whl (15.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

qollage-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

qollage-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (14.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

qollage-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

qollage-0.4.0-cp39-none-win_amd64.whl (15.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

qollage-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

qollage-0.4.0-cp39-cp39-macosx_11_0_arm64.whl (14.2 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

qollage-0.4.0-cp39-cp39-macosx_10_12_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

qollage-0.4.0-cp38-none-win_amd64.whl (15.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

qollage-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: qollage-0.4.0.tar.gz
  • Upload date:
  • Size: 206.3 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.0.tar.gz
Algorithm Hash digest
SHA256 af678bbc98e11d462ee8c866bec3d22f8bd87c5e8037dd7df154051c892330cf
MD5 f7adbcedf8866dbfdb505ac9d2e9365c
BLAKE2b-256 e459f0d88d3effa0dded968c0b3d3fb5e8108d820da23c65486a767423d898dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1bfeb3d9d4ab0b507e59ac09fbd821753e99c4f2eb6cba42cfe53eb5bfdd9c80
MD5 00dddfb768d4d7ad28875b0fd5be39b1
BLAKE2b-256 733f89d8ba6005b30ecddb2d21b8a64c90064c317b498700bd3d2b3ebf0b84b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9049f1b2dbf865aa570cfa4087b7adf7744f928937b9f1dde81cc282beb1467d
MD5 a466c2c2bd0dabdad03502158af0c7ec
BLAKE2b-256 a7790a1abe08add93c32bd8cb7309d8660667d657163cec83551719fb362447b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.0-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 15.4 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.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 3ed6277f8386a0593b83138917cd21c897d968330f9c0829e0f0c7cb44d127d8
MD5 43e9de333f2c591e1fe6e69db6247e64
BLAKE2b-256 62ac31be0bcfcab5cc330cb60fde1e55c171ea54e7fdfe4d09c6045a91de2154

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bffddc6ac9f1eaa6a22eeef1ff980d8eef4baefc83dffacb6d0a1c21ddb45495
MD5 468e61db4572f53276cc373e61f9fb6b
BLAKE2b-256 b5af85f883591c201f37a2fc24ea61cc5d70cbd9068745fe671241ea436b1945

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7cf259fadc3ace4ed7a1182aa2ed8189449bd7f0826b8a1dc19cb8d32b31a1ef
MD5 c7897fa02e94876305a58d4ecde8b6a0
BLAKE2b-256 6a62a248675c5113dd5e097a251207703ec77c6644a5594eb53bb25cd1483fa1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4d9cca256edb17dce438c1556a0dc007a595999b0d30ccdbc10f69ba5d62135e
MD5 d33eaa19e7cc95f974c49bfa362e0951
BLAKE2b-256 160a58f7c6928f6f988a0341eb4f75d6e00c5a19ea31c4f25b9377a928b9c6b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.0-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 15.4 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.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 53fb750d6b96b2cb48450ad1615c6ecec12412f6f5a44681817968aa2c3aed7a
MD5 883d20c6272c47be9f368f84d128953f
BLAKE2b-256 52d55aac0c1f36e7045274b0d940d6d6e10150ca33d5d823451c95585111490b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93fe6069ea8d5e213fc288d09ca8dd5137cc6dc19dceeacb2565e6cefe1dee62
MD5 cbc8446262e1e292b86ca639df8b2a17
BLAKE2b-256 880bf52d4beef2b78cdc0d03f06dc92a478e99fa2084a7829f2cc6fa8cd40025

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f844843a059cd7a8cfd5e4478e2620b5b225d8ac919e21bc4e017aab0e438f15
MD5 25ade04fcd098d043e328a2387777206
BLAKE2b-256 9976e04182f48d42d72dd198709147c137b3e4a515fec293032cff1d92ffa2b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 478d93628d2d05aa00935b0f77d4fe025a4c9fb1280fc3633c347fd9c38a8ae0
MD5 929439d448c8325ca3ed59ca3846473c
BLAKE2b-256 25146ab967a4e9d7b33cbbdec4910a090cebe4b192bdaac2b70360c60ab9d3fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 15.4 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.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 6c9fb5378e798b302995abc37b3b5d195ed0f5218916e577e495626e8d513a3f
MD5 792221d7e4587ab58d4fec0c1d51a166
BLAKE2b-256 1fb5742fd0991faeded80f055b90bb9f0719a2298f906797cae1321501fff537

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dede893570310e78d341dc0180ea1939a398eaf9f24032cd8cb61fa417e8d82b
MD5 f9086bd4d0717a72137de8df4bce76d5
BLAKE2b-256 dd580bc1528c24a8e9c701777fcec2a36b1c7ac88d984285489d01c50968f775

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00e8aa823834c28c5b2b793730d1e2592cc787c412543e960fb3951456c99733
MD5 c367a5124faa9f6fb1bd70b727db87c8
BLAKE2b-256 854f9bc74ca1d3b42617bc6f6f2d1a6a40297fae8994f1c63f7ecdc0a774aa09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 70fe78a7823ec5d10c8a00bf52b51025a581a6ae9bcc4fff507863e8a5408779
MD5 9d16e84852942fd40ca74252f8e1296a
BLAKE2b-256 34a3cd5a78afbf5439b2fb90a250ce03fed8935b936bcfd040fc99b4a64df0f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 15.4 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.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 25c4f875f39d75178bbe81ab74f016a6fc5d0a194525f7b730e313b3fa0ac6bf
MD5 c4903c83539fb50eee951f820e7b7d45
BLAKE2b-256 73369eba41d92bd23160d9aac22f45d504d7a6de53840dc69bbc038255f0dbf4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee23eea439af4a12c4b6c4998fd61c156e60b45ef791716aa29216aa09000ffc
MD5 6574acd7ebef8b33e621f34e075f8a5a
BLAKE2b-256 10c3929b0c24cfac9ab0abbbf6d46a12fa22379a67b778c1f561f1b4b2238a9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8e53ca0a6bb5b260547a41fd7ef2dbff59a192f3235644c0ad4bf42509d3c62
MD5 fb455ba18d1784b19684f8012f50cf76
BLAKE2b-256 53805ecbbc9b261b459d594f63cdc8fb90219fa23b46e01cf89997b2782f4106

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5c7d9d0cb14998990799b84b69b4975d9e1298190dd009383f58a9369e2a8d00
MD5 9ba981021973a47bdf70ca72d1c46120
BLAKE2b-256 c04bed56c1904f327bfb319f1a665e30c58fac4647b3d0a56a694f56c4b2cdda

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qollage-0.4.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 15.4 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.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 835df4094c3bfa7f1d3851eb33eafd4193e0f7a5a363796e5584e393f2eb5425
MD5 6fd9b34b942ea08d57daaeece7a6f613
BLAKE2b-256 68e0f7ce30598c5db521154c72e00e1fd7d1d64526b0977e5312d6de5c45c8e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99f509e2f4fa9836a86a9123269408b796b3c8b644b33300ae9f81c3eb889259
MD5 5b88eeb11ae3d86b9cf6ba2c6d5443cc
BLAKE2b-256 b274f8327b723a6d9af14f394f3973fe04d6a5c06c4bca0f16ab234c7c44f034

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