unavioded

@package unavoided This module implements the functions to correct the state crossings (trivial, or “unavoided”) crossings. The order of the eigenstates is determined by the energies, not the orbital’s character. Say, if states i and j are localized on B and A, respectively, at “t+dt” while they were on A and B at “t”, it is likely that this is just a manifestation of the trivial crossing, not the actual transition. So one must correct the identity of the states.

class libra_py.unavoided.TestUnavoided(methodName='runTest')[source]
test_reordering()[source]

Tests the reordering algorithm

libra_py.unavoided.get_reordering(time_overlap)[source]

This function identifies which states have changed their identities via unavoided (a.k.a. trivial) crossing when the system evolved in the interval from t to t+dt We start by looking at the time overlap matrix: <phi_i(t)|phi_i(t+dt)> If no spurious state changes have happened during this time, the diagonal elements should be close to 1.0. If they are not - we locate to which state the transitions might have happened.

param[in] time_overlap ( MATRIX ) the time overlap matrix, <phi_i(t)|phi_j(t+dt)>. Returns: perm - list of integers that describe the permutation. That is: perm[i] - is the index identifying the “older” state “i”. Now, it may be labeled by some other index, j. iperm[j] - if we were looking at a specific state labeled “j”, iperm[j] this will be the index of that state in the present list of states (e.g. energies, etc.)