- QuantumCircuit.measure_all(inplace=True, add_bits=True)¶
Adds measurement to all qubits.
By default, adds new classical bits in a
ClassicalRegisterto store these measurements. If
add_bits=False, the results of the measurements will instead be stored in the already existing classical bits, with qubit
nbeing measured into classical bit
Returns a new circuit with measurements if
inplace (bool) – All measurements inplace or return new circuit.
add_bits (bool) – Whether to add new bits to store the results.
Returns circuit with measurements when
- Tipo del valor devuelto
CircuitError – if
add_bits=Falsebut there are not enough classical bits.