tqec.circuit.measurement.get_measurements_from_circuit#

get_measurements_from_circuit(circuit: Circuit) list[Measurement][source]#

Get all the measurements found in the provided circuit.

Parameters:

circuit – circuit to extract measurements from.

Raises:
  • TQECException – if the provided circuit contains a REPEAT block.

  • TQECException – if the provided circuit contains a multi-qubit measurement gate such as MXX or MPP.

  • TQECException – if the provided circuit contains a single-qubit measurement gate with a non-qubit target.

Returns:

all the measurements present in the provided circuit, in their order of appearance (so in increasing order of measurement record offsets).