The controlled reset operation. If the control qubit is 1 then all the
target indexes are reset to 0.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public List<IQuantumOperation> ControlledReset( int ControlIndex, int[] TargetIndexes, ClassicalResult ClassicalValue )
Public Function ControlledReset ( _ ControlIndex As Integer, _ TargetIndexes As Integer(), _ ClassicalValue As ClassicalResult _ ) As List(Of IQuantumOperation)
public: virtual List<IQuantumOperation^>^ ControlledReset( int ControlIndex, array<int>^ TargetIndexes, ClassicalResult^ ClassicalValue ) sealed
Parameters
- ControlIndex (Int32)
- The index of the control qubit.
- TargetIndexes (array< Int32 >[]()[])
- The target indexes to reset if the control is set.
- ClassicalValue (ClassicalResult)
- The classical value to reset.
Return Value
Operations required to perform this.
Exceptions
Exception | Condition |
---|---|
DuplicateIndexesException | Thrown if any of the indexes
specified are not unique. |
ArgumentNullException | Thrown if any of the parameters
are null. |
ArgumentOutOfRangeException | Thrown if any of the indexes
specified are less than 0, or if TargetIndexes is an empty array. |