ModularNAdder Method (XIndexes, YIndexes, NIndexes, AncilliaIndexes)
Cove - A Practical Quantum Computer Programming Framework
ModularNAdder Method (XIndexes, YIndexes, NIndexes, AncilliaIndexes)
NamespacesCove.BaseIQuantumAlgorithmsModularNAdder(array<Int32>[]()[], array<Int32>[]()[], array<Int32>[]()[], array<Int32>[]()[])
Performs modular addition of X and Y: (x + y) mod n. All index arrays must be of equal length.
Declaration Syntax
C#Visual BasicVisual C++
List<IQuantumOperation> ModularNAdder(
	int[] XIndexes,
	int[] YIndexes,
	int[] NIndexes,
	int[] AncilliaIndexes
Function ModularNAdder ( _
	XIndexes As Integer(), _
	YIndexes As Integer(), _
	NIndexes As Integer(), _
	AncilliaIndexes As Integer() _
) As List(Of IQuantumOperation)
List<IQuantumOperation^>^ ModularNAdder(
	array<int>^ XIndexes, 
	array<int>^ YIndexes, 
	array<int>^ NIndexes, 
	array<int>^ AncilliaIndexes
XIndexes (array< Int32 >[]()[])
The indexes for x.
YIndexes (array< Int32 >[]()[])
The indexes for y.
NIndexes (array< Int32 >[]()[])
The indexes for N.
AncilliaIndexes (array< Int32 >[]()[])
The index of an ancillia qubits, must be set to 0. This array has to be 2 qubits greater than the others.
Return Value
The operations to perform modular addition.
ArgumentNullExceptionThrown if any of the arrays passed in are null.
ArgumentExceptionThrown if the arrays passed in are not of equal length or less than zero..
DuplicateIndexesExceptionThrown if any indexes are specified more than once.

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