EOH
class EOH(operator, initial_state, evo_operator, evo_time=1, num_time_slices=1, expansion_mode='trotter', expansion_order=1, quantum_instance=None)
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 (
InitialState
) – 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
,BaseBackend
,None
]) – Quantum Instance or Backend
Attributes
backend
quantum_instance
Type: Union[None, qiskit.aqua.quantum_instance.QuantumInstance]
Returns quantum instance.
Return type
Optional
[QuantumInstance
]
random
Return a numpy random.
Methods
construct_circuit
run
EOH.run(quantum_instance=None, **kwargs)
Execute the algorithm with selected backend.
Parameters
- quantum_instance (
Union
[QuantumInstance
,BaseBackend
,None
]) – the experimental setting. - kwargs (dict) – kwargs
Returns
results of an algorithm.
Return type
dict
Raises
AquaError – If a quantum instance or backend has not been provided
set_backend
EOH.set_backend(backend, **kwargs)
Sets backend with configuration.
Return type
None