Currently, QC and QCO's allocQubitRegister() methods allocate a register, load all qubits, and then return a SmallVector of the qubits.
Instead, the methods should only allocate the register and then return a structure that can be indexed to load the qubits. Another method that loads all qubits might also make sense.
For more details, see #1542 (comment), #1580 (comment), and #1580 (comment).
Currently, QC and QCO's
allocQubitRegister()methods allocate a register, load all qubits, and then return aSmallVectorof the qubits.Instead, the methods should only allocate the register and then return a structure that can be indexed to load the qubits. Another method that loads all qubits might also make sense.
For more details, see #1542 (comment), #1580 (comment), and #1580 (comment).