# Trajan.m

From Spinach Documentation Wiki

Trajectory analysis function. Plots the time dependence of the density matrix norm, partitioned into user-specified property classes. Call syntax:

trajan(spin_system,trajectory,property)

Arguments:

trajectory - a stack of state vectors of any length. The number of rows in the trajectory array must match the number of states in the basis.

property - If set to 'correlation_order', returns the time dependence of the total populations of one-spin, two-spin, three-spin, etc. corre- lations in the system.

If set to 'coherence_order', returns the ti- me dependence of different orders of coheren- ce in the system, where a coherence order is defined as the sum of projection quantum num- bers in the spherical tensor representation of each state.

If set to 'total_each_spin', returns the ti- me dependence of total state space populati- on that involves each individual spin in the system in any way (all local populations and coherences of the spin as well as all of its correlations to all third party spins).

If set to 'local_each_spin', returns the ti- me dependence of the population of the sub- space of states that are local to each indi- vidual spin and do not involve any correla- tions to other spins in the system.

The trajectory would usually come out of the evolution() run from a given starting point under a given Liouvillian.

Note: this function is only applicable to the trajectories recorded in spherical tensor basis sets.