3.4 Algorithm parameters and performance
3.4.3 Timestep ratios and “oversampling”
Another set of parameters modifying the behaviour of the trajectory sampling method are the timestep durations for both the sampling and propagation al- gorithm, ∆ttand ∆tp respectively, introduced in Section 3.2.2. The latter is often dictated by the system under investigation, however ∆ttmay essentially be chosen freely, although should the value differ significantly from that of ∆tp, a negative impact on performance might be expected. Assuming similar basis set sizes,Ntotal, a drastically smaller timestep duration ∆tt can be interpreted as sampling phase space in a very dense manner, similar to a high sampling frequency, 1/n
s. Con-
versely, significantly longer sampling timesteps represent sparser sampling, as the distance covered in phase space, between potential basis function sampling points, is larger.
In order to investigate this hypothesis, following the approach outlined above, a set of 4×11 calculations was run, varying the values of ∆tt, as well as nt and
m, in order to maintain a total basis set size of Ntotal ≈ 18000. The details of the input parameters used can be found in Table 3.4. Again the average MAE and MAPE error as well as the corresponding standard deviation were calculated,
Table 3.4: Input parameters for trajectory sampling calculations of the 4D pyrazine Hamiltonian, the results of which are shown in Figure 3.11.
ns np ∆tp/fs Ntotal
10−3 10−2 10−1 100 0 2 4 6 ·10 −2 (a) ∆tt/ fs MAE 10−3 10−2 10−1 100 0 2 4 6 8 (b) ∆tt/ fs MAPE / %
Figure 3.11: (a) Mean absolute error in the P1 population of the 4D pyrazine Hamiltonian using varying timestep durations, ∆tt, and (b) corresponding mean absolute percentage errors, with an average basis set size of Ntotal ≈18000.
using Eqs. 3.38 and 3.39, the results of which are shown in Figure 3.11 and can in detail be found in Table A.3. Inspecting first of all the absolute values of the error, the above hypothesis appears to hold, although the aside from the very extreme cases where ∆tt>>∆tp and ∆tt<< ∆tp, the effect of changing ∆tt seems to be minimal. Further confirmation of this can be found via inspection of the standard deviations in the errors. The latter are comparatively large, suggesting that a significant proportion of the variation in the MAE and MAPE is due to the stochastic nature of the sampling trajectories.
Overall this is encouraging, as the choice of the propagation timestep for some systems may not be obvious, but will clearly significantly affect the nature of the dynamics. Given that, within reasonable limits, the choice of the sampling timestep, ∆tt, is unlikely to significantly change the accuracy of the trajectory sampling algorithm, it can, in the case described above, be kept constant as ∆tp is varied in order to find the optimal value.
One final aspect of the sampling algorithm that warrants investigation relates to the duration for which the sampling trajectories are propagated, with respect to the timescale of the TDSE solution. Again, while it may seem natural to sample phase space for the same amount of time as the wavefunction will be propagated for, the trajectory sampling algorithm does not strictly require this to be the case. Given the classical nature of the sampling trajectories, it is likely that the rate at which they explore phase space will vary from that of the actual dynamics of the wavefunction, the latter being quantum in nature and thus inherently different.
There are two possible cases here, the first, in which the sampling trajectories are propagated for a longer period of time than the TDSE solution, is termed “over-
3.4. ALGORITHM PARAMETERS AND PERFORMANCE 103 104 0 2·10−2 4·10−2 6·10−2 8·10−2 0.1 undersampling ov er sampli ng (a) nt MAE 103 104 0 2 4 6 8 10 12 undersampling ov ersampling (b) nt MAPE / %
Figure 3.12: (a) Mean absolute error in the P1 population of the 4D pyrazine Hamiltonian varying the duration of the sampling trajectories via the total num- ber of sampling timesteps, nt as well as the number of trajectories, m, and (b) corresponding mean absolute percentage errors, with an average basis set size of
Ntotal ≈18000.
sampling”, the converse is, by logical extension, referred to as “undersampling”. In order to explore these concepts, a set of calculations was run, following closely the well documented approach taken for the other investigations presented in this Section. Thus, a set of 4×14 calculations was run, varying the number of timesteps of trajectory sampling,ntand the number of trajectories run,m, in order to main- tain a total basis set size ofNtotal ≈18000, the remaining parameters being shown in Table 3.5. In keeping with the methodology used above, the average MAE and MAPE error were calculated using Eq. 3.38, while the extent of stochastic variation was determined via the standard deviation from Eq. 3.39. Average basis set sizes and resulting errors are shown in Table A.4.
Figure 3.12 shows clearly that varying the duration of the sampling trajector- ies has a significant impact on the accuracy with which the resulting basis set is able to represent the wavefunction moving in phase space. Unsurprisingly, “un- dersampling”, that is sampling for drastically less time than the wavefunction will be propagated for considerably increases the error, as, the trajectories simply do not reach certain areas of phase space, which are however visited by the wavefunc-
Table 3.5: Input parameters for trajectory sampling calculations of the 4D pyrazine Hamiltonian, the results of which are shown in Figure 3.12.
ns np ∆tp/fs ∆tt/fs Ntotal
tion. The absence of any basis functions in the aforementioned areas reduces the accuracy with which the wavefunction can be described, as it approaches them, thus reducing the overall accuracy of the dynamics.
Conversely, “oversampling” by allowing the sampling trajectories to evolve for longer than the duration for which the TDSE will be solved, does improve the accuracy with respect to exact MCTDH results,65 however this increase in the quality of the dynamics is marginal and evolving the trajectories for too long negates this benefit. The latter can be rationalised by considering for one the fact that due to the increased number of timesteps,nt, in order to maintain a constant basis set size,Ntotal, overall fewer trajectories are run, which has, in Section 3.4.2, been shown to negatively effect the quality of results, due to insufficient initial conditioning sampling. Furthermore, as trajectories start exploring more and more of phase space, the proportion of basis functions in any given area decreases, thus, given that using classical-like trajectories is likely to result in sampling of at least some irrelevant areas, will decrease the number of basis functions in areas that are relevant to wavefunction propagation.
The practices of “over-” and “undersampling” were found to indeed affect the accuracy of the trajectory sampling algorithm, the former providing a slight improvement unless nt >> np, while the latter consistently negatively impacted the results, for reasons discussed above.
In conclusion, the trajectory sampling algorithm, while conceptually extremely simple, incorporates a number of parameters which may be used to tune its per- formance. With regards to applying this method to a variety of different problems, this is considered an advantage as it provides flexibility and allows the perform- ance to be tuned to specifically suit the system at hand. There are undoubtedly more correlations that could be investigated, both between different parameters as well as the input and the accuracy with which the algorithm performs for any given problem, however the basic relationships described above should allow this method to be applied to most quantum dynamical systems, without too much further benchmarking being necessary.