set_constant
Method of StateVector.
Overloads
| Name | Description |
|---|---|
set_constant(real value) -> StateVector | Sets all coefficients of the state vector to a constant value. |
set_constant(complex value) -> StateVector | Sets all coefficients of the state vector to a constant value. |
set_constant(bool value) -> StateVector | Sets all coefficients of the state vector to a constant value. |
set_constant(integer value) -> StateVector | Sets 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.