Set the specified qubits to the value specified.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public IQuantumRegister SetQubits( int[] Indexes, bool SetTo )
Public Function SetQubits ( _ Indexes As Integer(), _ SetTo As Boolean _ ) As IQuantumRegister
public: virtual IQuantumRegister^ SetQubits( array<int>^ Indexes, bool SetTo ) sealed
Parameters
- Indexes (array< Int32 >[]()[])
- The indexes of the qubits to set.
- SetTo (Boolean)
- Value to set the qubits to, true (1) or false (0).
Return Value
A reference to the modified register.
Remarks
A qubit is measured before it is set, so any other qubits entangled
with these will be effected.
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | Thrown if any of the specified
indexes are out of range. |
NotImplementedException | This method is not yet
implemented. |