append_pauli_readout
- append_pauli_readout(circuit, pauli_string)
Return a copy of
circuitwith trailing readout-target measurements.For each Pauli string, adds a new one-bit classical register and appends a
PauliProductMeasurementnaming the string – the formcompile()reads a readout target from. Several strings ask one readout to deliver all of them, in the order given. Useremove_pauli_readouts()to undo this.- Parameters:
circuit (
QuantumCircuit) – Circuit to append the measurements to. Not modified in place.pauli_string (
str|Sequence[str]) – One Pauli string, or a list of them. A string gives Pauli letters, one per qubit incircuit, in Qiskit’s order: the last letter is qubit0, as in a QiskitPaulilabel."I"marks a qubit not part of the measurement; an all-"I"string is rejected.
- Return type:
- Returns:
A copy of
circuitwith one classical register and measurement appended per string.- Raises:
ValidationError – If the list is empty, or if a string does not give exactly
circuit.num_qubitsletters, holds a letter other thanI,X,YorZ, or gives only"I".