set_coefficient
Method of StateVector<Complex,Unknown,Dense,Complete>.
Overloads
| Name | Description |
|---|---|
set_coefficient(integer index, const real coefficient) -> StateVector<Complex,Unknown,Dense,Complete> | Sets the coefficient of the state vector at the specified index equal to the provided value. |
set_coefficient(integer index, const complex coefficient) -> StateVector<Complex,Unknown,Dense,Complete> | Sets the coefficient of the state vector at the specified index equal to the provided value. |
set_coefficient(integer index, const real coefficient) -> StateVector<Complex,Unknown,Dense,Complete>
Sets the coefficient of the state vector at the specified index equal to the provided value.
Returns the coefficient corresponding to the basis state at the given index.
Parameters
- index: Index of the basis state.
- coefficient: New value of the state vector coefficient.
set_coefficient(integer index, const complex coefficient) -> StateVector<Complex,Unknown,Dense,Complete>
Sets the coefficient of the state vector at the specified index equal to the provided value.
Returns the coefficient corresponding to the basis state at the given index.
Parameters
- index: Index of the basis state.
- coefficient: New value of the state vector coefficient.