Set a qubit to a particular state.
| C# | Visual Basic | Visual C++ |
public IQuantumRegister SetQubit( int Index, bool SetTo )
Public Function SetQubit ( _ Index As Integer, _ SetTo As Boolean _ ) As IQuantumRegister
public: virtual IQuantumRegister^ SetQubit( int Index, bool SetTo ) sealed
- Index (Int32)
- Index of the qubit to set.
- SetTo (Boolean)
- Value to set the qubit to, true (1) or false (0)
A reference to the modified register.
A qubit is measured before it is set, so any other qubits entangled
with this one will be effected.
| Exception | Condition |
|---|---|
| IndexOutOfRangeException | Thrown if the specified index
is out of range. |
| NotImplementedException | This method is not yet
implemented. |