Skip to main content

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)

The API documentation is available here.

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.

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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qollage-0.10.1-cp313-cp313-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.13Windows x86-64

qollage-0.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

qollage-0.10.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (32.3 MB view details)

Uploaded CPython 3.13macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qollage-0.10.1-cp312-cp312-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.12Windows x86-64

qollage-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

qollage-0.10.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (32.3 MB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qollage-0.10.1-cp311-cp311-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.11Windows x86-64

qollage-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

qollage-0.10.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (32.2 MB view details)

Uploaded CPython 3.11macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qollage-0.10.1-cp310-cp310-win_amd64.whl (17.7 MB view details)

Uploaded CPython 3.10Windows x86-64

qollage-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

qollage-0.10.1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (32.2 MB view details)

Uploaded CPython 3.10macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: qollage-0.10.1.tar.gz
  • Upload date:
  • Size: 502.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for qollage-0.10.1.tar.gz
Algorithm Hash digest
SHA256 0e06eda8aef5d348f77f99eb38cf13a02f787b95a7c2bcdfafe3e4bae2b01a31
MD5 7fd9ce19f1f348fbdd952d32ad2db74a
BLAKE2b-256 7c24406f2c3404edf55633aaacb4176006fdf0eb1363a17734a220d4c44d3295

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: qollage-0.10.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for qollage-0.10.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 37dce77aa28cabfc7ee48465efa5836f1ba7f6b08f369e25955c43ec59f25d3d
MD5 9c7ca9a8d2305f399e4e7febd5bbf510
BLAKE2b-256 7b67240e08ca05967e42d0f7c6a63415db373640ceb722e2d60bc523c802e301

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qollage-0.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 885f73569c0a42c83d7292fc969f69ecf902bee9f8eb85654b2937a1a903e549
MD5 6eb8c32d2fc2cf4b68afe69d0d60edd5
BLAKE2b-256 bc4bb5ec3bb93fee584844f5f4e8c85a4284c4918d783bdaafaa3824ac8e6a5c

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qollage-0.10.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 b83ba82a0f1cb9eef1b543bfe874923c6b81c8f7396637f2bf2ecedf9eb855a9
MD5 37adf089007bdc1f07db2ee16a778e79
BLAKE2b-256 1285e4c5158b2dfa5524859470674a5ef94e5b9dea70d1ff9c934e423ae49c6b

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: qollage-0.10.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for qollage-0.10.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2a6e65c7c18f3cb7e00b2d1dd1c8737759139c8aff461f5c98c42c6196b59128
MD5 0f0fc6d5cc3cdc5b017ef8b08c08fc2d
BLAKE2b-256 8079361d57b58c4625bc28881df39bb240e2297c2c412bf61fa38c8ad0938f22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02906499beefb0529d417e5c7a9368c1cf5b844b29942f1d2e000ac86db587dc
MD5 2db157ff7315971594632f61058391bb
BLAKE2b-256 a36363f0580ff4b20c7f44cb5fe1dc3166e8abcc8366d2aa690ed737e1cef24e

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qollage-0.10.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 abe63d450efbb73cce6fded417954ca63434603bdbea5c020486e7c5fc8dbc63
MD5 e0f68f53c55e5727211727cdb1a37384
BLAKE2b-256 b501d4164e04f749c9f2d347811bee1d21ae1364494935bb3580b299c0972ca3

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: qollage-0.10.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for qollage-0.10.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 58b0920ed71510f91d583fbb9b07c09b2fe0a7611a38f813d8843bec4bf14750
MD5 c8e50bba556a89f43771295a871cf86d
BLAKE2b-256 642150b41dc04315db647d2b15d33059dd19ac43d935f53051928be2c7fb67ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ac720c2c49c50a1329f0dc04e5b8ddfd35cb57fa1b12863293bf00a64f804c3
MD5 3be1f1c6eb82c5d806f8d60065feba55
BLAKE2b-256 a33f6507ffc6b2314c25940bcc13308208157c953eeecda44ef7385c631bb6bd

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qollage-0.10.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 167a1aff4ecdbe65da2a8f5d73093479044d25a04e59f80f0c910c859f0144a0
MD5 77dcb30fbec6ddc6e58705b3271d5a8d
BLAKE2b-256 3c229f49a842b3c65bd3ddb71857a8b2a1db81b7d6060ebd5b518e95c347ed5d

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: qollage-0.10.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for qollage-0.10.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b3b3f95e2d003bd61a4326752ababc9a49c3b7b02b953ed43c7fa0b7633d1ba4
MD5 8c929c83e03738ac4c50e516f2b4b25b
BLAKE2b-256 4262b074d87c89cb5196bdb68de18e178fbc0a9229232d27e585a194f1c7968d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qollage-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6c30a8a09ea31845549e56a3d2e87ef64228e10baa76628b6e045e7cc07ce69
MD5 be1a222c82fa0f45e422e8ec4af61725
BLAKE2b-256 f90bb32c5cb7fe67cf479603e6020040a51fe5885d19a6e1379936340cd74bc5

See more details on using hashes here.

File details

Details for the file qollage-0.10.1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qollage-0.10.1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 100b7dbdd834a3427db4a73eef47783e7b0e2453b4f54ec860618cf139ae90d2
MD5 26ade08bd22c7fd91de36de018ecdc8a
BLAKE2b-256 7a435ace21110ec645c681d051d7e2a2d69a3f49243a6a3f8255eaac0d2836da

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.10.1 This release

13 files

0.9.1

13 files

0.9.0

13 files

0.8.0

21 files

0.7.0

21 files

0.6.0

19 files

0.5.0

20 files

0.4.3

16 files

0.4.2

20 files

0.4.1

19 files

0.4.0

21 files

0.3.0

21 files

0.2.1

23 files

0.2.0

16 files

0.1.0

16 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page