I want to measure before some certain gate. How to do that?
Hi @Rayhan740,
Welcome to the Forum!
Unfortunately you cannot measure a qubit and then keep applying gates on that qubit.
You can apply mid-circuit measurements but only on qubits that you will no longer need.
In the PennyLane docs you will find a nice explanation of how to perform mid-circuit measurements and conditional operations.
Does this answer your question?