Skip to content

Commit

Permalink
my_snapshor
Browse files Browse the repository at this point in the history
  • Loading branch information
sk3004 committed Jun 7, 2024
1 parent f0a6c56 commit 586df8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/BitStringAddresses/bosefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ function hopnextneighbour(b::BoseFS{N,M,A}, chosen) where {N,M,A<:BitString}
end
return BoseFS{N,M,A}(new_address), prod
end
function hopnextneighbour(b::SingleComponentFockAddress, i; pi_twisted = false, HardwallBoundaries= false)
function hopnextneighbour(b::SingleComponentFockAddress, i; pi_twisted::Bool = false, HardwallBoundaries::Bool = false)
src = find_occupied_mode(b, (i + 1) >>> 0x1)
dst = find_mode(b, mod1(src.mode + ifelse(isodd(i), 1, -1), num_modes(b)))
new_b, val = excitation(b, (dst,), (src,))
if pi_twisted
if pi_twisted == true
if src.mode==num_modes(b) && dst.mode !=1
return new_b, val
elseif src.mode == num_modes(b) && dst.mode ==1
Expand All @@ -344,7 +344,7 @@ function hopnextneighbour(b::SingleComponentFockAddress, i; pi_twisted = false,
elseif src.mode !=num_modes(b) && src.mode !=num_modes(b)
return new_b, val
end
elseif HardwallBoundaries
elseif HardwallBoundaries == true
if src.mode==num_modes(b) && dst.mode !=1
return new_b, val
elseif src.mode == num_modes(b) && dst.mode ==1
Expand Down
2 changes: 1 addition & 1 deletion src/Hamiltonians/ExtendedHubbardReal1D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct ExtendedHubbardReal1D{TT,A<:SingleComponentFockAddress,U,V,T,PI_TWISTED,H
end

# addr for compatibility.
function ExtendedHubbardReal1D(addr; u=1.0, v=1.0, t=1.0, pi_twisted=false, HardwallBoundaries=false)
function ExtendedHubbardReal1D(addr; u=1.0, v=1.0, t=1.0, pi_twisted::Bool = false, HardwallBoundaries::Bool = false)
U, V, T , PI_TWISTED, HARDWALLBOUNDARIES= promote(float(u), float(v), float(t), Bool(pi_twisted), Bool(HardwallBoundaries))
return ExtendedHubbardReal1D{typeof(U),typeof(addr),U,V,T,PI_TWISTED,HARDWALLBOUNDARIES}(addr)
end
Expand Down

0 comments on commit 586df8d

Please sign in to comment.