iqm.benchmarks.compressive_gst.mgst.qiskit_interface.get_composed_qiskit_circuits

iqm.benchmarks.compressive_gst.mgst.qiskit_interface.get_composed_qiskit_circuits#

iqm.benchmarks.compressive_gst.mgst.qiskit_interface.get_composed_qiskit_circuits(gate_sequences: list[list[int]], gate_set: list[IQMCircuit], n_qubits: int, qubit_layouts: list[list[int]], gate_context: IQMCircuit | list[IQMCircuit] | None = None, parallel: bool = False) list[IQMCircuit] | list[list[IQMCircuit]]#

Turn GST sequences into Qiskit circuits, adding context gates if provided.

For each GST sequence, either a single circuit is created for all qubit layouts if parallel=True, or a separate circuit if parallel=False.

Parameters:
  • gate_sequences (list[list[int]]) – Sequences of gate indices to apply. Each integer corresponds to a gate in the gate_set.

  • gate_set (list[IQMCircuit]) – The gate set defined as a list of Qiskit quantum circuits.

  • n_qubits (int) – Total number of qubits in the system.

  • qubit_layouts (list[list[int]]) – Lists of qubits on which the GST experiment is run.

  • gate_context (IQMCircuit | list[IQMCircuit] | None) – Optional context circuit(s) to apply during each gate on qubits that are not measured for GST.

  • parallel (bool) – Whether GST for all qubits layouts is done in parallel on the backend. If True, applies gates to all qubit layouts in a single circuit. If False, creates separate circuits for each layout.

Returns:

A list of QuantumCircuits, one for each gate sequence. If parallel=False:

A list of lists of QuantumCircuits, where the outer list corresponds to qubit layouts and the inner list corresponds to gate sequences.

Return type:

If parallel=True