| std::string syten::calc_expval | ( | Lattice const & | lat, |
| State && | a, | ||
| State && | b, | ||
| SDef const & | norm, | ||
| std::string const & | op_expr, | ||
| int const | variance, | ||
| bool const | column, | ||
| bool const | realOnly, | ||
| bool const | imagOnly, | ||
| Index const | prec | ||
| ) |
Calculates an expectation value and possibly a variance for given states, lattices and operators.
Returns a string expression for the result without newline termination.
| Lattice | Lattice type |
| State | State type |
| lat | lattice on which the operator is defined |
| a | first state (complex-conjugated) |
| b | second state (not complex-conjugated) |
| norm | Overlap of a and b or norm of a, result will be divided by this |
| op_expr | operator expression, parsed with respect to lat |
| variance | 0: no variance calculation, 1: extended output (expectation value and variance), 2: only variance |
| column | if true, prints real and imaginary part separated by some whitespace (overwrites realOnly and columnOnly) |
| realOnly | if true, only prints real part |
| imagOnly | if true, only prints imaginary part |
| prec | output precision |
std::cout or in a file, without trailing newline. References abs(), syten::IPEPS::expectation(), norm(), syten::MPS::parse(), print_result(), and syten::MPS::variance().
Referenced by do_expval().
Here is the call graph for this function:
Here is the caller graph for this function: