Python module for displaying pytket circuits when offline.
Project description
Pytket-offline-display
This pytket extension package provides offline circuit rendering functionality.
To use, first install the package with pip
:
pip install pytket-offline-display
Then replace the usual pytket.circuit.display
import with pytket.extensions.offline_display
. For example:
from pytket.extensions.offline_display import render_circuit_jupyter
from pytket import Circuit
circ = Circuit(2,2)
circ.H(0)
circ.CX(0,1)
circ.measure_all()
render_circuit_jupyter(circ)
If you want to control the default options, you can instead load a configurable instance. (Note that this requires pytket >= 1.15)
from pytket.extensions.offline_display import get_circuit_renderer
circuit_renderer = get_circuit_renderer()
circuit_renderer.set_display_options(zx_style=False) # set the default options.
circuit_renderer.dark_mode = True # You can also set them directly.
circuit_renderer.render_circuit_jupyter(circ)
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
Built Distribution
Close
Hashes for pytket-offline-display-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b5d2162c2172942f4c21e2e69f2b202fb9e6491c71cbaa3804b119ab9be154 |
|
MD5 | ea69dac7c66db26e59899669f52f0c80 |
|
BLAKE2b-256 | a93eb8c459a12ac1f608d575dec405ac618a81dd6259797ec26de96aac7a0fa9 |
Close
Hashes for pytket_offline_display-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eb129bcd8b0200e30162e25de8c6b8381a0902ee288a82f00937fd076ee2f7d |
|
MD5 | 7cad71a4c9ebee329b4802a89d052164 |
|
BLAKE2b-256 | 67f4752b6921d7f8d0b7fa72e28fa7a6d2b2de2fcc162f06756ac211934aa580 |