iqm.benchmarks.utils.generate_state_tomography_circuits

iqm.benchmarks.utils.generate_state_tomography_circuits#

iqm.benchmarks.utils.generate_state_tomography_circuits(qc: IQMCircuit, active_qubits: Sequence[int], measure_other: Sequence[int] | None = None, measure_other_name: str | None = None, native: bool = True) Dict[str, IQMCircuit]#

Generate all quantum circuits required for a quantum state tomography experiment.

Parameters:
  • qc (QuantumCircuit) – The quantum circuit.

  • active_qubits (Sequence[int]) – The qubits to perform tomograhy on.

  • measure_other (Optional[Sequence[int]]) – Whether to measure other qubits in the qc QuantumCircuit. * Default is None.

  • measure_other_name (Optional[str]) – Name of the classical register to assign measure_other.

  • native (bool) – Whether circuits are prepared using IQM-native gates. * Default is True.

Returns:

A dictionary with keys being Pauli (measurement) strings and values the respective circuit.
  • Pauli strings are ordered for qubit labels in increasing order, e.g., “XY” for active_qubits 4, 1 corresponds to “X” measurement on qubit 1 and “Y” measurement on qubit 4.

Return type:

Dict[str, QuantumCircuit]