Basis package

Basis Class

mesohops.dynamics.hops_basis class

System Class

mesohops.dynamics.hops_system class

class HopsSystem(system_param)

Bases: object

HopsSystem is a class that stores the basic information about the system and system-bath coupling.

initialize(self, flag_adaptive, psi_0)

This function creates a state list depending on whether the calculation is adaptive or not

Parameters
1. flag_adaptiveboolean

a boolean that defines the adaptivity True: Adaptive, False: Static

2. psi_0np.array

the initial user inputted wave function

Returns
None
static reduce_sparse_matrix(coo_mat, state_list)

This function takes in a sparse matrix and list which represents the absolute state to a new relative state represented in a sparse matrix

NOTE: This function assumes that all states associated with the non-zero elements of the sparse matrix are present in the state list!

Parameters
1. coo_matscipy sparse matrix

a sparse matrix

2. state_listlist

a list of relative index

Returns
1. sparsenp.array

sparse matrix in relative basis

Hierarchy Class

mesohops.dynamics.hierarchy_functions module

check_long_edge(aux_vec, list_boolean, kmax, kdepth)

Checks if an individual auxiliary should be filtered out by the longedge filter.

Parameters
1. auxtuple

an auxiliary to check

2. list_booleanlist

the modes to filter True-filter, False-No filter

3. kmaxint

the maximum depth of the hierarchy

4. kdepthint

the depth beyond which only edge members of hierarchy are kept for filtered modes

Returns
1. check_auxbool

True-keep aux, False-remove aux

check_markovian(aux, list_boolean)

This function checks whether a auxiliary is a an allowed markovian mode or a non-markovian mode.

Parameters
1. auxAuxiliaryVector object
2. list_booleanlist

a list of boolean values True: markovian mode, False: non-markovian mode

Returns
1. allowedboolean

True: non-markovian/ allowed markovian, False: disallowed markovian

filter_aux_longedge(list_aux, list_boolean_by_mode, kmax, kdepth)

Beyond kdepth, only keep the edge terms upto kmax.

Parameters
1. list_auxlist

list of auxiliaries

2. list_boolean_by_modelist

a list of booleans: True-Filter, False-No Filter

3. kmaxint

the maximum depth of the hierarchy

4. kdepthint

the depth beyond which only edge members of hierarchy are kept for filtered modes

Returns
1. list_new_auxlist

a filtered list of auxiliaries

filter_aux_triangular(list_aux, list_boolean_by_mode, kmax, kdepth)

If the mode has a non-zero value, then it is kept only if the value is less than kmax and the total auxillary is less than kdepth. This essentially truncates some modes at a lower order than the other modes.

Parameters
1. list_auxlist

a list of auxiliary tuples

2. list_boolean_by_modelist

a list of booleans: True-Filter, False-No Filter

3. kmaxint

the largest value a filtered mode can have in an auxiliary

4. kdepthint

the largest depth of an auxiliary at which a filtered mode can have a non-zero value

Returns
1. list_new_auxlist

a filtered list of auxiliaries

filter_markovian(list_aux, list_boolean)

This function filters a list of auxiliaries based on whether it is a non-markovian auxiliary or an allowed markovian auxiliary.

Parameters
1. list_auxlist

list of unfiltered auxiliaries

2. list_booleanlist

a list of boolean values True: markovian mode, False: non-markovian mode

Returns
list_auxlist

filtered auxiliary list

mesohops.dynamics.hops_hierarchy class

mesohops.dynamics.hops_aux class

EOM Class

mesohops.dynamics.eom_functions module

mesohops.dynamics.eom_hops_ksuper module

calculate_ksuper(system, hierarchy)

This calculates all the pieces we need to time-evolve the system EXCEPT for the normalization term.

Parameters
1. systemHopsSystem Class

an instance of HopsSystem

2. hierarchyHopsHierarchy Class

an instance of HopsHierarchy

Returns
1. K0sparse matrix

updated time-invariant self-interaction superoperator

2. Kp1sparse matrix

updated time-invariant K+1 interaction superoperator

3. Zp1sparse matrix

updated time-varying K+1 interaction superoperator

4. Km1sparse matrix

updated time-invariant K-1 interaction superoperator

update_ksuper(K0, Kp1, Zp1, Km1, stable_aux, add_aux, stable_state, list_old_ilop, system, hierarchy, n_old, perm_index)

This function updates the EOM matrices to incorporate changes to the hierarchy. At the moment, this function is the key step to handling Dynamic Filtering of the hierarchy.

Parameters
1. K0sparse matrix

time-invariant self-interaction superoperator

2. Kp1sparse matrix

time-invariant K+1 interaction superoperator

3. Zp1sparse matrix

time-varying K+1 interaction superoperator

4. Km1sparse matrix

time-invariant K-1 interaction superoperator

5. stable_auxlist

list of stable auxiliaries

6. add_auxlist

list of new auxiliaries

7. stable_statelist

list of stable states

8. list_old_iloplist

list of the absolute indices of L operators in the last basis

9. systemHopsSystem class

an instance of HopsSystem

10. hierarchyHopsHierarchy class

an instance of HopsHierarchy

11. n_oldint

size of the full hierarchy in the previous basis

12. perm_indexlist

a list of column list and row list that define the permutation matrix

Returns
1. K0sparse matrix

updated time-invariant self-interaction superoperator

2. Kp1sparse matrix

updated time-invariant K+1 interaction superoperator

3. Zp1sparse matrix

updated time-varying K+1 interaction superoperator

4. Km1sparse matrix

updated time-invariant K-1 interaction superoperator

mesohops.dynamics.hops_eom class