Cove - A Practical Quantum Computer Programming Framework
GetAddN Method (XIndexes, YIndexes, ScratchIndexes, ResultIndexes)
NamespacesCove.LocalSimulationOperationsGetAddN(array<Int32>[]()[], array<Int32>[]()[], array<Int32>[]()[], array<Int32>[]()[]%)
Get the operation to perform add n over the specified indexes. After this is applied the result will be in all indexes of YIndexes and also the last ScratchIndexes qubit.
Declaration Syntax
C#Visual BasicVisual C++
public static GeneralSimulatedOperation[] GetAddN(
	int[] XIndexes,
	int[] YIndexes,
	int[] ScratchIndexes,
	ref int[] ResultIndexes
Public Shared Function GetAddN ( _
	XIndexes As Integer(), _
	YIndexes As Integer(), _
	ScratchIndexes As Integer(), _
	ByRef ResultIndexes As Integer() _
) As GeneralSimulatedOperation()
static array<GeneralSimulatedOperation^>^ GetAddN(
	array<int>^ XIndexes, 
	array<int>^ YIndexes, 
	array<int>^ ScratchIndexes, 
	array<int>^% ResultIndexes
XIndexes (array< Int32 >[]()[])
Indexes that represent the first number to add. These indexes remain unchanged after application.
YIndexes (array< Int32 >[]()[])
Indexes that represent the second number to add. These plus the last ScratchIndexes index will have the result after application.
ScratchIndexes (array< Int32 >[]()[])
These are the scratch indexes and should be initialized to 0, although they will not be reset to 0. The final index in this is the last output index.
ResultIndexes ( array< Int32 >[]()[] %)
The indexes that will hold the result. This can be null.
Return Value
The operations to perform add n.
ArgumentNullExceptionThrown if any of the parameters except ResultIndexes are null.
SizeMismatchExceptionThrown if the length of XIndexes and YIndexes are not equal (must add equal length registers).
SizeMismatchExceptionThrown if ScratchIndexes is not 1 larger than XIndexes and YIndexes

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