AddExtension InverseAdd Method (QuantumComputer, Register, Register)A Sandcastle Documented Class Library

Performs an exact inversion of Add(QuantumComputer, Register, Register) method.

InverseAdd(a, a+b, 0) -> (a, b, 0)

This method checks if arguments are valid. If not, an exception is thrown. The following conditions must be satisfied:

  • Registers a and b must not overlap
  • Register b must be exactly one bit wider than register a

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

public static void InverseAdd(
	this QuantumComputer comp,
	Register a,
	Register b
)

Parameters

comp
Type: Quantum QuantumComputer
The QuantumComputer instance.
a
Type: Quantum Register
The first register used to inverse the sum. Its value remains unchanged.
b
Type: Quantum Register
The second register used to inverse the sum. After performing this operation, it contains the inversion result.

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