circuit_diagram =============== .. py:module:: quantify_scheduler.schedules._visualization.circuit_diagram .. autoapi-nested-parse:: Plotting functions used in the visualization backend of the sequencer. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: quantify_scheduler.schedules._visualization.circuit_diagram._ControlFlowEnd Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.schedules._visualization.circuit_diagram.gate_box quantify_scheduler.schedules._visualization.circuit_diagram.pulse_baseband quantify_scheduler.schedules._visualization.circuit_diagram.pulse_modulated quantify_scheduler.schedules._visualization.circuit_diagram.meter quantify_scheduler.schedules._visualization.circuit_diagram.acq_meter quantify_scheduler.schedules._visualization.circuit_diagram.acq_meter_text quantify_scheduler.schedules._visualization.circuit_diagram.cnot quantify_scheduler.schedules._visualization.circuit_diagram.cz quantify_scheduler.schedules._visualization.circuit_diagram.reset quantify_scheduler.schedules._visualization.circuit_diagram._walk_schedule quantify_scheduler.schedules._visualization.circuit_diagram._walk_schedule_only_operations quantify_scheduler.schedules._visualization.circuit_diagram._draw_operation quantify_scheduler.schedules._visualization.circuit_diagram._get_indices quantify_scheduler.schedules._visualization.circuit_diagram._draw_loop quantify_scheduler.schedules._visualization.circuit_diagram._draw_conditional quantify_scheduler.schedules._visualization.circuit_diagram._get_qubit_and_port_map_from_schedule quantify_scheduler.schedules._visualization.circuit_diagram._get_feedback_label_and_qubit_idx quantify_scheduler.schedules._visualization.circuit_diagram.circuit_diagram_matplotlib .. py:function:: gate_box(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None A box for a single gate containing a label. :param ax: The matplotlib Axes. :param time: The time of the gate. :param qubit_idxs: The qubit indices. :param text: The gate name. :param kw: Additional keyword arguments to be passed to drawing the gate box. .. py:function:: pulse_baseband(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None Adds a visual indicator for a Baseband pulse to the `matplotlib.axes.Axis` instance. :param ax: The matplotlib Axes. :param time: The time of the pulse. :param qubit_idxs: The qubit indices. :param text: The pulse name. :param kw: Additional keyword arguments to be passed to drawing the pulse. .. py:function:: pulse_modulated(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None Adds a visual indicator for a Modulated pulse to the `matplotlib.axes.Axis` instance. :param ax: The matplotlib Axes. :param time: The time of the pulse. :param qubit_idxs: The qubit indices. :param text: The pulse name. :param kw: Additional keyword arguments to be passed to drawing the pulse. .. py:function:: meter(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None A simple meter to depict a measurement. :param ax: The matplotlib Axes. :param time: The time of the measurement. :param qubit_idxs: The qubit indices. :param text: The measurement name. :param kw: Additional keyword arguments to be passed to drawing the meter. .. py:function:: acq_meter(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None Variation of the meter to depict a acquisition. :param ax: The matplotlib Axes. :param time: The time of the measurement. :param qubit_idxs: The qubit indices. :param text: The measurement name. :param kw: Additional keyword arguments to be passed to drawing the acq meter. .. py:function:: acq_meter_text(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None Same as acq_meter, but also displays text. :param ax: The matplotlib Axes. :param time: The time of the measurement. :param qubit_idxs: The qubit indices. :param text: The measurement name. :param kw: Additional keyword arguments to be passed to drawing the acq meter. .. py:function:: cnot(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None Markers to denote a CNOT gate between two qubits. :param ax: The matplotlib Axes. :param time: The time of the CNOT. :param qubit_idxs: The qubit indices. :param text: The CNOT name. :param kw: Additional keyword arguments to be passed to drawing the CNOT. .. py:function:: cz(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None Markers to denote a CZ gate between two qubits. :param ax: The matplotlib Axes. :param time: The time of the CZ. :param qubit_idxs: The qubit indices. :param text: The CZ name. :param kw: Additional keyword arguments to be passed to drawing the CZ. .. py:function:: reset(ax: matplotlib.axes.Axes, time: float, qubit_idxs: list[int], text: str, **kw) -> None A broken line to denote qubit initialization. :param ax: matplotlib axis object. :param time: x position to draw the reset on :param qubit_idxs: indices of the qubits that the reset is performed on. :param text: The reset name. :param kw: Additional keyword arguments to be passed to drawing the reset. .. py:class:: _ControlFlowEnd Bases: :py:obj:`enum.Enum` Identifer for end of a control-flow scope. .. py:attribute:: LOOP_END .. py:attribute:: CONDI_END .. py:function:: _walk_schedule(sched_or_op: quantify_scheduler.schedules.schedule.Schedule | quantify_scheduler.operations.operation.Operation, time_offset: int = 0) -> Iterator[tuple[int, quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule | _ControlFlowEnd]] .. py:function:: _walk_schedule_only_operations(sched_or_op: quantify_scheduler.schedules.schedule.Schedule | quantify_scheduler.operations.operation.Operation) -> Iterator[quantify_scheduler.operations.operation.Operation] .. py:function:: _draw_operation(operation: quantify_scheduler.operations.operation.Operation, qubit_map: dict[str, int], port_map: dict[str, int], ax: matplotlib.axes.Axes, time: int, schedule_resources: dict[str, quantify_scheduler.resources.Resource]) -> None .. py:function:: _get_indices(sched_or_op: quantify_scheduler.schedules.schedule.Schedule | quantify_scheduler.operations.operation.Operation, qubit_map: dict[str, int], port_map: dict[str, int]) -> set[int] .. py:function:: _draw_loop(ax: matplotlib.axes.Axes, qubit_map: dict[str, int], port_map: dict[str, int], operation: quantify_scheduler.operations.control_flow_library.LoopOperation, start_time: int, end_time: int, x_offset: float = 0.35, y_offset: float = 0.3, fraction: float = 0.2) -> None .. py:function:: _draw_conditional(ax: matplotlib.axes.Axes, measure_time: int, measure_qubit_idx: int, body: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule, body_start: int, body_end: int, qubit_map: dict[str, int], port_map: dict[str, int]) -> None .. py:function:: _get_qubit_and_port_map_from_schedule(schedule: quantify_scheduler.schedules.schedule.Schedule) -> tuple[dict[str, int], dict[str, int]] .. py:function:: _get_feedback_label_and_qubit_idx(operation: quantify_scheduler.operations.operation.Operation, port_map: dict[str, int], qubit_map: dict[str, int]) -> tuple[str, int] | None Check if the operation is an acquisition/measure gate with a feedback trigger label. .. py:function:: circuit_diagram_matplotlib(schedule: quantify_scheduler.schedules.schedule.Schedule, figsize: tuple[int, int] | None = None, ax: matplotlib.axes.Axes | None = None) -> tuple[matplotlib.figure.Figure | None, matplotlib.axes.Axes]