qiskit-documentation/docs/api/qiskit/0.44/qiskit.algorithms.Evolution...

59 lines
4.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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: EvolutionProblem
description: API reference for qiskit.algorithms.EvolutionProblem
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.algorithms.EvolutionProblem
---
# EvolutionProblem
<Class id="qiskit.algorithms.EvolutionProblem" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.25/qiskit/algorithms/evolvers/evolution_problem.py" signature="qiskit.algorithms.EvolutionProblem(hamiltonian, time, initial_state=None, aux_operators=None, truncation_threshold=1e-12, t_param=None, param_value_dict=None)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Deprecated: Evolution problem class.
The EvolutionProblem class has been superseded by the `qiskit.algorithms.time_evolvers.TimeEvolutionProblem` class. This class will be deprecated in a future release and subsequently removed after that.
This class is the input to time evolution algorithms and must contain information on the total evolution time, a quantum state to be evolved and under which Hamiltonian the state is evolved.
<Admonition title="Deprecated since version 0.24.0" type="danger">
The class `qiskit.algorithms.evolvers.evolution_problem.EvolutionProblem` is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. Instead, use the class `qiskit.algorithms.time_evolvers.TimeEvolutionProblem`. See [https://qisk.it/algo\_migration](https://qisk.it/algo_migration) for a migration guide.
</Admonition>
**Parameters**
* **hamiltonian** ([*OperatorBase*](qiskit.opflow.OperatorBase "qiskit.opflow.OperatorBase")) The Hamiltonian under which to evolve the system.
* **time** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Total time of evolution.
* **initial\_state** ([*StateFn*](qiskit.opflow.state_fns.StateFn "qiskit.opflow.state_fns.StateFn") *|*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *| None*) The quantum state to be evolved for methods like Trotterization. For variational time evolutions, where the evolution happens in an ansatz, this argument is not required.
* **aux\_operators** (*ListOrDict\[*[*OperatorBase*](qiskit.opflow.OperatorBase "qiskit.opflow.OperatorBase")*] | None*) Optional list of auxiliary operators to be evaluated with the evolved `initial_state` and their expectation values returned.
* **truncation\_threshold** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Defines a threshold under which values can be assumed to be 0. Used when `aux_operators` is provided.
* **t\_param** ([*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter") *| None*) Time parameter in case of a time-dependent Hamiltonian. This free parameter must be within the `hamiltonian`.
* **param\_value\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")*\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")*,* [*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")*] | None*) Maps free parameters in the problem to values. Depending on the algorithm, it might refer to e.g. a Hamiltonian or an initial state.
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") If non-positive time of evolution is provided.
## Attributes
### time
<Attribute id="qiskit.algorithms.EvolutionProblem.time">
Returns time.
</Attribute>
## Methods
### validate\_params
<Function id="qiskit.algorithms.EvolutionProblem.validate_params" signature="validate_params()">
Checks if all parameters present in the Hamiltonian are also present in the dictionary that maps them to values.
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") If Hamiltonian parameters cannot be bound with data provided.
</Function>
</Class>