CircuitStateFn.from_vector¶
- static CircuitStateFn.from_vector(statevector)[source]¶
Construct the CircuitStateFn from a vector representing the statevector.
- Parameters
statevector (
ndarray
) – The statevector representing the desired state.- Return type
- Returns
The CircuitStateFn created from the vector.
- Raises
ValueError – If a vector with complex values is passed, which the Initializer cannot
handle. –