iqm.cpc.compiler.standard_stages.subscribe_and_probe

iqm.cpc.compiler.standard_stages.subscribe_and_probe#

iqm.cpc.compiler.standard_stages.subscribe_and_probe(circuits, settings, context, additionally_subscribed_components, additionally_probed_components, probe_all=True, convert_terminal_measurements=True)#

Add additional terminal measurements to the circuit and modify measurement instruction arguments.

The additional measurements can be subscribed to (i.e. they’d return measurement data) or be just probe pulses for potentially improving the terminal measurement fidelity in case the measurement calibration is not 100% factorizable.

In addition, the pass hashes all readout keys since there is a data processing limit for the readout key length. The keys should then be unmapped in the return data post-processing. The terminal measurements can also be converted to the measure_fidelity operation which is calibrated to maximize the fidelity while not necessarily being projective (QNDness is typically not important for the terminal measurement).

Parameters:
  • circuits (list[Circuit]) – The circuits to compile.

  • settings (SettingNode) – The settings tree.

  • context (dict[str, Any]) – The Compiler context.

  • additionally_subscribed_components (list[str]) – Additional components to measure in the terminal measurement (besides the ones explicitly measured in the circuit itself).

  • additionally_probed_components (list[str]) – Additional components to send the probe pulse to besides the ones explicitly measured in the circuit itself). The measurement data will not be collected from these components.

  • probe_all (bool) – Whether to send to probe pulse to all components in the terminal measurement (overrides additionally_probed_components).

  • convert_terminal_measurements (bool) – Whether to convert the terminal measurement data to the measure_fidelity operation that is calibrated to maximize the fidelity while not necessarily being QND. This option will be turned to False automatically if active reset is used (active reset is not reliable in the presence of leakage).

Returns:

The circuits with the aforementioned modifications.

Return type:

list[Circuit]