qiskit_qec.utils.get_stim_circuits

get_stim_circuits(circuit, detectors=None, logicals=None)[source]
Converts compatible qiskit circuits to stim circuits.

Dictionaries are not complete. For the stim definitions see: https://github.com/quantumlib/Stim/blob/main/doc/gates.md

Parameters:
  • circuit (Union[QuantumCircuit, List]) – Compatible gates are Paulis, controlled Paulis, h, s,

  • sdg (and)

  • swap

  • reset

  • operators (measure and barrier. Compatible noise)

  • channel. (correspond to a single or two qubit pauli)

  • detectors (Optional[List[Dict]]) – A list of measurement comparisons. A measurement comparison

  • index ((detector) is either a list of measurements given by a the name and)

  • dictionaries (of the classical bit or a list of)

  • clbits (with a mandatory)

  • like (key containing the classical bits. A dictionary can contain keys)

  • 'qubits'

  • 'time'

  • etc. ('basis')

  • logicals (Optional[List[Dict]]) – A list of logical measurements. A logical measurement is a

  • eigenvalue. (list of classical bits whose total parity is the logical)

  • dictionaries. (Again it can be a list of)

Returns:

stim_circuits, stim_measurement_data