general_superstaq.compiler_output ================================= .. py:module:: general_superstaq.compiler_output Attributes ---------- .. autoapisummary:: general_superstaq.compiler_output.C general_superstaq.compiler_output.Q Classes ------- .. autoapisummary:: general_superstaq.compiler_output.BaseCompilerOutput general_superstaq.compiler_output.CompilerOutput Functions --------- .. autoapisummary:: general_superstaq.compiler_output.read_json_jaqal Module Contents --------------- .. py:class:: BaseCompilerOutput(circuits: C | list[C] | list[list[C]], initial_logical_to_physicals: dict[Q, Q] | list[dict[Q, Q]] | list[list[dict[Q, Q]]], final_logical_to_physicals: dict[Q, Q] | list[dict[Q, Q]] | list[list[dict[Q, Q]]], pulse_gate_circuits: Any | None = None, seq: Any | None = None, jaqal_programs: list[str] | None = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`C`\ , :py:obj:`Q`\ ] A base class that stores the results of compiled circuits. .. py:method:: has_multiple_circuits() -> bool Checks if this object has plural attributes (e.g. `.circuits`). Otherwise, the object represents a single circuit, and has singular attributes (`.circuit`). :returns: A boolean indicating whether this object represents multiple circuits. .. py:property:: jaqal_program :type: str | None Jaqal program(s) as a single string. For multi-circuit compilation the string will contain subcircuits. .. py:attribute:: jaqal_programs :value: None .. py:attribute:: seq :value: None .. py:class:: CompilerOutput(circuits: str | list[str] | list[list[str]], initial_logical_to_physicals: dict[int, int] | list[dict[int, int]] | list[list[dict[int, int]]], final_logical_to_physicals: dict[int, int] | list[dict[int, int]] | list[list[dict[int, int]]], pulse_gate_circuits: Any | None = None, seq: Any | None = None, jaqal_programs: list[str] | None = None) Bases: :py:obj:`BaseCompilerOutput`\ [\ :py:obj:`str`\ , :py:obj:`int`\ ] A class that arranges compiled circuit information. .. py:function:: read_json_jaqal(json_dict: dict[str, Any], num_eca_circuits: int | None = None) -> CompilerOutput Reads out the returned JSON from Superstaq API's Jaqal compilation endpoint. :param json_dict: A JSON dictionary matching the format returned by `/compile` endpoint. :param num_eca_circuits: Number of logically equivalent random circuits to generate for each input circuit. :returns: A `CompilerOutput` object with the compiled Jaqal program(s). .. py:data:: C .. py:data:: Q