Hi Julien,

Non-scalar measurements are stored together with labels describing each entry.
There is no order documented, because there is no order imposed. For example, because of implementation details, the local density measurements is stored in “lexical order”, i.e. 1, 10, 11, …, 2, 3, 4,…

The bottomline is that non-scalar measurements are in a flat vector d.y and there is another (higher dimensional) vector describing each entry in d.x

The file tutorials/mps-04-correlations/spin_one_half.py provides an example on how to iterate through a correlation measurement.


Note that the representation of d.x is also not trivial and is a bit different between one- and two-dimensional lattices.
For example
d.x = [
  [coords_11, coords_12],
  [coords_21, coords_22],
  [coords_31, coords_32],
  [coords_41, coords_42],
  ...
]

where with coords_ij I mean the coordinate of the operators j and this is the i-th entry.

Coords_ij is the actual lattice coordinate. In 1d it is just a scalar, in 2d it is a pair of coordinates (x,y).


Best,
Michele

--
ETH Zurich
Dr. Michele Dolfi
Institute for Theoretical Physics
HIT G 32.4
Wolfgang-Pauli-Str. 27
8093 Zurich
Switzerland


+41 44 633 78 56 phone
+41 44 633 11 15 fax 






On Dec 15, 2016, at 11:39 AM, Julien <julien.despres@institutoptique.fr> wrote:

Dear all,

I'm not sure about something concerning the measurements in the MPS code. For instance, I consider the one-dimensional Bose-Hubbard model and then I measure the density-density correlations by the following line : model['MEASURE_CORRELATIONS[Density-density correlations]'] = 'n:n'. As an output, I get a vector of L*L - L components with L the number of sites (I agree due to the fact that we don't have access to the <n_i n_j> values where the index 'i' is equal to 'j', we have to define a new operator n^2) but I haven't seen in the doc how this vector is organized. More precisely, which index is modify first? Do we have something like : d.y[0][:] = (<n0n1>, <n0n2>, ...,<n0,NL-1>, <n1n0>, <n1n2>, ...)  .

Thanks in advance,

Julien

--
__________________________________

DESPRES Julien
Ph.D. student

Atom Optics group
Quantum Matter Theory team
Laboratoire Charles Fabry
Institut d'Optique Graduate School
2 Avenue Augustin Fresnel
91127 Palaiseau Cedex

Office : R2.29 (1st floor)
Phone: +33 1 64 53 33 49
__________________________________



----
Comp-phys-alps-users Mailing List for the ALPS Project
http://alps.comp-phys.org/

List info: https://lists.phys.ethz.ch//listinfo/comp-phys-alps-users
Archive: https://lists.phys.ethz.ch//pipermail/comp-phys-alps-users

Unsubscribe by writing a mail to comp-phys-alps-users-leave@lists.phys.ethz.ch.