Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

su2.h File Reference

#include "matrix.h"
#include "complex"

Go to the source code of this file.

Namespaces

namespace  su2

Typedefs

typedef std::complex< double > cdouble

Functions

void mat_to_cart3 (const Matrix< cdouble > &U, double *c)
 Calculate cartesian form of the 3D Bloch vector for U.
void cart3_to_mat (double *c, Matrix< cdouble > &U)
 Construct a matrix U from the 3D cartesian Bloch vector.
void mat_to_polar3 (const Matrix< cdouble > &U, double *p)
 Calculate polar form of the 3D Bloch vector for U.
void polar3_to_mat (double *p, Matrix< cdouble > &U)
 Construct a matrix U from the 3D polar Bloch vector.
void polar_to_cart3 (double *p, double *c)
 Convert a polar 3D vector to a cartesian 3D vector.
void cart_to_polar3 (double *c, double *p)
 Convert a cartesian 3D vector to a polar 3D vector.
void x_factor (double *z, double *x, double *y)
 Given a 3D cartesian vector z, find vectors x,y s.t. $z = x \times y$.
void mat_to_cart4 (const Matrix< cdouble > &U, double *a)
 Calculate cartesian form of the 4D unit vector for U.
void cart4_to_mat (double *a, Matrix< cdouble > &U)
 Construct a matrix U from the 4D cartesian unit vector.
void mat_to_polar4 (const Matrix< cdouble > &, double *)
 Calculate the polar form of the 4D unit vector for U.
void polar4_to_mat (double *, Matrix< cdouble > &)
 Construct a matrix U from the 4D polar unit vector.
void polar_to_cart4 (double *, double *)
 Convert a polar form 4D vector to cartesian form.
void cart_to_polar4 (double *, double *)
 Convert a cartesian form 4D vector to polar form.
void polar_to_cart4 (polar &p, double *r)
 Legacy conversion from a 4D polar struct to cartesian form.
void polar4_to_mat (polar &, Matrix< cdouble > &)
 Legacy conversion from a 4D cartesian vector to a polar struct.
void eig_vals (Matrix< cdouble > &U, cdouble *evals)
 Quick and dirty calculation of the eigenvalues of an SU(2) matrix.
void eig_vecs (Matrix< cdouble > &U, cdouble *evecs)
 Quick and dirty calculation of the eigenvectors of an SU(2) matrix.
double trace_dist (const Matrix< cdouble > &U, const Matrix< cdouble > &V)
 Trace distance between SU(2) matrices U,V.
double trace_dist (const Matrix< cdouble > &U, double *coord4)
 Trace distance between SU(2) matrices U,V.
double proj_trace_dist (const Matrix< cdouble > &U, const Matrix< cdouble > &V)
 'Projective' trace distance between SU(2) matrices U,V
double proj_trace_dist (const Matrix< cdouble > &U, double *coord4)
 'Projective' trace distance between SU(2) matrices U,V
void group_factor (const Matrix< cdouble > &U, Matrix< cdouble > &V, Matrix< cdouble > &W)
 Find 'balanced' V,W in SU(2) such that U = [V,W].
void x_group_factor (const Matrix< cdouble > &, Matrix< cdouble > &, Matrix< cdouble > &)
 'Balanced' group commutator decomposition for U a rotation about the x-axis
void similarity_matrix (const Matrix< cdouble > &V, Matrix< cdouble > &W, Matrix< cdouble > &)
 Find an SU(2) matrix S such that $ V = S W S^\dagger $.
double norm (double *v, int n)
 Norm of a real vector v of length n.


Typedef Documentation

typedef std::complex<double> cdouble
 

Examples:
example.cpp.


Function Documentation

void su2::cart3_to_mat double *  c,
Matrix< cdouble > &  U
 

Construct a matrix U from the 3D cartesian Bloch vector.

void su2::cart4_to_mat double *  a,
Matrix< cdouble > &  U
 

Construct a matrix U from the 4D cartesian unit vector.

Examples:
example.cpp.

void su2::cart_to_polar3 double *  c,
double *  p
 

Convert a cartesian 3D vector to a polar 3D vector.

void su2::cart_to_polar4 double *  ,
double * 
 

Convert a cartesian form 4D vector to polar form.

void su2::eig_vals Matrix< cdouble > &  U,
cdouble evals
 

Quick and dirty calculation of the eigenvalues of an SU(2) matrix.

void su2::eig_vecs Matrix< cdouble > &  U,
cdouble evecs
 

Quick and dirty calculation of the eigenvectors of an SU(2) matrix.

void su2::group_factor const Matrix< cdouble > &  U,
Matrix< cdouble > &  V,
Matrix< cdouble > &  W
 

Find 'balanced' V,W in SU(2) such that U = [V,W].

void su2::mat_to_cart3 const Matrix< cdouble > &  U,
double *  c
 

Calculate cartesian form of the 3D Bloch vector for U.

void su2::mat_to_cart4 const Matrix< cdouble > &  U,
double *  a
 

Calculate cartesian form of the 4D unit vector for U.

void su2::mat_to_polar3 const Matrix< cdouble > &  U,
double *  p
 

Calculate polar form of the 3D Bloch vector for U.

void su2::mat_to_polar4 const Matrix< cdouble > &  ,
double * 
 

Calculate the polar form of the 4D unit vector for U.

double su2::norm double *  v,
int  n
 

Norm of a real vector v of length n.

void su2::polar3_to_mat double *  p,
Matrix< cdouble > &  U
 

Construct a matrix U from the 3D polar Bloch vector.

void su2::polar4_to_mat polar ,
Matrix< cdouble > & 
 

Legacy conversion from a 4D cartesian vector to a polar struct.

void su2::polar4_to_mat double *  ,
Matrix< cdouble > & 
 

Construct a matrix U from the 4D polar unit vector.

void su2::polar_to_cart3 double *  p,
double *  c
 

Convert a polar 3D vector to a cartesian 3D vector.

void su2::polar_to_cart4 polar p,
double *  r
 

Legacy conversion from a 4D polar struct to cartesian form.

void su2::polar_to_cart4 double *  ,
double * 
 

Convert a polar form 4D vector to cartesian form.

double su2::proj_trace_dist const Matrix< cdouble > &  U,
double *  coord4
 

'Projective' trace distance between SU(2) matrices U,V

V in this case is given by its 4D cartesian coordinates

double su2::proj_trace_dist const Matrix< cdouble > &  U,
const Matrix< cdouble > &  V
 

'Projective' trace distance between SU(2) matrices U,V

Examples:
example.cpp.

void su2::similarity_matrix const Matrix< cdouble > &  V,
Matrix< cdouble > &  W,
Matrix< cdouble > & 
 

Find an SU(2) matrix S such that $ V = S W S^\dagger $.

(or it might be the other way around)

double su2::trace_dist const Matrix< cdouble > &  U,
double *  coord4
 

Trace distance between SU(2) matrices U,V.

Except V in this case is given by its 4D cartesian coordinates

double su2::trace_dist const Matrix< cdouble > &  U,
const Matrix< cdouble > &  V
 

Trace distance between SU(2) matrices U,V.

void su2::x_factor double *  z,
double *  x,
double *  y
 

Given a 3D cartesian vector z, find vectors x,y s.t. $z = x \times y$.

void su2::x_group_factor const Matrix< cdouble > &  ,
Matrix< cdouble > &  ,
Matrix< cdouble > & 
 

'Balanced' group commutator decomposition for U a rotation about the x-axis


Generated on Sun Jul 10 21:57:13 2005 by  doxygen 1.4.1