You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the solver often uses timesteps much smaller than the timestep defined in the basis, the input is often between two-time bins. This is handled by dividing the input (float) with timestep (another float) and rounding. Thus we infer which time bin the input time corresponds to. This is faster(?) than looking into the whole array of times and seeing which two-time bins the input time lies between. However, dividing two floating numbers and turning them into an index seems like bad practice. Any inputs on another implementation @Krastanov ? (the current one works, although I recently had to put min() in because floating point errors made the last index go beyond the maximum time index).
The text was updated successfully, but these errors were encountered:
mabuni1998
changed the title
Setting timeindex in simulations
Future version of smooth evolution of the coupling
Mar 24, 2023
In the solver, the current way to set the time index of the operators is:
WaveguideQED.jl/src/solver.jl
Lines 29 to 33 in 2e4d63c
Since the solver often uses timesteps much smaller than the timestep defined in the basis, the input is often between two-time bins. This is handled by dividing the input (float) with timestep (another float) and rounding. Thus we infer which time bin the input time corresponds to. This is faster(?) than looking into the whole array of times and seeing which two-time bins the input time lies between. However, dividing two floating numbers and turning them into an index seems like bad practice. Any inputs on another implementation @Krastanov ? (the current one works, although I recently had to put min() in because floating point errors made the last index go beyond the maximum time index).
The text was updated successfully, but these errors were encountered: