qollage
Qollage
qollage is the HQS python package to draw qoqo quantum circuits.
|
Displays the qoqo circuit as an image output |
|
Saves the qoqo circuit as a png image |
|
Displays the qoqo circuit as an image output |
Functions
|
Displays the qoqo circuit as an image output |
|
Displays the qoqo circuit as an image output |
|
Saves the qoqo circuit as a png image |
- qollage.circuit_to_typst_str(circuit, render_pragmas='All', initialization_mode=None, max_circuit_length=None)
Displays the qoqo circuit as an image output
- Parameters:
circuit (Circuit) -- The qoqo circuit to draw
render_pragmas (bool) -- How to render Pragmas operations: "all" to render every pragmas. "none" to not render any pragmas. "PragmaOperation1, PragmaOperation2" to render only some pragmas.
initialization_mode (String) -- What to display at the begginning of the circuit. "state" for "|0>" and "qubit" for "q[n]" State will be used if the parameter is not set.
max_circuit_length (Optional(int)) -- The maximum number of gates per qubit before going to a new line. The default setting None does not create a new line.
- Raises:
TypeError -- Circuit conversion error
ValueError -- Operation not supported
- qollage.draw_circuit(circuit, pixel_per_point=3.0, render_pragmas='All', initialization_mode=None, max_circuit_length=None)
Displays the qoqo circuit as an image output
- Parameters:
circuit (Circuit) -- The qoqo circuit to draw
pixel_per_point (Option<f32>) -- The pixels per point ration of the image. The higher the value, the bigger the image will be but the longer it will take to render
render_pragmas (bool) -- How to render Pragmas operations: "all" to render every pragmas. "none" to not render any pragmas. "PragmaOperation1, PragmaOperation2" to render only some pragmas.
initialization_mode (String) -- What to display at the begginning of the circuit. "state" for "|0>" and "qubit" for "q[n]" State will be used if the parameter is not set.
max_circuit_length (Optional(int)) -- The maximum number of gates per qubit before going to a new line. The default setting None does not create a new line.
- Raises:
TypeError -- Circuit conversion error
ValueError -- Operation not supported
- qollage.save_circuit(circuit, path=None, pixel_per_point=3.0, render_pragmas='all', initialization_mode=None, max_circuit_length=None)
Saves the qoqo circuit as a png image
- Parameters:
circuit (Circuit) -- The qoqo circuit to be saved
path (String) -- The path to where the image should be saved
pixel_per_point (f32) --
- The pixels per point ration of the image.
The higher the value, the bigger the image will be but the longer it will take to render
- render_pragmas (bool): How to render Pragmas operations:
"all" to render every pragmas. "none" to not render any pragmas. "PragmaOperation1, PragmaOperation2" to render only some pragmas.
initialization_mode (String) -- What to display at the begginning of the circuit. "state" for "|0>" and "qubit" for "q[n]" State will be used if the parameter is not set.
max_circuit_length (Optional(int)) -- The maximum number of gates per qubit before going to a new line. The default setting None does not create a new line.
- Raises:
TypeError -- Circuit conversion error
ValueError -- Operation not supported