GatesExtension Toffoli Method A Sandcastle Documented Class Library

Applies Toffoli gate. If all of the control bits are enabled, the target bit gets inverted. This gate with more than two control bits is not considered elementary and is not available on all physical realizations of a quantum computer. Toffoli gate with two control bits can be represented by unitary matrix:

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

public static void Toffoli(
	this QuantumComputer comp,
	RegisterRef target,
	params RegisterRef[] controls
)

Parameters

comp
Type: Quantum QuantumComputer
The QuantumComputer instance.
target
Type: Quantum RegisterRef
The reference to target qubit.
controls
Type:  Quantum RegisterRef 
The references to control qubits. There must be at least two control qubits.

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