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

69 lines
3.1 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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: Zero
description: API reference for qiskit.aqua.components.initial_states.Zero
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.aqua.components.initial_states.Zero
---
# qiskit.aqua.components.initial\_states.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">
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.
### \_\_init\_\_
<Function id="qiskit.aqua.components.initial_states.Zero.__init__" signature="__init__(num_qubits)">
**Parameters**
**num\_qubits** (`int`) Number of qubits, has a minimum value of 1.
</Function>
## Methods
| | |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [`__init__`](#qiskit.aqua.components.initial_states.Zero.__init__ "qiskit.aqua.components.initial_states.Zero.__init__")(num\_qubits) | **type num\_qubits**`int` |
| [`construct_circuit`](#qiskit.aqua.components.initial_states.Zero.construct_circuit "qiskit.aqua.components.initial_states.Zero.construct_circuit")(\[mode, register]) | Construct the statevector of desired initial state. |
## Attributes
| | |
| ------------------------------------------------------------------------------------------------------------------ | - |
| [`bitstr`](#qiskit.aqua.components.initial_states.Zero.bitstr "qiskit.aqua.components.initial_states.Zero.bitstr") | |
### bitstr
<Attribute id="qiskit.aqua.components.initial_states.Zero.bitstr" />
### construct\_circuit
<Function id="qiskit.aqua.components.initial_states.Zero.construct_circuit" signature="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>
</Class>