ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template hamiltonian_matrix

alps::hamiltonian_matrix

Synopsis

// In header: <alps/model/hamiltonian_matrix.hpp>

template<typename M, typename G = typename graph_helper<>::graph_type> 
class hamiltonian_matrix {
public:
  // types
  typedef M                                   matrix_type;            
  typedef matrix_type::value_type             value_type;             
  typedef graph_helper::graph_type            graph_type;             
  typedef graph_helper::site_descriptor       site_descriptor;        
  typedef graph_helper::bond_descriptor       bond_descriptor;        
  typedef graph_helper::site_iterator         site_iterator;          
  typedef graph_helper::bond_iterator         bond_iterator;          
  typedef graph_helper::vector_type           vector_type;            
  typedef model_helper::basis_descriptor_type basis_descriptor_type;  
  typedef basis_states< short >               basis_states_type;      
  typedef bloch_basis_states< short >         bloch_basis_states_type;
  typedef basis_states_type::value_type       state_type;             

  // construct/copy/destruct
  hamiltonian_matrix(Parameters const &);

  // public member functions
  void set_parameters(Parameters const &);
  basis_states_type & states_vector();
  const basis_states_type & states_vector() const;
  bloch_basis_states_type & bloch_states_vector();
  const bloch_basis_states_type & bloch_states_vector() const;
  matrix_type & matrix();
  const matrix_type & matrix() const;
  std::size_t dimension() const;
  void dostep();
  void print_basis(std::ostream &) const;
  template<typename STATES, typename V, typename W> 
    void apply_operator(const STATES &, const SiteOperator &, site_descriptor, 
                        const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const SiteOperator &, site_descriptor, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const BondOperator &, bond_descriptor, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const BondOperator &, site_descriptor, 
                        site_descriptor, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const boost::multi_array< std::pair< value_type, bool >, 4 > &, 
                        site_descriptor, site_descriptor, const V &, W &) const;
  template<typename STATES, typename V, typename W> 
    void apply_operator(const STATES &, 
                        const boost::multi_array< std::pair< value_type, bool >, 4 > &, 
                        site_descriptor, site_descriptor, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const SiteOperator &, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const BondOperator &, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const GlobalOperator &, const V &, W &) const;
  template<typename MM, typename OP> MM operator_matrix(const OP &) const;
  template<typename MM, typename OP> 
    void add_operator_matrix(MM &, const OP &) const;
  template<typename MM, typename OP, typename D> 
    MM operator_matrix(const OP &, D) const;
  template<typename MM, typename OP, typename D> 
    void add_operator_matrix(MM &, const OP &, D) const;
  template<typename MM, typename OP> 
    MM operator_matrix(const OP &, site_descriptor, site_descriptor) const;
  template<typename MM, typename OP> 
    void add_operator_matrix(MM &, const OP &, site_descriptor, 
                             site_descriptor) const;
  boost::multi_array< value_type, 2 > 
  local_matrix(const SiteOperator &, site_descriptor) const;
  boost::multi_array< std::pair< value_type, bool >, 4 > 
  local_matrix(const BondOperator &, const bond_descriptor &) const;
  boost::multi_array< std::pair< value_type, bool >, 4 > 
  local_matrix(const BondOperator &, const site_descriptor &, 
               const site_descriptor &) const;
  template<typename V, typename W> 
    void apply_operator(const std::string &, bond_descriptor, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const std::string &, site_descriptor, const V &, W &) const;
  template<typename V, typename W> 
    void apply_operator(const std::string &, const V &, W &) const;
  bool uses_translation_invariance() const;

  // protected member functions
  void build() const;
  void build_basis() const;
};

Description

hamiltonian_matrix public construct/copy/destruct

  1. hamiltonian_matrix(Parameters const & parms);

hamiltonian_matrix public member functions

  1. void set_parameters(Parameters const & p);
  2. basis_states_type & states_vector();
  3. const basis_states_type & states_vector() const;
  4. bloch_basis_states_type & bloch_states_vector();
  5. const bloch_basis_states_type & bloch_states_vector() const;
  6. matrix_type & matrix();
  7. const matrix_type & matrix() const;
  8. std::size_t dimension() const;
  9. void dostep();
  10. void print_basis(std::ostream & os) const;
  11. template<typename STATES, typename V, typename W> 
      void apply_operator(const STATES &, const SiteOperator & op, 
                          site_descriptor s, const V &, W &) const;
  12. template<typename V, typename W> 
      void apply_operator(const SiteOperator & op, site_descriptor s, const V & x, 
                          W & y) const;
  13. template<typename V, typename W> 
      void apply_operator(const BondOperator & op, bond_descriptor b, const V &, 
                          W &) const;
  14. template<typename V, typename W> 
      void apply_operator(const BondOperator & op, site_descriptor s1, 
                          site_descriptor s2, const V &, W &) const;
  15. template<typename V, typename W> 
      void apply_operator(const boost::multi_array< std::pair< value_type, bool >, 4 > & mat, 
                          site_descriptor s1, site_descriptor s2, const V & x, 
                          W & y) const;
  16. template<typename STATES, typename V, typename W> 
      void apply_operator(const STATES &, 
                          const boost::multi_array< std::pair< value_type, bool >, 4 > & mat, 
                          site_descriptor s1, site_descriptor s2, const V & x, 
                          W & y) const;
  17. template<typename V, typename W> 
      void apply_operator(const SiteOperator & op, const V &, W &) const;
  18. template<typename V, typename W> 
      void apply_operator(const BondOperator & op, const V &, W &) const;
  19. template<typename V, typename W> 
      void apply_operator(const GlobalOperator & op, const V &, W &) const;
  20. template<typename MM, typename OP> MM operator_matrix(const OP & op) const;
  21. template<typename MM, typename OP> 
      void add_operator_matrix(MM & m, const OP & op) const;
  22. template<typename MM, typename OP, typename D> 
      MM operator_matrix(const OP & op, D d) const;
  23. template<typename MM, typename OP, typename D> 
      void add_operator_matrix(MM & m, const OP & op, D d) const;
  24. template<typename MM, typename OP> 
      MM operator_matrix(const OP & op, site_descriptor s1, site_descriptor s2) const;
  25. template<typename MM, typename OP> 
      void add_operator_matrix(MM & m, const OP & op, site_descriptor s1, 
                               site_descriptor s2) const;
  26. boost::multi_array< value_type, 2 > 
    local_matrix(const SiteOperator & op, site_descriptor s) const;
  27. boost::multi_array< std::pair< value_type, bool >, 4 > 
    local_matrix(const BondOperator & op, const bond_descriptor & b) const;
  28. boost::multi_array< std::pair< value_type, bool >, 4 > 
    local_matrix(const BondOperator & op, const site_descriptor & s1, 
                 const site_descriptor & s2) const;
  29. template<typename V, typename W> 
      void apply_operator(const std::string & name, bond_descriptor b, 
                          const V & x, W & y) const;
  30. template<typename V, typename W> 
      void apply_operator(const std::string & op, site_descriptor s, const V & x, 
                          W & y) const;
  31. template<typename V, typename W> 
      void apply_operator(const std::string & name, const V & x, W & y) const;
  32. bool uses_translation_invariance() const;

hamiltonian_matrix protected member functions

  1. void build() const;
  2. void build_basis() const;
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo

PrevUpHomeNext