Trajectory package¶
mesohops.dynamics.hops_trajectory class¶

class
HopsTrajectory
(system_param, eom_param={}, noise_param={}, hierarchy_param={}, storage_param={}, integration_param={'EARLY_ADAPTIVE_INTEGRATOR': 'INCH_WORM', 'EARLY_INTEGRATOR_STEPS': 5, 'INCHWORM_CAP': 5, 'INTEGRATOR': 'RUNGE_KUTTA', 'STATIC_BASIS': None})¶ Bases:
object
HopsTrajectory is the class that a user should interface with to run a single trajectory calculation.

construct_noise_correlation_function
(self, n_l2, n_traj)¶ Uses correlated noise trajectories to reconstruct the full noise correlation function ** Warning if SEED is not None function will not work properly **
 Parameters
 1. n_l2int
Index of the site that the noise is being generated on.
 2. n_trajint
Number of trajectories summed over.
 Returns
 1. list_corr_func_1list
Correlation function calculated for noise1.
 2. list_corr_func_2list
Correlation function calculated for noise2.

inchworm_integrate
(self, list_state_new, list_aux_new, tau)¶ Performs inchworm integration.
 Parameters
 1. state_update
 list_state_newlist
List of new states.
 state_stablelist
List of stable states in the current basis.
 list_add_statelist
List of new states that were not in previous state list.
 2. aux_update
 aux_newlist
List of new auxiliaries.
 stable_auxlist
List of stable auxiliaries in the current basis.
 add_auxlist
List of new auxiliaries that were not in the previous aux list.
 3. taufloat
Time step.
 Returns
 state_update
 list_state_newlist
List of new states.
 state_stablelist
List of stable states in the current basis.
 list_add_statelist
List of new states that were not in previous state list.
 aux_update
 aux_newlist
List of new auxiliaries.
 stable_auxlist
List of stable auxiliaries in the current basis.
 add_auxlist
List of new auxiliaries that were not in the previous aux list.
 3. phinp.array
Full state of the hierarchy normalized if appropriate.

initialize
(self, psi_0)¶ Initializes the trajectory module by ensuring that each subcomponent is prepared to begin propagating a trajectory.
 Parameters
 1. psi_0np.array
Wave function at initial time.
 Returns
 None

make_adaptive
(self, delta_h=0.0001, delta_s=0.0001, update_step=1)¶ This is a convenience function for transforming a notyetinitialized HOPS trajectory from a standard hops to an adaptive HOPS approach.
 Parameters
 1. delta_hfloat < 1
The value of the adaptive grid for the hierarchy of auxiliary nodes.
 2. delta_sfloat < 1
The value of the adaptive grid in the system basis.
 3. update_stepint
The number of time points between updates to the adaptive basis.
 Returns
 None

normalize
(self, phi)¶ Renormalizes the wave function at each step to correct for loss of norm due to finite numerical accuracy
 Parameters
 1. phinp.array
Current full state of the hierarchy.
 Returns
 1. phinp.array
The full state of the hierarchy normalized if appropriate.

propagate
(self, t_advance, tau)¶ Performs the integration along fixed timepoints. The kind of integration that is performed is controlled by ‘step’ which was setup in the initialization.
 Parameters
 1. t_advancefloat
How far out in time the calculation will run.
 2. taufloat
Time step.
 Returns
 None

mesohops.dynamics.hops_storage class¶

class
HopsStorage
(adaptive, storage_dic)¶ Bases:
object
This is an object that manages storing information for a HOPS trajectory.

store_step
(self, **kwargs)¶ Inserts data into the HopsStorage class at eachtime point of the simulation.
 Parameters
 1. kwargsany
The following parameters are the default key word arguments that are currently being passed 1. phi_new : np.array
the updated full hierarchy
 aux_newlist
a list of the current auxiliaries in the hierarchy basis
 state_listlist
the list of current states in the system basis
 t_newfloat
the new time point (t+tau)
 z_mem_newlist
a list of memory values
 Returns
 None
