AddExtension Carry Method A Sandcastle Documented Class Library
Sets the carry bit (in point of fact, a carry qubit). Used with Sum(QuantumComputer, RegisterRef, RegisterRef, RegisterRef) to perform addition.

Namespace: Quantum.Operations
Assembly: Quantum (in Quantum.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static void Carry(
	this QuantumComputer comp,
	RegisterRef rc0,
	RegisterRef ra0,
	RegisterRef rb0,
	RegisterRef rc1
)

Parameters

comp
Type: Quantum QuantumComputer
The QuantumComputer instance.
rc0
Type: Quantum RegisterRef
The reference to previous carry qubit.
ra0
Type: Quantum RegisterRef
The reference to qubit, for which the carry bit is computed, in the first register.
rb0
Type: Quantum RegisterRef
The reference to qubit, for which the carry bit is computed, in the second register.
rc1
Type: Quantum RegisterRef
The reference to qubit for storing the resulted carry value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type QuantumComputer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also