I would like to know if there is a way to read the elements of a circuit. What I mean is if I have a QuantumCircuit
object, can I obtain the gates that are applied to each qubit in order?
I would like to implement certain noise gate after each Hadamard and I would have therefore to identify each Hadamard in the QuantumCircuit
object. So I need a function that gives me all the gates in a circuit and that allows me to modificate what it returns so I can construct a modified quantum circuit.