Skip to content

Commit 2b8403d

Browse files
lkdvosogauthe
andauthored
Fix charge convention in Fermi-Hubbard example (#217)
* Fix charge convention * Rerun examples --- Co-authored-by: Olivier Gauthe <olivier.gauthe.2011+github@polytechnique.org>
1 parent 9aca427 commit 2b8403d

File tree

22 files changed

+868
-880
lines changed

22 files changed

+868
-880
lines changed

docs/src/examples/2d_ising_partition_function/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Z = InfinitePartitionFunction(O)
9191
````
9292

9393
````
94-
InfinitePartitionFunction{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 2, Vector{ComplexF64}}[TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):
94+
InfinitePartitionFunction{TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}}(TensorMap{ComplexF64, ComplexSpace, 2, 2, Vector{ComplexF64}}[TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):
9595
[:, :, 1, 1] =
9696
3.169519816780443 + 0.0im 0.4999999999999995 + 0.0im
9797
0.4999999999999995 + 0.0im 0.1505971059561009 + 0.0im
@@ -123,8 +123,8 @@ env, = leading_boundary(env₀, Z; tol=1e-8, maxiter=500);
123123
````
124124

125125
````
126-
[ Info: CTMRG init: obj = +1.767587313024e+00 -1.536527975696e+00im err = 1.0000e+00
127-
[ Info: CTMRG conv 62: obj = +3.353928644031e+00 err = 4.7636155793e-09 time = 10.20 sec
126+
[ Info: CTMRG init: obj = +1.784252138312e+00 -1.557258880375e+00im err = 1.0000e+00
127+
[ Info: CTMRG conv 63: obj = +3.353928644031e+00 err = 4.6005361791e-09 time = 3.52 sec
128128
129129
````
130130

@@ -138,7 +138,7 @@ space.(env.edges)
138138
````
139139

140140
````
141-
4×1×1 Array{TensorKit.TensorMapSpace{TensorKit.ComplexSpace, 2, 1}, 3}:
141+
4×1×1 Array{TensorMapSpace{ComplexSpace, 2, 1}, 3}:
142142
[:, :, 1] =
143143
(ℂ^20 ⊗ ℂ^2) ← ℂ^20
144144
(ℂ^20 ⊗ ℂ^2) ← ℂ^20
@@ -159,9 +159,9 @@ e = expectation_value(Z, (1, 1) => E, env)
159159
````
160160

161161
````
162-
λ = 3.3539286440313765 - 3.486341495761219e-16im
163-
m = 0.9736086674403004 + 7.16942808669034e-17im
164-
e = -1.8637796145082448 + 0.0im
162+
λ = 3.353928644031376 - 1.11587056863837e-15im
163+
m = 0.9736086674403005 - 1.8262801879417628e-17im
164+
e = -1.8637796145082448 + 7.305120751767051e-17im
165165
166166
````
167167

@@ -205,9 +205,9 @@ extrapolation):
205205
````
206206

207207
````
208-
(-(log(λ)) / beta - f_exact) / f_exact = -1.1009271732942546e-15 - 8.58980335690302e-17im
209-
(abs(m) - abs(m_exact)) / abs(m_exact) = -1.1403175236145204e-16
210-
(e - e_exact) / e_exact = -0.02373206809908996 - 0.0im
208+
(-(log(λ)) / beta - f_exact) / f_exact = -1.3211126079531055e-15 - 2.749331575238102e-16im
209+
(abs(m) - abs(m_exact)) / abs(m_exact) = 0.0
210+
(e - e_exact) / e_exact = -0.02373206809908996 - 3.82650130578649e-17im
211211
212212
````
213213

docs/src/examples/2d_ising_partition_function/main.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@
260260
"file_extension": ".jl",
261261
"mimetype": "application/julia",
262262
"name": "julia",
263-
"version": "1.10.4"
263+
"version": "1.11.5"
264264
},
265265
"kernelspec": {
266-
"name": "julia-1.10",
267-
"display_name": "Julia 1.10.4",
266+
"name": "julia-1.11",
267+
"display_name": "Julia 1.11.5",
268268
"language": "julia"
269269
}
270270
},

docs/src/examples/3d_ising_partition_function/index.md

Lines changed: 81 additions & 83 deletions
Large diffs are not rendered by default.

docs/src/examples/3d_ising_partition_function/main.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,11 @@
395395
"file_extension": ".jl",
396396
"mimetype": "application/julia",
397397
"name": "julia",
398-
"version": "1.10.4"
398+
"version": "1.11.5"
399399
},
400400
"kernelspec": {
401-
"name": "julia-1.10",
402-
"display_name": "Julia 1.10.4",
401+
"name": "julia-1.11",
402+
"display_name": "Julia 1.11.5",
403403
"language": "julia"
404404
}
405405
},

docs/src/examples/bose_hubbard/index.md

Lines changed: 158 additions & 164 deletions
Large diffs are not rendered by default.

docs/src/examples/bose_hubbard/main.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@
247247
"file_extension": ".jl",
248248
"mimetype": "application/julia",
249249
"name": "julia",
250-
"version": "1.11.4"
250+
"version": "1.11.5"
251251
},
252252
"kernelspec": {
253253
"name": "julia-1.11",
254-
"display_name": "Julia 1.11.4",
254+
"display_name": "Julia 1.11.5",
255255
"language": "julia"
256256
}
257257
},

docs/src/examples/boundary_mps/index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ peps₀ = InfinitePEPS(rand, ComplexF64, ComplexSpace(2), ComplexSpace(2))
4141
````
4242

4343
````
44-
InfinitePEPS{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')):
44+
InfinitePEPS{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}(TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}[TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')):
4545
[:, :, 1, 1, 1] =
4646
0.8343040072662887 + 0.15425705836788395im 0.4612746978522435 + 0.7411151918989216im
4747
0.6640771294125087 + 0.4428356798799721im 0.9163597170532635 + 0.24145695415210522im
@@ -99,7 +99,7 @@ T = InfiniteTransferPEPS(peps₀, dir, row)
9999
````
100100

101101
````
102-
single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}}}:
102+
single site MPSKit.InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}}}:
103103
╷ ⋮
104104
┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')))
105105
╵ ⋮
@@ -137,7 +137,7 @@ mps, env, ϵ = leading_boundary(mps₀, T, VUMPS(; tol=1e-6, verbosity=2));
137137

138138
````
139139
[ Info: VUMPS init: obj = +5.052950412844e+00 +1.493192627823e-02im err = 8.4684e-01
140-
[ Info: VUMPS conv 4: obj = +1.744071150138e+01 +2.417441557995e-08im err = 1.9047772246e-07 time = 3.69 sec
140+
[ Info: VUMPS conv 4: obj = +1.744071149764e+01 +2.162482215518e-08im err = 2.0274771864e-07 time = 2.78 sec
141141
142142
````
143143

@@ -149,7 +149,7 @@ norm_vumps = abs(prod(expectation_value(mps, T)))
149149
````
150150

151151
````
152-
17.440711501378814
152+
17.440711497641615
153153
````
154154

155155
This can be compared to the result obtained using CTMRG, where we see that the results match:
@@ -164,8 +164,8 @@ norm_ctmrg = abs(norm(peps₀, env_ctmrg))
164164

165165
````
166166
[ Info: CTMRG init: obj = -5.556349490423e-01 +1.605938670370e+00im err = 1.0000e+00
167-
[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2056303631e-07 time = 4.37 sec
168-
abs(norm_vumps - norm_ctmrg) / norm_vumps = 5.510362083182129e-10
167+
[ Info: CTMRG conv 37: obj = +1.744071151099e+01 err = 3.2013507863e-07 time = 0.15 sec
168+
abs(norm_vumps - norm_ctmrg) / norm_vumps = 7.653157885484634e-10
169169
170170
````
171171

@@ -206,10 +206,10 @@ norm_2x2_ctmrg = abs(norm(peps₀_2x2, env_ctmrg_2x2))
206206

207207
````
208208
[ Info: VUMPS init: obj = +6.668046237341e+02 -1.267878277078e+01im err = 8.7901e-01
209-
[ Info: VUMPS conv 69: obj = +9.723958968917e+04 -3.481605377714e-03im err = 6.3841720875e-07 time = 4.12 sec
209+
[ Info: VUMPS conv 101: obj = +9.723958853252e+04 +1.933478098677e-03im err = 4.1930714637e-07 time = 2.92 sec
210210
[ Info: CTMRG init: obj = +1.074898090007e+03 -2.096255594496e+02im err = 1.0000e+00
211-
[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0518230963e-07 time = 1.54 sec
212-
abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 4.08201516090106e-9
211+
[ Info: CTMRG conv 41: obj = +9.723959008610e+04 err = 6.0876980113e-07 time = 0.37 sec
212+
abs(norm_2x2_vumps - norm_2x2_ctmrg) / norm_2x2_vumps = 1.5976813021479506e-8
213213
214214
````
215215

@@ -252,7 +252,7 @@ transfer_pepo = InfiniteTransferPEPO(peps₀, pepo, 1, 1)
252252
````
253253

254254
````
255-
single site MPSKit.InfiniteMPO{Tuple{TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorKit.TensorMap{ComplexF64, TensorKit.ComplexSpace, 2, 4, Vector{ComplexF64}}}}:
255+
single site MPSKit.InfiniteMPO{Tuple{TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 1, 4, Vector{ComplexF64}}, TensorMap{ComplexF64, ComplexSpace, 2, 4, Vector{ComplexF64}}}}:
256256
╷ ⋮
257257
┼ O[1]: (TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap(ℂ^2 ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')), TensorMap((ℂ^2 ⊗ (ℂ^2)') ← (ℂ^2 ⊗ ℂ^2 ⊗ (ℂ^2)' ⊗ (ℂ^2)')))
258258
╵ ⋮
@@ -269,9 +269,9 @@ norm_pepo = abs(prod(expectation_value(mps_pepo, transfer_pepo)));
269269
````
270270

271271
````
272-
[ Info: VUMPS init: obj = +3.309203535702e+01 -4.227375981212e-01im err = 9.3280e-01
273-
[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.387851822319e-07im err = 5.0174146749e-08 time = 2.69 sec
274-
norm_pepo = 248.36962586428106
272+
[ Info: VUMPS init: obj = +3.309203535702e+01 -4.227375981213e-01im err = 9.3280e-01
273+
[ Info: VUMPS conv 5: obj = +2.483696258643e+02 +2.405967620689e-07im err = 5.0410779189e-08 time = 2.32 sec
274+
norm_pepo = 248.36962586426355
275275
276276
````
277277

docs/src/examples/boundary_mps/main.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,11 @@
337337
"file_extension": ".jl",
338338
"mimetype": "application/julia",
339339
"name": "julia",
340-
"version": "1.11.4"
340+
"version": "1.11.5"
341341
},
342342
"kernelspec": {
343343
"name": "julia-1.11",
344-
"display_name": "Julia 1.11.4",
344+
"display_name": "Julia 1.11.5",
345345
"language": "julia"
346346
}
347347
},

0 commit comments

Comments
 (0)