Skip to main content

set_constant

Method of StateVector.

Overloads

NameDescription
set_constant(real value) -> StateVectorSets all coefficients of the state vector to a constant value.
set_constant(complex value) -> StateVectorSets all coefficients of the state vector to a constant value.
set_constant(bool value) -> StateVectorSets all coefficients of the state vector to a constant value.
set_constant(integer value) -> StateVectorSets all coefficients of the state vector to a constant value.

set_constant(real value) -> StateVector

Sets all coefficients of the state vector to a constant value.

Parameters

  • value: The value each coefficient will be set to.

set_constant(complex value) -> StateVector

Sets all coefficients of the state vector to a constant value.

Parameters

  • value: The value each coefficient will be set to.

set_constant(bool value) -> StateVector

Sets all coefficients of the state vector to a constant value.

Parameters

  • value: The value each coefficient will be set to.

set_constant(integer value) -> StateVector

Sets all coefficients of the state vector to a constant value.

Parameters

  • value: The value each coefficient will be set to.