Hi ALPS-
I've been playing around with ALPS diagonalization procedures in the tutorials and seem to have run across a bug in the measurement behavior. If you add the following measurement to parm1a in ed-01-sparsediag (and appropriately convert the input file to xml):
MEASURE_AVERAGE[Avg Sx] = Sx
Then sparsediag dies with a parsing error:
$ sparsediag parm1a.in.xml ALPS sparse diagonalization application version 1.1 available from http://alps.comp-phys.org/ copyright (c) 2003-2007 by Matthias Troyer troyer@comp-phys.org for details see the publication: A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007).
using the ALPS parallelizing scheduler copyright (c) 1994-2006 by Matthias Troyer troyer@comp-phys.org. see Lecture Notes in Computer Science, Vol. 1505, p. 191 (1998).
based on the ALPS libraries version 2.0.2-r5790 available from http://alps.comp-phys.org/ copyright (c) 1994-2011 by the ALPS collaboration. Consult the web page for license details. For details see the publication: B. Bauer et al., J. Stat. Mech. (2011) P05001.
parsing task files ... Starting task 1. Quantumnumber Sz going from -4 to 4 with increment 1 Did not parse to end of string '(Sx)/4(i)'
I couldn't figure out any way to measure an average single site operator (rather than a correlation) because of this issue.
Best, Chris
Hi Chris,
the following patch should do it:
--- applications/diag/diag.h (revision 5899) +++ applications/diag/diag.h (working copy) @@ -199,7 +199,9 @@
BOOST_FOREACH (string_pair const& ex, this->average_expressions) { //std::cerr << "Evaluating " << ex.first << "\n"; - meas.average_values[ex.first] = calculate("("+ex.second +")/"+ boost::lexical_caststd::string(this->num_sites())); + alps::SiteOperator op(ex.second+"(i)/"+ boost::lexical_caststd::string(this->num_sites()),"i"); + this->substitute_operators(op,this->alps::scheduler::Task::parms); + meas.average_values[ex.first] = calculate(op); }
// calculate local measurements @@ -307,6 +309,7 @@ template <class Op> std::vector<T> DiagMatrix<T,M>::calculate(Op const& op) const { + return calculate(this->template operator_matrix<operator_matrix_type>(op)); }
On 12 Dec 2011, at 01:41, Chris Laumann wrote:
Hi ALPS-
I've been playing around with ALPS diagonalization procedures in the tutorials and seem to have run across a bug in the measurement behavior. If you add the following measurement to parm1a in ed-01-sparsediag (and appropriately convert the input file to xml):
MEASURE_AVERAGE[Avg Sx] = Sx
Then sparsediag dies with a parsing error:
$ sparsediag parm1a.in.xml ALPS sparse diagonalization application version 1.1 available from http://alps.comp-phys.org/ copyright (c) 2003-2007 by Matthias Troyer troyer@comp-phys.org for details see the publication: A.F. Albuquerque et al., J. of Magn. and Magn. Materials 310, 1187 (2007).
using the ALPS parallelizing scheduler copyright (c) 1994-2006 by Matthias Troyer troyer@comp-phys.org. see Lecture Notes in Computer Science, Vol. 1505, p. 191 (1998).
based on the ALPS libraries version 2.0.2-r5790 available from http://alps.comp-phys.org/ copyright (c) 1994-2011 by the ALPS collaboration. Consult the web page for license details. For details see the publication: B. Bauer et al., J. Stat. Mech. (2011) P05001.
parsing task files ... Starting task 1. Quantumnumber Sz going from -4 to 4 with increment 1 Did not parse to end of string '(Sx)/4(i)'
I couldn't figure out any way to measure an average single site operator (rather than a correlation) because of this issue.
Best, Chris
comp-phys-alps-users@lists.phys.ethz.ch