qiskit.aqua.components.initial_states.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.
__init__
abstract __init__()
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ () | Initialize self. |
construct_circuit ([mode, register]) | Construct the statevector of desired initial state. |
Attributes
bitstr
construct_circuit
abstract 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.