I'm practising some code in Qiskit. However, I can't undo or get rid of previously applied gates.
If you take a look at the two screenshots I'm including. The more I run my code, even though I won't repeat the code, the more X gates show up.
How can I just have one even though I run the code multiple times?
circuit = QuantumCircuit(3, 3)
) to same Jupyter code cell $\endgroup$