qiskit-documentation/docs/api/qiskit/0.32/qiskit.aqua.components.init...

50 lines
1.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: InitialState
description: API reference for qiskit.aqua.components.initial_states.InitialState
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.aqua.components.initial_states.InitialState
---
# InitialState
<Class id="qiskit.aqua.components.initial_states.InitialState" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/components/initial_states/initial_state.py" signature="InitialState" modifiers="class">
Bases: `abc.ABC`
Base class for InitialState.
This method should initialize the module and use an exception if a component of the module is not available.
## Methods
### construct\_circuit
<Function id="qiskit.aqua.components.initial_states.InitialState.construct_circuit" signature="InitialState.construct_circuit(mode='circuit', register=None)" modifiers="abstract">
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](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or numpy.ndarray
**Raises**
[**AquaError**](qiskit.aqua.AquaError "qiskit.aqua.AquaError") when mode is not vector or circuit.
</Function>
## Attributes
### bitstr
<Attribute id="qiskit.aqua.components.initial_states.InitialState.bitstr" />
</Class>