worm: creation and annihilation of a worm are not inverses; soft-core boson averages biased by 0.2-0.3 %

Open
#295 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 3 days

@skilledwolf is already working on this.

Since Nov 4, 2026.

  • #301 by @skilledwolf — open

Assessment

This issue has not been assessed yet.

Description

area:qmc bug scientific-correctness

Summary

worm gives systematically wrong energies and densities for soft-core bosons
at intermediate t/U. The bias is a detailed-balance violation in
WRun::create_worm: the mobile head is always placed at the lower end of the
inserted segment, while annihilate_worm accepts a head/tail pair in either
order. A seven-line fix (swap the two ends with probability 1/2 after
creation) removes it. Pull request to follow.

Reproducer

LATTICE="open chain lattice"
MODEL="boson Hubbard"
L=4
Nmax=3
t=0.3
U=1
mu=0.5
T=0.5
NONLOCAL=0
THERMALIZATION=100000
SWEEPS=20000000
{SEED=101;}
{SEED=202;}

worm parm.in.xml, then read Energy Density and Density from the result
files.

Observed and expected

The 256-dimensional Hamiltonian (four sites, up to three bosons each) can be
diagonalised exactly; the grand-canonical averages at T = 0.5 are
E/L = -0.585185 and N/L = 1.228896.

code E/L N/L
worm, seed 101 -0.58682(35) 1.23105(38)
worm, seed 202 -0.58728(35) 1.23091(37)
dirloop_sse, same input -0.58563(57) 1.22948(49)
exact -0.585185 1.228896

Both worm seeds are 5-6 sigma off; the SSE
code agrees. The offset is the same for Nmax = 2, 3 and 5 and with
NONLOCAL=1, has the same sign at T = 1 and for L = 3, and is absent for
hard-core bosons (Nmax=1), at t/U = 0.05 and at U/t = 13, so it needs
dynamically relevant double occupancy. It also appears on a two-site chain.

Cause

In src/apps/qmc/worms/WRun.C, create_worm draws a time t1 and inserts a
discontinuity pair; worm_head[0] (the end that subsequently moves) is
always the one at t1, the lower end, and the tail at t1 + tau never moves.
annihilate_worm removes any adjacent head/tail pair, whichever one is the
mobile head, taking the lower one as t1. Configurations with the mobile head
above the tail are reached by moving the head around the time circle but are
never created directly, so creation and annihilation are not inverses in the
labelled configuration space and the stationary distribution of closed
configurations is biased. The matrix elements sqrt(n), sqrt(n+1), the
diagonal weights U n(n-1)/2 - mu n and the energy estimator are consistent in
every move; nothing else was found.

Fix and verification

After creation, swap the roles of the two ends with probability 1/2
(Wormhead::swap_with in WKink.h, seven lines in WRun.C, on the path
shared by NONLOCAL=0 and 1). With the patch:

  • two-site chains (soft-core t = 0.3 and t = 1, Nmax = 2 at U = 0,
    hard-core): all within 1 sigma of exact, 4 seeds x 4e6 sweeps each;
  • the four-site reproducer, 8 seeds x 4e7 sweeps: E/L and N/L agree with the
    exact values within 0.2 sigma at error bars of 9e-5.

Observed on master at 0e2f2915d (Release build, GCC, OpenBLAS, HDF5 1.14, single-threaded), compared with independent reference calculations.

Dominant language
C++
Stars
32
Forks
10
Avg merge
4d 6h
Merged PRs (30d)
51

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ALPSim/ALPS

All issues in ALPSim/ALPS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.