qiskit.circuit.QuantumCircuit.measure_all¶
- QuantumCircuit.measure_all(inplace=True, add_bits=True)[source]¶
Adds measurement to all qubits.
By default, adds new classical bits in a
ClassicalRegister
to store these measurements. Ifadd_bits=False
, the results of the measurements will instead be stored in the already existing classical bits, with qubitn
being measured into classical bitn
.Returns a new circuit with measurements if
inplace=False
.- প্যারামিটার
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
inplace=False
.- রিটার্ন টাইপ
- রেইজেস
CircuitError -- if
add_bits=False
but there are not enough classical bits.