#include "dmrg/mp_tensors/reduced_mps.h"
#include "dmrg/block_matrix/block_matrix.h"
#include "dmrg/block_matrix/block_matrix_algorithms.h"
#include "dmrg/block_matrix/symmetry.h"
#include "dmrg/models/lattice.h"
#include <alps/parser/xmlstream.h>
#include <vector>
#include <string>
#include <sstream>
#include <iostream>
#include <stdexcept>
#include <boost/regex.hpp>
#include <boost/static_assert.hpp>
Go to the source code of this file.
|
template<class Matrix , class SymmGroup > |
measurement< Matrix, SymmGroup > * | new_clone (const measurement< Matrix, SymmGroup > &m) |
|
template<class Archive , typename T > |
void | save_val_at_index (Archive &ar, std::string const &archive_path, T const &val, std::size_t eig) |
|
template<class Matrix , class SymmGroup > |
std::ostream & | operator<< (std::ostream &os, measurement< Matrix, SymmGroup > const &m) |
|
template<class Matrix , class SymmGroup > |
bool | is_hermitian_meas (std::vector< block_matrix< Matrix, SymmGroup > > const &ops) |
|
template<class Matrix , class SymmGroup > |
bool | is_hermitian_meas (std::vector< std::pair< std::vector< block_matrix< Matrix, SymmGroup > >, bool > > const &ops) |
|
std::vector< std::string > | label_strings (const Lattice &lat, const std::vector< std::vector< std::size_t > > &labels) |
|
template<class Matrix , class SymmGroup >
bool is_hermitian_meas |
( |
std::vector< block_matrix< Matrix, SymmGroup > > const & |
ops | ) |
|
UTILITIES.
Definition at line 175 of file measurement.h.
177 return all_true(ops.begin(), ops.end(),
bool is_hermitian(block_matrix< Matrix, SymmGroup > const &m)
bool all_true(InputIterator first, InputIterator last, Predicate pred)
template<class Matrix , class SymmGroup >
bool is_hermitian_meas |
( |
std::vector< std::pair< std::vector< block_matrix< Matrix, SymmGroup > >, bool > > const & |
ops | ) |
|
Definition at line 182 of file measurement.h.
185 for (
int i=0; i<ops.size() && is_herm; ++i)
bool is_hermitian_meas(std::vector< block_matrix< Matrix, SymmGroup > > const &ops)
UTILITIES.
std::vector<std::string> label_strings |
( |
const Lattice & |
lat, |
|
|
const std::vector< std::vector< std::size_t > > & |
labels |
|
) |
| |
|
inline |
Definition at line 190 of file measurement.h.
192 std::vector<std::string> ret;
193 ret.reserve(labels.size());
194 for (std::vector<std::vector<std::size_t> >::const_iterator it = labels.begin();
195 it != labels.end(); ++it)
197 std::ostringstream oss;
198 for (std::vector<std::size_t>::const_iterator it2 = it->begin(); it2 != it->end(); ++it2) {
199 oss << lat.
get_prop<std::string>(
"label", *it2);
200 if (it2 + 1 != it->end())
203 ret.push_back(oss.str());
T get_prop(std::string property, pos_t site) const
template<class Matrix , class SymmGroup >
template<class Matrix , class SymmGroup >
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
measurement< Matrix, SymmGroup > const & |
m |
|
) |
| |
Definition at line 166 of file measurement.h.
virtual void print(std::ostream &os) const
template<class Archive , typename T >
void save_val_at_index |
( |
Archive & |
ar, |
|
|
std::string const & |
archive_path, |
|
|
T const & |
val, |
|
|
std::size_t |
eig |
|
) |
| |
Definition at line 96 of file measurement.h.
99 if (ar.is_data(archive_path.c_str())) ar[archive_path] >> vals;
100 vals.resize( std::max(vals.size(), eig+1) );
102 ar[archive_path] << vals;