qilisdk.functionals.time_evolution
Classes
Simulate the dynamics induced by a time-dependent Hamiltonian schedule. |
Module Contents
- class TimeEvolution(schedule: qilisdk.analog.schedule.Schedule, observables: list[qilisdk.analog.hamiltonian.PauliOperator | qilisdk.analog.hamiltonian.Hamiltonian], initial_state: qilisdk.core.qtensor.QTensor, nshots: int = 1000, store_intermediate_results: bool = False)[source]
Bases:
qilisdk.functionals.functional.PrimitiveFunctional[qilisdk.functionals.time_evolution_result.TimeEvolutionResult]Simulate the dynamics induced by a time-dependent Hamiltonian schedule.
Example
from qilisdk.analog import Schedule, Hamiltonian, Z from qilisdk.core import ket from qilisdk.functionals.time_evolution import TimeEvolution h0 = Z(0) schedule = Schedule(hamiltonians={"h0": h0}, total_time=10.0) functional = TimeEvolution(schedule, observables=[Z(0), X(0)], initial_state=ket(0))- Parameters:
schedule (
Schedule) – Annealing or control schedule describing the Hamiltonian evolution.observables (
list[PauliOperator | Hamiltonian]) – Observables measured at the end of the evolution.initial_state (
QTensor) – Quantum state used as the simulation starting point.nshots (
int, optional) – Number of executions for statistical estimation. Defaults to 1000.store_intermediate_results (
bool, optional) – Keep intermediate states if produced by the backend. Defaults to False.
- result_type: ClassVar[type[qilisdk.functionals.time_evolution_result.TimeEvolutionResult]][source]
- property nparameters: int[source]
Return the number of schedule parameters.
- get_parameters() dict[str, qilisdk.core.variables.RealNumber][source]
Return the schedule parameters and their current value.
- set_parameters(parameters: dict[str, qilisdk.core.variables.RealNumber]) None[source]
Update a subset of schedule parameters.
- get_parameter_names() list[str][source]
Return order-stable parameter labels from the schedule.
- get_parameter_values() list[qilisdk.core.variables.RealNumber][source]
Return parameter values in the order provided by
get_parameter_names.
- set_parameter_values(values: list[float]) None[source]
Assign all schedule parameters according to
get_parameter_namesorder.
- get_parameter_bounds() dict[str, tuple[float, float]][source]
Return current bounds for schedule parameters.
- set_parameter_bounds(ranges: dict[str, tuple[float, float]]) None[source]
Update bounds for selected schedule parameters.
- get_constraints() list[qilisdk.core.variables.ComparisonTerm][source]
Return the parameter constraints defined within the underlying schedule.