Difference between revisions of "Trajsimil.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Update function See also links and function index membership)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:trajsimil.m}} __NOTOC__
 
{{DISPLAYTITLE:trajsimil.m}} __NOTOC__
−
 
 
Computes trajectory similarity scores. Returns a function representing "similarity" of the two state space trajectories at different points in time. See http://dx.doi.org/10.1016/j.jmr.2013.02.012 for further information.
 
Computes trajectory similarity scores. Returns a function representing "similarity" of the two state space trajectories at different points in time. See http://dx.doi.org/10.1016/j.jmr.2013.02.012 for further information.
  
 
==Syntax==
 
==Syntax==
  
−
score=trajsimil(spin_system,trajectory_1,trajectory_2,scorefcn)
 
  
−
==Arguments==
+
    score=trajsimil(spin_system,trajectory_1,trajectory_2,scorefcn)
  
−
trajectory_1,2 - spin system trajectories, supplied as nstates
+
==Parameters==
 +
 
 +
  trajectory_1,2 - spin system trajectories, supplied as nstates
 
                     x nsteps matrices.
 
                     x nsteps matrices.
−
 
+
−
   scorefcn      - similarity scoring method; possibilities are:
+
   method        - similarity scoring method; possibilities are:
−
 
+
 
                     'RSP'  - running scalar product. Computes
 
                     'RSP'  - running scalar product. Computes
 
                               scalar products between the cor-
 
                               scalar products between the cor-
 
                               responding vectors of the trajec-
 
                               responding vectors of the trajec-
 
                               tories.
 
                               tories.
−
 
+
 
                     'RDN'  - running difference norm. The two
 
                     'RDN'  - running difference norm. The two
−
                               trajectories are subtracted and
+
                               trajectories are subtracted and  
 
                               difference 2-norms returned.
 
                               difference 2-norms returned.
−
 
+
 
                     'SG-'  - prefix that turns on state grou-
 
                     'SG-'  - prefix that turns on state grou-
 
                               ping. T(l,m) and T(l,-m) states
 
                               ping. T(l,m) and T(l,-m) states
−
                               of each spin (standalone or in
+
                               of each spin (standalone or in  
 
                               direct products with other ope-
 
                               direct products with other ope-
 
                               rators)will be considered equva-
 
                               rators)will be considered equva-
 
                               lent.
 
                               lent.
−
 
+
 
                     'BSG-' - prefix that turns on broad state
 
                     'BSG-' - prefix that turns on broad state
 
                               grouping. All states of a given
 
                               grouping. All states of a given
−
                               spin (standalone or in direct
+
                               spin (standalone or in direct  
 
                               products with other operators)
 
                               products with other operators)
 
                               will be considered equivalent.
 
                               will be considered equivalent.
−
 
+
 
                     The possible combinations are: 'RSP','RDN',
 
                     The possible combinations are: 'RSP','RDN',
 
                     'SG-RSP','SG-RDN','BSG-RSP','BSG-RDN'.
 
                     'SG-RSP','SG-RDN','BSG-RSP','BSG-RDN'.
  
−
State grouping consists in summing the absolute squares of the coeffi-
+
State grouping consists in summing the absolute squares of the coefficients to be grouped and taking the square root. The trajectories would usually come out of the [[evolution.m]] or [[krylov.m]] run from a given starting point under a given Liouvillian.
−
cients to be grouped and taking the square root. The trajectories would
 
−
usually come out of the evolution.m or krylov.m run from a given star-
 
−
ting point under a given Liouvillian.
 
  
 
==Outputs==
 
==Outputs==
  
−
This function writes into the current figure.
+
    This function writes into the current figure.
  
 
==Examples==
 
==Examples==
−
 
 
Figure 6 of http://dx.doi.org/10.1016/j.jmr.2013.02.012 was created using this function.
 
Figure 6 of http://dx.doi.org/10.1016/j.jmr.2013.02.012 was created using this function.
  
 
==Notes==
 
==Notes==
−
 
 
SG and BSG options require sphten-liouv formalism.
 
SG and BSG options require sphten-liouv formalism.
  
 
==See also==
 
==See also==
−
 
+
[[trajan.m]], [[basis.m]], [[evolution.m]], [[krylov.m]], [[stateinfo.m]], [[Kernel_functions]]
−
[[trajan.m]], [[basis.m]], [[evolution.m]], [[krylov.m]]
 
−
 
 
  
 
''Version 2.2, authors: [[Ilya Kuprov]], [[Konstantin Pervushin]]''
 
''Version 2.2, authors: [[Ilya Kuprov]], [[Konstantin Pervushin]]''

Latest revision as of 18:42, 6 June 2026

Computes trajectory similarity scores. Returns a function representing "similarity" of the two state space trajectories at different points in time. See http://dx.doi.org/10.1016/j.jmr.2013.02.012 for further information.

Syntax

    score=trajsimil(spin_system,trajectory_1,trajectory_2,scorefcn)

Parameters

  trajectory_1,2 - spin system trajectories, supplied as nstates
                   x nsteps matrices.

  method         - similarity scoring method; possibilities are:

                    'RSP'  - running scalar product. Computes
                             scalar products between the cor-
                             responding vectors of the trajec-
                             tories.

                    'RDN'  - running difference norm. The two
                             trajectories are subtracted and 
                             difference 2-norms returned.

                    'SG-'  - prefix that turns on state grou-
                             ping. T(l,m) and T(l,-m) states
                             of each spin (standalone or in 
                             direct products with other ope-
                             rators)will be considered equva-
                             lent.

                    'BSG-' - prefix that turns on broad state
                             grouping. All states of a given
                             spin (standalone or in direct 
                             products with other operators)
                             will be considered equivalent.

                   The possible combinations are: 'RSP','RDN',
                   'SG-RSP','SG-RDN','BSG-RSP','BSG-RDN'.

State grouping consists in summing the absolute squares of the coefficients to be grouped and taking the square root. The trajectories would usually come out of the evolution.m or krylov.m run from a given starting point under a given Liouvillian.

Outputs

    This function writes into the current figure.

Examples

Figure 6 of http://dx.doi.org/10.1016/j.jmr.2013.02.012 was created using this function.

Notes

SG and BSG options require sphten-liouv formalism.

See also

trajan.m, basis.m, evolution.m, krylov.m, stateinfo.m, Kernel_functions

Version 2.2, authors: Ilya Kuprov, Konstantin Pervushin