QuantumComputer NewRegister Method (UInt64, Int32, Nullable Int32 )A Sandcastle Documented Class Library
Creates new Register, with given width and initial state.

Namespace: Quantum
Assembly: Quantum (in Quantum.dll) Version: (

public Register NewRegister(
	ulong initval,
	int width,
	Nullable<int> size = null


Type: System UInt64
Unsigned long integer, which binary representation is the initial configuration of qubits in new register.
Type: System Int32
The number of qubits in newly created register.
size (Optional)
Type: System Nullable Int32 
Optional argument. Describes size of data structure for storing all possible register states and their amplitudes. That inner data structure dynamically resizes itself, but if it could be very inefficient, this argument enables to reserve enough memory in advance.

Return Value

Type: Register
Newly created register.
See Also