Skip to content

Energy of Bose Hubbard System does not converge to the exact value. #7

@alfagalileo

Description

@alfagalileo

Hi, actually I am trying to reproduce the Saito's paper with NeuralQuantum.jl. However, I am getting energy values that do not match with the values reported in this paper.
Here is the code

`
nsites = 11
nbosons = 9
U = 2.0
J = 1.0
V = (collect(0:10).-5).^2

hilb = HomogeneousFock( nsites, nbosons )
H = LocalOperator( hilb )

for i in 1:nsites
    ni = number( hilb, i)
    ai = destroy( hilb, mod1(i,nsites) )
    adip1 = create( hilb, mod1(i+1,nsites))
    adim1 = create( hilb, mod1(i-1,nsites))
    H +=  V[i]*ni + U/2*(ni*ni - ni)
    H -= J*ai*adip1
    H -= J*ai*adim1
end

ai = LocalOperator( hilb )
for i in 1:nsites
    ai += destroy( hilb, mod1(i,nsites) )
end

net = RBM( Float64, nsites, 1, af_logcosh )

init_random_pars!( net, sigma=0.1 )
sampler = MetropolisSampler( LocalRule(), 1000, nsites, burn=100 )
algo = SR( ϵ = (0.01), algorithm = sr_cg, precision = 1e-3 )

is = BatchedSampler( net, sampler, H, algo; batch_sz=16 )
add_observable!( is, "ai", ai )
optimizer = Optimisers.Descent(0.01)

Evalues = Float64[];
Eerr = Float64[];

for i=1:epochs
    ldata, prec = sample!(is)
    global ob = compute_observables(is)

    push!( Evalues, real(ldata.mean) )
    push!( Eerr, ldata.error )
    grad = precondition!( prec, algo, i )
    Optimisers.update!( optimizer, net, grad )

    @show i, real( ldata.mean )
end

Evalues

`

I would like to know if I am making a mistake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions