<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- P { margin-top: 0px; margin-bottom: 0px; } p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Never mind, I solved the problem. I post the answer here just in case anyone else gets stuck on such a detail like me.<br>
</p>
<p><br>
</p>
<p>In the site basis, you simply define an operator with the same name but with some dummy value. For example, in the site basis of a boson:<br>
</p>
<p><br>
</p>
<p><OPERATOR name="Sz" matrixelement="1"/>​<br>
</p>
<p><br>
</p>
<p>It is now safe to measure Sz on all sites (and discard the value on the bosonic sites). <br>
</p>
<p><br>
</p>
<p>If there is a way in ALPS to do this without a hack, I would be pleased to know! <br>
</p>
<p><br>
</p>
<p>/Axel</p>
<p><br>
</p>
<p><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Från:</b> Comp-phys-alps-users <comp-phys-alps-users-bounces@lists.phys.ethz.ch> för Axel Gagge <axel.gagge@fysik.su.se><br>
<b>Skickat:</b> den 9 maj 2017 17:58<br>
<b>Till:</b> comp-phys-alps-users<br>
<b>Ämne:</b> [ALPS-users] DMRG measurements of observables with support only on some lattice sites</font>
<div> </div>
</div>
<div>
<p>Hello all,<br>
</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">I am working with</span><span style="font-size:12pt"> </span><span style="font-size:12pt">DMRG for</span><span style="font-size:12pt"> a model where the unit cell consists of two lattice sites of different types (one is a boson
 mode while the other is a two-level/spin 1/2). </span><span style="font-size:12pt">Now, I want to measure say the expectation value <Sz> of my ground state on all the spin sites - how can I do this in ALPS? If I use MEASURE_LOCAL, ALPS tries to compute the
 expectation value of Sz for the boson sites and crashes. </span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">MEASURE_LOCAL_AT seems like the reasonable thing to work with, but does it also work for expectation values? </span><br>
</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Best regards,</span></p>
<p><span style="font-size:12pt">Axel</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
</div>
</div>
</body>
</html>