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

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

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

In order to improve performance, this method do not check if arguments are valid. They must satisfy following conditions:

  • Registers a, b and c must not overlap
  • Registers a and c must have the same width
  • Register b must be exactly one bit wider than register a (or c)
  • Initial value of c must be 0

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,
	Register c
)

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.
c
Type: Quantum Register
The extra register for storing carry bits.

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