Cove - A Practical Quantum Computer Programming Framework
ModularNAdder Method (XIndexes, YIndexes, NIndexes, AncilliaIndexes)
NamespacesCove.LocalSimulationQuantumAlgorithmsModularNAdder(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++
public List<IQuantumOperation> ModularNAdder(
	int[] XIndexes,
	int[] YIndexes,
	int[] NIndexes,
	int[] AncilliaIndexes
)
Public Function ModularNAdder ( _
	XIndexes As Integer(), _
	YIndexes As Integer(), _
	NIndexes As Integer(), _
	AncilliaIndexes As Integer() _
) As List(Of IQuantumOperation)
public:
virtual List<IQuantumOperation^>^ ModularNAdder(
	array<int>^ XIndexes, 
	array<int>^ YIndexes, 
	array<int>^ NIndexes, 
	array<int>^ AncilliaIndexes
) sealed
Parameters
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 1 qubit greater than the others.
Return Value
The operations to perform modular addition.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if any of the arrays passed in are null.
ArgumentExceptionThrown if the arrays passed in are not of equal length (excep ancillia) or less than zero.
DuplicateIndexesExceptionThrown if any indexes are specified more than once.

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