discretize_simulation
- TimeSegment.discretize_simulation(included_driving_field_names, method, n_eval=251, n_split=250)
Discretize the time segment for simulation.
For simulation, the time is discretized using one of methods:
'basic'
:Uniform discretization of the entire time segment. The maximum time step is chosen such that one period of the highest-frequency pulse in the segment is divided into
n_split
time steps. If the envelope is not constant, the time step is additionally limited by the total segment duration to ensure adequate resolution. This is the general-purpose option.
'single_sine_wave'
:Optimized for segments with a single constant-enveloped pulse. Instead of evaluating the full time segment, only one cycle of the sine wave is simulated. The full pulse is then reconstructed from this sample, resulting in lower memory usage and faster computation in applicable cases. If the segment does not meet the required conditions (multiple pulses or non-constant envelopes), this method falls back to
'basic'
.
Results are stored in the
simulation_...
attributes.- Parameters:
included_driving_field_names (
List
[str
]) – Specify which signals are stored insimulation_signals
.method (
str
) – Could be'basic'
or'single_sine_wave'
.n_eval (
int
) – Number of evaluation points at which the simulation results (time evolution operator or wave function) will be computed and returned.n_split (
int
) – Number of time steps used discretize to one period of the highest-frequency component.