remove_pauli_readouts
- remove_pauli_readouts(circuit)
Split the trailing readout requests off
circuit.The inverse of
append_pauli_readout(): undoes exactly what it does, however many times it was called, and also recognizes a compiled circuit’s own trailing, already-reduced measurements (seecompile()).- Parameters:
circuit (
QuantumCircuit) – Circuit to inspect. Not modified in place.- Returns:
bodyiscircuitwith its trailing run ofPauliProductMeasurementinstructions removed, andpauli_stringsholds the Pauli string each named, in circuit order. A string is in Qiskit’s order, its last letter qubit0, with"I"for the qubits an instruction did not act on. A circuit that does not end with one comes back unchanged, with an empty list.- Return type:
A
(body, pauli_strings)pair