Cove - A Practical Quantum Computer Programming Framework
CloneForSlice Method
This copies over all the necessary members of the existing register into a new one so that slice operations only have to worry about manipulating the exposed qubits. Also makes the expansion of the QuantumRegister class easier since any copying for slicing can be put here.
Declaration Syntax
C#Visual BasicVisual C++
protected virtual QuantumRegister CloneForSlice()
Protected Overridable Function CloneForSlice As QuantumRegister
virtual QuantumRegister^ CloneForSlice()
Return Value
The cloned register, except for the list of exposed qubits, which will be manipulated by the caller.
The state of the qubit is an object reference, so changes to the returned qubit's state still effect the state of this qubit. Thus no-cloning is not violated.

Assembly: Cove.LocalSimulation (Module: Cove.LocalSimulation) Version: (