HILA
Loading...
Searching...
No Matches
SU2< T > Class Template Reference

#include <su2.h>

Public Member Functions

template<typename B , std::enable_if_t< hila::is_assignable< T &, B >::value, int > = 0>
 SU2 (const B z)
 construct from 'scalar'
 
template<typename S , std::enable_if_t< hila::is_assignable< T &, S >::value, int > = 0>
 SU2 (std::initializer_list< S > rhs)
 initializer list constructor
 
SU2< T > & normalize ()
 Normalize det = 1 to make sure it's an element of SU2.
 
SU2< T > & reunitarize ()
 Normalize det = 1 to make sure it's an element of SU2.
 
SU2< T > dagger () const
 complex conjugate transpose
 
trace () const
 for SU2 same as .dagger()
 
SU2< T > operator- () const
 unary -
 
SU2< T > operator+ () const
 unary +
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, A >::value, int > = 0>
SU2< T > & operator= (const SU2< A > &rhs)
 assign from another SU2
 
template<typename S , std::enable_if_t< hila::is_assignable< T &, S >::value, int > = 0>
SU2< T > & operator= (std::initializer_list< S > rhs)
 assign from initializer list
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, A >::value, int > = 0>
SU2< T > & operator= (A rhs)
 assign from 'scalar'
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, hila::type_plus< T &, A > >::value, int > = 0>
SU2< T > & operator+= (const SU2< A > &rhs)
 add assign another SU2
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, hila::type_minus< T &, A > >::value, int > = 0>
SU2< T > & operator-= (const SU2< A > &rhs)
 subtract assign another SU2
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, hila::type_plus< T &, A > >::value, int > = 0>
SU2< T > & operator+= (const A rhs)
 add assign ('scalar' * identity matrix)
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, hila::type_minus< T &, A > >::value, int > = 0>
SU2< T > & operator-= (const A rhs)
 subtract assign ('scalar' * identity matrix)
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, hila::type_mul< T &, A > >::value, int > = 0>
SU2< T > & operator*= (const A rhs)
 multiply assign scalar
 
template<typename A , std::enable_if_t< hila::is_assignable< T &, hila::type_div< T &, A > >::value, int > = 0>
SU2< T > & operator/= (const A rhs)
 divide assign scalar
 
SU2< T > & random (double width=1.0)
 make random SU2
 
SU2< T > & gaussian_random (double width=1.0)
 make gaussian random matrix, does not normalize
 
Algebra< SU2< T > > project_to_algebra () const
 project SU2 to generators $\lambda_a = 1/2 \sigma_a$
 
SU2< T > exp () const
 SU2 matrix exp.
 
Algebra< SU2< T > > log () const
 SU2 matrix log, returns SU2 algebra.
 

Detailed Description

template<typename T>
class SU2< T >

This implementation represents the matrices as $U = d + a i\sigma_1 + b i\sigma_2 + c i\sigma_3$ This is in SU(2) if $a^2 + b^2 + c^2 + d^2 = 1$

Definition at line 14 of file su2.h.


The documentation for this class was generated from the following file: