Program.measure_all

Program.measure_all(*qubit_reg_pairs)[source]

Measures many qubits into their specified classical bits, in the order they were entered. If no qubit/register pairs are provided, measure all qubits present in the program into classical addresses of the same index.

Parameters

qubit_reg_pairs (Tuple[Union[Qubit, QubitPlaceholder, FormalArgument, int], Union[MemoryReference, Tuple[str, int], List[Any], str, None]]) – Tuples of qubit indices paired with classical bits.

Return type

Program

Returns

The Quil Program with the appropriate measure instructions appended, e.g.

MEASURE 0 [1]
MEASURE 1 [2]
MEASURE 2 [3]