Closed wca-123 closed 6 years ago
Gates after a measurement is allowed in openQASM. However, it is not really a good thing to do on the current hardware, so it is disabled. Future hardware will allow this.
We want the simulator to add for the future directions.
May I ask why this isn't a good thing to do on current hardware? Is it because a measurement would collapse the superposition and thus is irreversible?
It takes some time for the current hardware to reset after a measurement. The other gates would have to wait for this to happen, and thus we wish to avoid this for now.
Because if you entangle before the measurement allows you to learn a bit about the state without fully collapsing the wave function. The qubit measured will be in a classical state but the entangled ones will still have some information left in them.
Informations
What is the current behavior?
I noticed that IBM Q's ibmq_qasm_simulator allows for gates after a measure while IBM Q's actual quantum computers do not. I think that maybe if the simulator had a code so that it blocked this, the simulator could be more realistic.
Steps to reproduce the problem
What is the expected behavior?
I expected that it would return an issue in the simulator.
Suggested solutions