list(unpack([{'X': {1,2,3}},{'CNOT': {(0,1), (1,3)}}]))
[1, 2, 3, 0, 1, 1, 3]
unpack (seq)
Generator to unpack all values of dicts inside a list of dicts
Type | Details | |
---|---|---|
seq | Iterable | Iterable to recursively unpack |
draw_circuit (circuit, path=None, scale=2)
Draw circuit using latextools
library
Type | Default | Details | |
---|---|---|---|
circuit | Circuit | The circuit to draw | |
path | NoneType | None | The path to save the resulting image to (optional) |
scale | int | 2 | The scale of the image |
Returns | drawSvg.drawing.Drawing | Image object |
/home/dw/.local/lib/python3.10/site-packages/fastcore/docscrape.py:225: UserWarning: Unknown section Attributes
else: warn(msg)
Circuit (ticks=None, noisy=True)
Representation of a quantum circuit