AddExtension InverseAdd Method A Sandcastle Documented Class Library
Overload List

  NameDescription
Public methodStatic memberInverseAdd(QuantumComputer, Register, Register)

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

Public methodStatic memberInverseAdd(QuantumComputer, Register, Register, Register)

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

Top
See Also