How to reset a specific qubit to |0> during computation?

I’m using qiskit.aer as a backend for machine learning based on tensor network quantum circuits, in the process I want to reuse a specific qubit by resetting it to |0>, is there any function like qiskit.QuantumCircuit .reset() to support this work?
Thanks so much!

Hi @ffff12138, welcome to the forum!

Unfortunately we don’t have the qubit reset functionality in PennyLane yet. We may be implementing it in the future though so stay tuned!

Since the qubit reset is not possible yet, something that you may want to do is add an additional qubit to your circuit and then swap it with the qubit you want to reset. This will have an equivalent functionality.

Please let me know if this helps or if you want me to clarify something here!

Thanks for your reply, the method you mentioned may defeat the original purpose of reuse to reduce the number of qubits, and it has limitations for more qubits that need to be reset to |0>, but it still provides a great idea !

Hi @ffff12138, yes, it’s not the way to go if you want to reduce the number of qubits.

If you are limited in the number of qubits because of the size of your machine you may want to use our circuit cutter. What this does is that it allows you to run programs with more qubits in smaller machines or simulators. The classical processing required increases but it may be just what you need.

Please let me know if this helps or if you need help with using the circuit cutter!