No project description provided
Project description
qollage
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qollage-0.9.1.tar.gz.
File metadata
- Download URL: qollage-0.9.1.tar.gz
- Upload date:
- Size: 224.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a26b4a10d61cefa181fccf68b0ac38faf78106f30b0173e396f2e85f9f3b3aff
|
|
| MD5 |
7f10042fd336f1d49d640a0e464940b6
|
|
| BLAKE2b-256 |
471720d4200d3f4e49c3867febb91488208a17ccffed88651ae60c4a2d59fb65
|
File details
Details for the file qollage-0.9.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: qollage-0.9.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 17.1 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8675233f5d1a8d0c022bfc3d68db9f6f1186cf222da6a38a556e5a9ff9d03833
|
|
| MD5 |
d2a4234484d237f73fba4c0e5567edac
|
|
| BLAKE2b-256 |
1192e8ad9e1f6fc425cbb2755fe9a7e7fc12351cddf2bef7c3b2c3229fdc2b2d
|
File details
Details for the file qollage-0.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qollage-0.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.6 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae1bdcbf5db0db9d208dee0099a297d0d3ef9068138ea0f3fc54b901787fa17d
|
|
| MD5 |
43e9a20086e2592f8512a60f0ba7ccbd
|
|
| BLAKE2b-256 |
848dd89629d84f7808e262f7183be8e01133ab389681e8c1d668b594783df9fc
|
File details
Details for the file qollage-0.9.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: qollage-0.9.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 31.2 MB
- Tags: CPython 3.13, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17d84c12ab3200dd83c931d7a7a614304072d800c80ecbf7be884a4f034770ef
|
|
| MD5 |
2516b4e125107e47d62d786f88bd2d34
|
|
| BLAKE2b-256 |
fe2cfa36199dc303a3882444595198c8616a476be31a618a6a56974340495015
|
File details
Details for the file qollage-0.9.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: qollage-0.9.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 17.1 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7245a61eb0050d8d8c5074cf7e7606db2da7d2aff241687681ec98e34116842e
|
|
| MD5 |
f6e8a8fb59aa16381b888e8f3568eec1
|
|
| BLAKE2b-256 |
eb890b954c34503c16c710456d1e9797aab49151539c830096e9ea424139d81c
|
File details
Details for the file qollage-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qollage-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
731ab96f81bacab97c927f8e70cd6318d877ec18cdc4e884dccc6acf61f45c63
|
|
| MD5 |
cd183a2035b9e2a5e86d653611271084
|
|
| BLAKE2b-256 |
36173f0e014a836d4b03ecf402a9591fd1da3d47b30716bfb426475892118b96
|
File details
Details for the file qollage-0.9.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: qollage-0.9.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 31.3 MB
- Tags: CPython 3.12, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1deab3e7f6b16b0737cd31aeb94eed24a604ab9a826a4681924eaba735d76029
|
|
| MD5 |
a2da97d8069921ac4e10f16c3ab28ebc
|
|
| BLAKE2b-256 |
ae755d03ad40c8e04346aa585177623de41a4cf888d1fa19cac9ba5b61882627
|
File details
Details for the file qollage-0.9.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: qollage-0.9.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 17.0 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecddabeaf39821300c674766c2e7ca773f4409449af1f071c22e1a138bff4a97
|
|
| MD5 |
b406b98107b275bb2eb2c3ee564410c9
|
|
| BLAKE2b-256 |
88eab7918481e34203148de0617fc5ee0174a6c3eed3df960af2130e65f81b5b
|
File details
Details for the file qollage-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qollage-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e109378a6fbea064483df43915874c4480b8795e716faa7441b1722936f0b6a2
|
|
| MD5 |
1b341529cf359dd5a7ee983685d912a2
|
|
| BLAKE2b-256 |
3ee0b730a7799a30df02be92f1b5c237f27e61e89d9f22186e15c479cb907d7b
|
File details
Details for the file qollage-0.9.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: qollage-0.9.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 31.3 MB
- Tags: CPython 3.11, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
888bb2456c03ff99d5da766055635865c035e454ce07857bb6aef67c86fb3ef3
|
|
| MD5 |
a43d0fad198aa9160db8afd57bc33a1d
|
|
| BLAKE2b-256 |
33267cdd9b966621643ec4bda7acefce274c2399a596d53bb9797a8ba0ff1601
|
File details
Details for the file qollage-0.9.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: qollage-0.9.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 17.0 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1cc1539da4f5ee49da8ed4c0c4d279cba43d44c746163b623130f1e2a782a00
|
|
| MD5 |
6549e608d178bb450e93b01c20bba067
|
|
| BLAKE2b-256 |
0bec443e016fdea1d5d32c0e5951b7f28031faf528a0cdfa1a604ce4526ae4f7
|
File details
Details for the file qollage-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qollage-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0205f2681905038b12d5c38155f1eb33e13098b78609e18738f8360247a6a242
|
|
| MD5 |
27bf341427af5b6bbb5e3efae634b3f7
|
|
| BLAKE2b-256 |
215f215a71c1a275aa19be955da93745ed697ceab8ae8669fa5a5078885a409e
|
File details
Details for the file qollage-0.9.1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: qollage-0.9.1-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 31.3 MB
- Tags: CPython 3.10, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
223f6037d790f652c8f91f7a21b95402a24511c13f4734f75e9c5f8f630da826
|
|
| MD5 |
c234cd2ca651f5a07ef6361591eb3134
|
|
| BLAKE2b-256 |
c31994e8dc7b20941a9d981d9ec999382781c59bd532359faef3d4e8dbe4a5c9
|