ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
identity_mps.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * ALPS MPS DMRG Project
4  *
5  * Copyright (C) 2013 Institute for Theoretical Physics, ETH Zurich
6  * 2013-2013 by Michele Dolfi <dolfim@phys.ethz.ch>
7  *
8  * This software is part of the ALPS Applications, published under the ALPS
9  * Application License; you can use, redistribute it and/or modify it under
10  * the terms of the license, either version 1 or (at your option) any later
11  * version.
12  *
13  * You should have received a copy of the ALPS Application License along with
14  * the ALPS Applications; see the file LICENSE.txt. If not, the license is also
15  * available from http://alps.comp-phys.org/.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23  * DEALINGS IN THE SOFTWARE.
24  *
25  *****************************************************************************/
26 
27 #ifndef MAQUIS_DMRG_IDENTITY_MPS_H
28 #define MAQUIS_DMRG_IDENTITY_MPS_H
29 
31 
32 template <class Matrix, class InSymm>
34  std::vector<Index<typename grouped_symmetry<InSymm>::type> > const& allowed)
35 {
37  t.set(0, 0, identity_matrix<Matrix>(phys_psi));
38 
39  MPO<Matrix, InSymm> mpo(L, t);
40  return mpo_to_smps_group(mpo, phys_psi, allowed);
41 }
42 
43 #endif
void set(index_type li, index_type ri, op_t const &op, value_type scale_=1.0)
Definition: mpotensor.hpp:106
MPS< Matrix, typename grouped_symmetry< InSymm >::type > mpo_to_smps_group(MPO< Matrix, InSymm > const &mpo, Index< InSymm > const &phys_i, std::vector< Index< typename grouped_symmetry< InSymm >::type > > const &allowed)
Definition: super_mpo.h:195
Definition: mpo.h:36
MPS< Matrix, typename grouped_symmetry< InSymm >::type > identity_dm_mps(std::size_t L, Index< InSymm > const &phys_psi, std::vector< Index< typename grouped_symmetry< InSymm >::type > > const &allowed)
Definition: identity_mps.h:33
Definition: mps.h:40