56 lines
1.8 KiB
Plaintext
56 lines
1.8 KiB
Plaintext
---
|
||
title: Zero (v0.31)
|
||
description: API reference for qiskit.aqua.components.initial_states.Zero in qiskit v0.31
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.aqua.components.initial_states.Zero
|
||
---
|
||
|
||
# Zero
|
||
|
||
<Class id="qiskit.aqua.components.initial_states.Zero" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/components/initial_states/zero.py" signature="Zero(num_qubits)" modifiers="class">
|
||
Bases: `qiskit.aqua.components.initial_states.initial_state.InitialState`
|
||
|
||
The zero (null/vacuum) state.
|
||
|
||
This is suitable for those situations in which the all-zeros state is the desired state. This is the case for a *vacuum state* in physics or chemistry
|
||
|
||
**Parameters**
|
||
|
||
**num\_qubits** (`int`) – Number of qubits, has a minimum value of 1.
|
||
|
||
## Methods
|
||
|
||
<span id="qiskit-aqua-components-initial-states-zero-construct-circuit" />
|
||
|
||
### construct\_circuit
|
||
|
||
<Function id="qiskit.aqua.components.initial_states.Zero.construct_circuit" signature="Zero.construct_circuit(mode='circuit', register=None)">
|
||
Construct the statevector of desired initial state.
|
||
|
||
**Parameters**
|
||
|
||
* **mode** – vector or circuit. The vector mode produces the vector. While the circuit constructs the quantum circuit corresponding that vector.
|
||
* **register** – 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.Zero.bitstr" />
|
||
</Class>
|
||
|