The using-statement allocates the qubits from the quantum processor's free qubit heap, and returns them to the heap after the statement terminates.
This should be updated to say that the qubits could be released before the end of the statement if the qubits are not used after a certain point in the block. The same could apply to the borrowing statement as well:
The borrowed qubits are in an unknown state and go out of scope at the end of the statement block.
The page on Quantum Memory Management says this about
using
statements:This should be updated to say that the qubits could be released before the end of the statement if the qubits are not used after a certain point in the block. The same could apply to the
borrowing
statement as well: