Open msoeken opened 2 years ago
Options for a language update to have better compile time enforcement has been discussed, and I suggest engaging there. Solving this in the runtime is a bit suboptimal, and the ideal solution that you would like would indeed be preferable. That requires extensive work to support that, though.
Please describe what you would like the feature to accomplish.
Qubits are deallocated when the scope of the corresponding
use
statement is closed. When dangling qubits are returned, various errors are observed in different simulators.Describe the solution you'd like The program should not compile independent of what simulator is used.
Describe alternatives you've considered
N/A
Additional context
Consider the following program:
Running with different simulators: