Skip to main content

set_coefficient

Method of StateVector<Complex,Unknown,Dense,Complete>.

Overloads

NameDescription
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.