Program.measure

Program.measure(qubit_index, classical_reg=None)[source]

Measures a qubit at qubit_index and puts the result in classical_reg

Parameters:
  • qubit_index (int) – The address of the qubit to measure.
  • classical_reg (int) – The address of the classical bit to store the result.
Returns:

The Quil Program with the appropriate measure instruction appended, e.g. MEASURE 0 [1]

Return type:

Program