113 lines
3.5 KiB
Plaintext
113 lines
3.5 KiB
Plaintext
---
|
||
title: EOH (v0.29)
|
||
description: API reference for qiskit.aqua.algorithms.EOH in qiskit v0.29
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.aqua.algorithms.EOH
|
||
---
|
||
|
||
# EOH
|
||
|
||
<Class id="qiskit.aqua.algorithms.EOH" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/algorithms/education/eoh.py" signature="EOH(operator, initial_state, evo_operator, evo_time=1, num_time_slices=1, expansion_mode='trotter', expansion_order=1, quantum_instance=None)" modifiers="class">
|
||
Bases: `qiskit.aqua.algorithms.quantum_algorithm.QuantumAlgorithm`
|
||
|
||
The Quantum EOH (Evolution of Hamiltonian) algorithm.
|
||
|
||
EOH provides the lower-level building blocks for simulating universal quantum systems. For any given quantum system that can be decomposed into local interactions (for example, a global hamiltonian as the weighted sum of several Pauli spin operators), the local interactions can then be used to approximate the global quantum system via, for example, Lloyd’s method or Trotter-Suzuki decomposition.
|
||
|
||
**Parameters**
|
||
|
||
* **operator** (`LegacyBaseOperator`) – Operator to evaluate
|
||
* **initial\_state** (`Union`\[`InitialState`, `QuantumCircuit`]) – Initial state for evolution
|
||
* **evo\_operator** (`LegacyBaseOperator`) – Operator to evolve
|
||
* **evo\_time** (`float`) – Evolution time, has min value of 0
|
||
* **num\_time\_slices** (`int`) – Number of time slices, has minimum value of 1
|
||
* **expansion\_mode** (`str`) – Either `"trotter"` (Lloyd’s method) or `"suzuki"` (for Trotter-Suzuki expansion)
|
||
* **expansion\_order** (`int`) – The Trotter-Suzuki expansion order.
|
||
* **quantum\_instance** (`Union`\[`QuantumInstance`, `Backend`, `BaseBackend`, `None`]) – Quantum Instance or Backend
|
||
|
||
## Methods
|
||
|
||
<span id="qiskit-aqua-algorithms-eoh-construct-circuit" />
|
||
|
||
### construct\_circuit
|
||
|
||
<Function id="qiskit.aqua.algorithms.EOH.construct_circuit" signature="EOH.construct_circuit()">
|
||
Construct the circuit.
|
||
|
||
**Returns**
|
||
|
||
the circuit.
|
||
|
||
**Return type**
|
||
|
||
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
|
||
</Function>
|
||
|
||
<span id="qiskit-aqua-algorithms-eoh-run" />
|
||
|
||
### run
|
||
|
||
<Function id="qiskit.aqua.algorithms.EOH.run" signature="EOH.run(quantum_instance=None, **kwargs)">
|
||
Execute the algorithm with selected backend.
|
||
|
||
**Parameters**
|
||
|
||
* **quantum\_instance** (`Union`\[`QuantumInstance`, `Backend`, `BaseBackend`, `None`]) – the experimental setting.
|
||
* **kwargs** (*dict*) – kwargs
|
||
|
||
**Returns**
|
||
|
||
results of an algorithm.
|
||
|
||
**Return type**
|
||
|
||
dict
|
||
|
||
**Raises**
|
||
|
||
[**AquaError**](qiskit.aqua.AquaError "qiskit.aqua.AquaError") – If a quantum instance or backend has not been provided
|
||
</Function>
|
||
|
||
<span id="qiskit-aqua-algorithms-eoh-set-backend" />
|
||
|
||
### set\_backend
|
||
|
||
<Function id="qiskit.aqua.algorithms.EOH.set_backend" signature="EOH.set_backend(backend, **kwargs)">
|
||
Sets backend with configuration.
|
||
|
||
**Return type**
|
||
|
||
`None`
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### backend
|
||
|
||
<Attribute id="qiskit.aqua.algorithms.EOH.backend">
|
||
Returns backend.
|
||
|
||
**Return type**
|
||
|
||
`Union`\[`Backend`, `BaseBackend`]
|
||
</Attribute>
|
||
|
||
### quantum\_instance
|
||
|
||
<Attribute id="qiskit.aqua.algorithms.EOH.quantum_instance">
|
||
Returns quantum instance.
|
||
|
||
**Return type**
|
||
|
||
`Optional`\[`QuantumInstance`]
|
||
</Attribute>
|
||
|
||
### random
|
||
|
||
<Attribute id="qiskit.aqua.algorithms.EOH.random">
|
||
Return a numpy random.
|
||
</Attribute>
|
||
</Class>
|
||
|