Perform the Fredkin operation (controlled swap).
Declaration Syntax
C# | Visual Basic | Visual C++ |
public IQuantumRegister OperationFredkin( int ControlIndex, int XIndex, int YIndex )
Public Function OperationFredkin ( _ ControlIndex As Integer, _ XIndex As Integer, _ YIndex As Integer _ ) As IQuantumRegister
public: virtual IQuantumRegister^ OperationFredkin( int ControlIndex, int XIndex, int YIndex ) sealed
Parameters
- ControlIndex (Int32)
- Index of the control qubit.
- XIndex (Int32)
- qubit to swap
- YIndex (Int32)
- qubit to swap
Return Value
A reference to this register after the operation has been applied.
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | Thrown if the indexes specified do not
exist in the register. |
DuplicateIndexesException | Thrown if the indexes specified
refer to the same qubit. |
NotImplementedException | This method is not yet
implemented. |