qiskit-documentation/docs/api/qiskit/0.39/qiskit.algorithms.TimeEvolu...

121 lines
5.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: TimeEvolutionProblem
description: API reference for qiskit.algorithms.TimeEvolutionProblem
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.algorithms.TimeEvolutionProblem
---
# TimeEvolutionProblem
<Class id="qiskit.algorithms.TimeEvolutionProblem" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.22/qiskit/algorithms/time_evolvers/time_evolution_problem.py" signature="TimeEvolutionProblem(hamiltonian, time, initial_state=None, aux_operators=None, truncation_threshold=1e-12, t_param=None, param_value_map=None)" modifiers="class">
Bases: `object`
Time evolution problem class.
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.
### hamiltonian
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.hamiltonian">
The Hamiltonian under which to evolve the system.
**Type**
BaseOperator | [PauliSumOp](qiskit.opflow.primitive_ops.PauliSumOp "qiskit.opflow.primitive_ops.PauliSumOp")
</Attribute>
### initial\_state
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.initial_state">
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.
**Type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") | [Statevector](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector") | None
</Attribute>
### aux\_operators
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.aux_operators">
Optional list of auxiliary operators to be evaluated with the evolved `initial_state` and their expectation values returned.
**Type**
ListOrDict\[BaseOperator | [PauliSumOp](qiskit.opflow.primitive_ops.PauliSumOp "qiskit.opflow.primitive_ops.PauliSumOp")] | None
</Attribute>
### truncation\_threshold
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.truncation_threshold">
Defines a threshold under which values can be assumed to be 0. Used when `aux_operators` is provided.
**Type**
float
</Attribute>
### t\_param
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.t_param">
Time parameter in case of a time-dependent Hamiltonian. This free parameter must be within the `hamiltonian`.
**Type**
[Parameter](qiskit.circuit.Parameter "qiskit.circuit.Parameter") | None
</Attribute>
### param\_value\_map
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.param_value_map">
Maps free parameters in the problem to values. Depending on the algorithm, it might refer to e.g. a Hamiltonian or an initial state.
**Type**
dict\[[Parameter](qiskit.circuit.Parameter "qiskit.circuit.Parameter"), complex] | None
</Attribute>
**Parameters**
* **hamiltonian** (*BaseOperator |* [*PauliSumOp*](qiskit.opflow.primitive_ops.PauliSumOp "qiskit.opflow.primitive_ops.PauliSumOp")) The Hamiltonian under which to evolve the system.
* **time** (*float*) Total time of evolution.
* **initial\_state** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector") *| 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\[BaseOperator |* [*PauliSumOp*](qiskit.opflow.primitive_ops.PauliSumOp "qiskit.opflow.primitive_ops.PauliSumOp")*] | None*) Optional list of auxiliary operators to be evaluated with the evolved `initial_state` and their expectation values returned.
* **truncation\_threshold** (*float*) 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\_map** (*Mapping\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")*, complex] | 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** If non-positive time of evolution is provided.
## Methods
### validate\_params
<Function id="qiskit.algorithms.TimeEvolutionProblem.validate_params" signature="TimeEvolutionProblem.validate_params()">
Checks if all parameters present in the Hamiltonian are also present in the dictionary that maps them to values.
**Raises**
**ValueError** If Hamiltonian parameters cannot be bound with data provided.
**Return type**
`None`
</Function>
## Attributes
### time
<Attribute id="qiskit.algorithms.TimeEvolutionProblem.time">
Returns time.
**Return type**
`float`
</Attribute>
</Class>