InitialState
class InitialState
Base class for InitialState.
This method should initialize the module and use an exception if a component of the module is not available.
Attributes
bitstr
Methods
construct_circuit
abstract InitialState.construct_circuit(mode='circuit', register=None)
Construct the statevector of desired initial state.
Parameters
- mode (
str
) – vector or circuit. The vector mode produces the vector. While the circuit constructs the quantum circuit corresponding that vector. - register (
Optional
[QuantumRegister
]) – qubits for circuit construction.
Returns
statevector.
Return type
QuantumCircuit or numpy.ndarray
Raises
AquaError – when mode is not ‘vector’ or ‘circuit’.
Was this page helpful?
Report a bug or request content on GitHub.