Program.measure

Program.measure(qubit, classical_reg)[source]

Measures a qubit at qubit_index and puts the result in classical_reg

Parameters:
  • qubit (Union[Qubit, QubitPlaceholder, int]) – The qubit to measure.
  • classical_reg (Union[MemoryReference, Tuple[str, int], List[Any], str, None]) – The classical register to measure into, or None.
Return type:

Program

Returns:

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