EvolutionProblem
class EvolutionProblem(hamiltonian, time, initial_state, aux_operators=None, truncation_threshold=1e-12, t_param=None, hamiltonian_value_dict=None)
Bases: object
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.
Parameters
- hamiltonian (
OperatorBase
) – The Hamiltonian under which to evolve the system. - time (
float
) – Total time of evolution. - initial_state (
Union
[StateFn
,QuantumCircuit
]) – Quantum state to be evolved. - aux_operators (
Union
[List
[Optional
[OperatorBase
]],Dict
[str
,OperatorBase
],None
]) – Optional list of auxiliary operators to be evaluated with the evolvedinitial_state
and their expectation values returned. - truncation_threshold (
float
) – Defines a threshold under which values can be assumed to be 0. Used whenaux_operators
is provided. - t_param (
Optional
[Parameter
]) – Time parameter in case of a time-dependent Hamiltonian. This free parameter must be within thehamiltonian
. - hamiltonian_value_dict (
Optional
[Dict
[Parameter
,complex
]]) – If the Hamiltonian contains free parameters, this dictionary maps all these parameters to values.
Raises
ValueError – If non-positive time of evolution is provided.
Methods
validate_params
EvolutionProblem.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
Attributes
time
Returns time.
Return type
float