qiskit.aqua.algorithms.EOH¶
-
class
EOH
(operator, initial_state, evo_operator, evo_time=1, num_time_slices=1, expansion_mode='trotter', expansion_order=1, quantum_instance=None)[Quellcode]¶ 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.
- Parameter
operator (
LegacyBaseOperator
) – Operator to evaluateinitial_state (
Union
[InitialState
,QuantumCircuit
]) – Initial state for evolutionevo_operator (
LegacyBaseOperator
) – Operator to evolveevo_time (
float
) – Evolution time, has min value of 0num_time_slices (
int
) – Number of time slices, has minimum value of 1expansion_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
-
__init__
(operator, initial_state, evo_operator, evo_time=1, num_time_slices=1, expansion_mode='trotter', expansion_order=1, quantum_instance=None)[Quellcode]¶ - Parameter
operator (
LegacyBaseOperator
) – Operator to evaluateinitial_state (
Union
[InitialState
,QuantumCircuit
]) – Initial state for evolutionevo_operator (
LegacyBaseOperator
) – Operator to evolveevo_time (
float
) – Evolution time, has min value of 0num_time_slices (
int
) – Number of time slices, has minimum value of 1expansion_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
__init__
(operator, initial_state, evo_operator)- type operator
LegacyBaseOperator
Construct the circuit.
run
([quantum_instance])Execute the algorithm with selected backend.
set_backend
(backend, **kwargs)Sets backend with configuration.
Attributes
Returns backend.
Returns quantum instance.
Return a numpy random.
-
property
backend
¶ Returns backend.
- Rückgabetyp
Union
[Backend
,BaseBackend
]
-
construct_circuit
()[Quellcode]¶ Construct the circuit.
- Rückgabe
the circuit.
- Rückgabetyp
-
property
quantum_instance
¶ Returns quantum instance.
- Rückgabetyp
Optional
[QuantumInstance
]
-
property
random
¶ Return a numpy random.
-
run
(quantum_instance=None, **kwargs)¶ Execute the algorithm with selected backend.
- Parameter
quantum_instance (
Union
[QuantumInstance
,Backend
,BaseBackend
,None
]) – the experimental setting.kwargs (dict) – kwargs
- Rückgabe
results of an algorithm.
- Rückgabetyp
dict
- Verursacht
AquaError – If a quantum instance or backend has not been provided
-
set_backend
(backend, **kwargs)¶ Sets backend with configuration.
- Rückgabetyp
None