diff --git a/.gitignore b/.gitignore index 97e8c171d..13def00ec 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ CMakeCache.txt cmake_install.cmake compile_commands.json +# Lattice files the tutorials tell the reader to generate with build_lattice.py +tutorials/dmrg-*/my_lattice.xml + # Editors and operating systems .idea/ .vscode/ diff --git a/tutorials/dmrg-03-ground-state-energies/my_lattice.xml b/tutorials/dmrg-03-ground-state-energies/my_lattice.xml deleted file mode 100644 index ac8946473..000000000 --- a/tutorials/dmrg-03-ground-state-energies/my_lattice.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 0 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - - - - - - - - - - - - - - - - - diff --git a/tutorials/dmrg-03-ground-state-energies/spin_one b/tutorials/dmrg-03-ground-state-energies/spin_one index d9ee63428..8a33ce0b9 100644 --- a/tutorials/dmrg-03-ground-state-energies/spin_one +++ b/tutorials/dmrg-03-ground-state-energies/spin_one @@ -3,7 +3,7 @@ LATTICE="open chain lattice with special edges" MODEL="spin" local_S0=0.5 local_S1=1 -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" Sz_total=0 J=1 SWEEPS=4 diff --git a/tutorials/dmrg-03-ground-state-energies/spin_one_half b/tutorials/dmrg-03-ground-state-energies/spin_one_half index 157740e81..fd13c85e0 100644 --- a/tutorials/dmrg-03-ground-state-energies/spin_one_half +++ b/tutorials/dmrg-03-ground-state-energies/spin_one_half @@ -1,6 +1,6 @@ LATTICE="open chain lattice" SWEEPS=4 -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" MODEL="spin", Sz_total=0 J=1 NUMBER_EIGENVALUES=1 diff --git a/tutorials/dmrg-03-ground-state-energies/spin_one_half_multiple b/tutorials/dmrg-03-ground-state-energies/spin_one_half_multiple index 3d1c05856..a4360d762 100644 --- a/tutorials/dmrg-03-ground-state-energies/spin_one_half_multiple +++ b/tutorials/dmrg-03-ground-state-energies/spin_one_half_multiple @@ -1,6 +1,6 @@ LATTICE="open chain lattice" SWEEPS=4 -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" MODEL="spin", Sz_total=0 J=1 NUMBER_EIGENVALUES=1 diff --git a/tutorials/dmrg-03-ground-state-energies/spin_one_multiple b/tutorials/dmrg-03-ground-state-energies/spin_one_multiple index 61e4b0be4..c7346150b 100644 --- a/tutorials/dmrg-03-ground-state-energies/spin_one_multiple +++ b/tutorials/dmrg-03-ground-state-energies/spin_one_multiple @@ -3,7 +3,7 @@ LATTICE="open chain lattice with special edges 32" MODEL="spin" local_S0=0.5 local_S1=1 -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" Sz_total=0 J=1 NUMBER_EIGENVALUES=1 diff --git a/tutorials/dmrg-04-gaps/spin_one_gap.py b/tutorials/dmrg-04-gaps/spin_one_gap.py index e55674ce5..fe0fc1a7b 100644 --- a/tutorials/dmrg-04-gaps/spin_one_gap.py +++ b/tutorials/dmrg-04-gaps/spin_one_gap.py @@ -19,7 +19,7 @@ 'LATTICE' : "open chain lattice", 'MODEL' : "spin", 'local_S' : '1', - 'CONSERVED_QUANTUMNUMBERS' : 'Sz', + 'CONSERVED_QUANTUMNUMBERS' : 'N,Sz', 'Sz_total' : 0, 'J' : 1, 'SWEEPS' : 5, diff --git a/tutorials/dmrg-04-gaps/spin_one_gap_multiple.py b/tutorials/dmrg-04-gaps/spin_one_gap_multiple.py index be7dc7bf7..a825c3b3d 100644 --- a/tutorials/dmrg-04-gaps/spin_one_gap_multiple.py +++ b/tutorials/dmrg-04-gaps/spin_one_gap_multiple.py @@ -24,7 +24,7 @@ 'LATTICE' : "open chain lattice", 'MODEL' : "spin", 'local_S' : '1', - 'CONSERVED_QUANTUMNUMBERS' : 'Sz', + 'CONSERVED_QUANTUMNUMBERS' : 'N,Sz', 'Sz_total' : 0, 'J' : 1, 'SWEEPS' : 5, diff --git a/tutorials/dmrg-04-gaps/spin_one_half_gap b/tutorials/dmrg-04-gaps/spin_one_half_gap index 908266465..320f17d3d 100644 --- a/tutorials/dmrg-04-gaps/spin_one_half_gap +++ b/tutorials/dmrg-04-gaps/spin_one_half_gap @@ -1,6 +1,6 @@ LATTICE="open chain lattice" MODEL="spin" -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" Sz_total=0 J=1 SWEEPS=4 diff --git a/tutorials/dmrg-04-gaps/spin_one_half_gap_multiple.py b/tutorials/dmrg-04-gaps/spin_one_half_gap_multiple.py index 1732ae3c9..5246e722f 100644 --- a/tutorials/dmrg-04-gaps/spin_one_half_gap_multiple.py +++ b/tutorials/dmrg-04-gaps/spin_one_half_gap_multiple.py @@ -23,7 +23,7 @@ parms.append({ 'LATTICE' : "open chain lattice", 'MODEL' : "spin", - 'CONSERVED_QUANTUMNUMBERS' : 'Sz', + 'CONSERVED_QUANTUMNUMBERS' : 'N,Sz', 'Sz_total' : 0, 'J' : 1, 'SWEEPS' : 4, diff --git a/tutorials/dmrg-04-gaps/spin_one_half_multiple b/tutorials/dmrg-04-gaps/spin_one_half_multiple index 3d1c05856..a4360d762 100644 --- a/tutorials/dmrg-04-gaps/spin_one_half_multiple +++ b/tutorials/dmrg-04-gaps/spin_one_half_multiple @@ -1,6 +1,6 @@ LATTICE="open chain lattice" SWEEPS=4 -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" MODEL="spin", Sz_total=0 J=1 NUMBER_EIGENVALUES=1 diff --git a/tutorials/dmrg-04-gaps/spin_one_half_triplet b/tutorials/dmrg-04-gaps/spin_one_half_triplet index a39b0801b..f97366fce 100644 --- a/tutorials/dmrg-04-gaps/spin_one_half_triplet +++ b/tutorials/dmrg-04-gaps/spin_one_half_triplet @@ -1,6 +1,6 @@ LATTICE="open chain lattice" MODEL="spin" -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" Sz_total=1 SWEEPS=4 J=1 diff --git a/tutorials/dmrg-05-local-observables/spin_one b/tutorials/dmrg-05-local-observables/spin_one index e76b6f78b..3423ce2ec 100644 --- a/tutorials/dmrg-05-local-observables/spin_one +++ b/tutorials/dmrg-05-local-observables/spin_one @@ -3,7 +3,7 @@ LATTICE="open chain lattice with special edges 32" MODEL="spin" local_S0=0.5 local_S1=1 -CONSERVED_QUANTUMNUMBERS="Sz" +CONSERVED_QUANTUMNUMBERS="N,Sz" J=1 NUMBER_EIGENVALUES=1 SWEEPS=4 diff --git a/tutorials/ed-01-sparsediag/tutorial1a.py b/tutorials/ed-01-sparsediag/tutorial1a.py index e34924f3c..d7773542b 100644 --- a/tutorials/ed-01-sparsediag/tutorial1a.py +++ b/tutorials/ed-01-sparsediag/tutorial1a.py @@ -22,7 +22,7 @@ 'L' : 4, 'CONSERVED_QUANTUMNUMBERS' : 'Sz', 'MEASURE_STRUCTURE_FACTOR[Structure Factor S]' : 'Sz', - 'MEASURE_CORRELATIONS[Diagonal spin correlations]=' : 'Sz', + 'MEASURE_CORRELATIONS[Diagonal spin correlations]' : 'Sz', 'MEASURE_CORRELATIONS[Offdiagonal spin correlations]' : 'Splus:Sminus' }] diff --git a/tutorials/ed-02-gaps/parm2a b/tutorials/ed-02-gaps/parm2a index 3a452010e..0de553ce5 100644 --- a/tutorials/ed-02-gaps/parm2a +++ b/tutorials/ed-02-gaps/parm2a @@ -8,8 +8,12 @@ Sz_total=0 {L=6} {L=8} {L=10} +{L=12} +{L=14} Sz_total=1 {L=4} {L=6} {L=8} {L=10} +{L=12} +{L=14} diff --git a/tutorials/ed-02-gaps/parm2b b/tutorials/ed-02-gaps/parm2b index fd4c704f6..035673c04 100644 --- a/tutorials/ed-02-gaps/parm2b +++ b/tutorials/ed-02-gaps/parm2b @@ -8,8 +8,12 @@ Sz_total=0 {L=6} {L=8} {L=10} +{L=12} +{L=14} Sz_total=1 {L=4} {L=6} {L=8} {L=10} +{L=12} +{L=14} diff --git a/tutorials/ed-05-nnn-chain/parm_nnn-heisenberg b/tutorials/ed-05-nnn-chain/parm_nnn-heisenberg index be70ce27d..f65271bcf 100644 --- a/tutorials/ed-05-nnn-chain/parm_nnn-heisenberg +++ b/tutorials/ed-05-nnn-chain/parm_nnn-heisenberg @@ -1,4 +1,4 @@ -LATTICE = "chain lattice" +LATTICE = "nnn chain lattice" MODEL = "spin" local_S = 0.5 J = 1 diff --git a/tutorials/ed-05-nnn-chain/parm_nnn-pt b/tutorials/ed-05-nnn-chain/parm_nnn-pt index 6ae8fe9d6..7414c4bd5 100644 --- a/tutorials/ed-05-nnn-chain/parm_nnn-pt +++ b/tutorials/ed-05-nnn-chain/parm_nnn-pt @@ -1,4 +1,4 @@ -LATTICE = "chain lattice" +LATTICE = "nnn chain lattice" MODEL = "spin" local_S = 0.5 J = 1 diff --git a/tutorials/mc-02-susceptibilities/parm2a b/tutorials/mc-02-susceptibilities/parm2a index f1036e490..9bfec4767 100644 --- a/tutorials/mc-02-susceptibilities/parm2a +++ b/tutorials/mc-02-susceptibilities/parm2a @@ -1,8 +1,8 @@ LATTICE="chain lattice" L=60 J=-1 -THERMALIZATION=15000 -SWEEPS=150000 +THERMALIZATION=10000 +SWEEPS=500000 UPDATE="cluster" MODEL="Heisenberg" {T=0.05;} @@ -13,7 +13,6 @@ MODEL="Heisenberg" {T=0.5;} {T=0.6;} {T=0.7;} -SWEEPS=500000 {T=0.8;} {T=0.9;} {T=1.0;} diff --git a/tutorials/mc-02-susceptibilities/parm2b b/tutorials/mc-02-susceptibilities/parm2b index 1a40be048..8c473730d 100644 --- a/tutorials/mc-02-susceptibilities/parm2b +++ b/tutorials/mc-02-susceptibilities/parm2b @@ -2,8 +2,8 @@ LATTICE="ladder" L=60 J0=-1 J1=-1 -THERMALIZATION=15000 -SWEEPS=150000 +THERMALIZATION=10000 +SWEEPS=500000 UPDATE="cluster" MODEL="Heisenberg" {T=0.05;} @@ -13,7 +13,6 @@ MODEL="Heisenberg" {T=0.4;} {T=0.5;} {T=0.6;} -SWEEPS=500000 {T=0.7;} {T=0.8;} {T=0.9;} diff --git a/tutorials/mc-03-magnetization/parm3a b/tutorials/mc-03-magnetization/parm3a index aecb8c6ff..2b41cce1b 100644 --- a/tutorials/mc-03-magnetization/parm3a +++ b/tutorials/mc-03-magnetization/parm3a @@ -17,7 +17,6 @@ SWEEPS=10000 {h=0.8;} {h=0.9;} {h=1.0;} -SWEEPS=10000; {h=1.2;} {h=1.4;} {h=1.6;} diff --git a/tutorials/mc-03-magnetization/parm3b b/tutorials/mc-03-magnetization/parm3b index 642868d7c..4e0ab0f03 100644 --- a/tutorials/mc-03-magnetization/parm3b +++ b/tutorials/mc-03-magnetization/parm3b @@ -17,7 +17,6 @@ SWEEPS=10000 {h=0.8;} {h=1.0;} {h=1.25;} -SWEEPS=5000 {h=1.5;} {h=1.75;} {h=2.0;} diff --git a/tutorials/mc-04-measurements/parm4 b/tutorials/mc-04-measurements/parm4 index eaa02b1f1..555c17132 100644 --- a/tutorials/mc-04-measurements/parm4 +++ b/tutorials/mc-04-measurements/parm4 @@ -1,6 +1,6 @@ MODEL="spin"; LATTICE="square lattice"; -REPRESENTATION="SSE"; +local_S=1/2; MEASURE[Correlations]=true; MEASURE[Structure Factor]=true; MEASURE[Green Function]=true; @@ -8,6 +8,5 @@ THERMALIZATION=10000; SWEEPS=500000; J=1; L=4; -W=4; T=0.3; {h=0.1;} diff --git a/tutorials/mc-06-qwl/parm6a b/tutorials/mc-06-qwl/parm6a index 142654e85..15b0d445e 100644 --- a/tutorials/mc-06-qwl/parm6a +++ b/tutorials/mc-06-qwl/parm6a @@ -2,9 +2,6 @@ LATTICE="chain lattice" MODEL="spin" local_S=1/2 L=40 -T_MIN = 0.1 -T_MAX = 10.0 -DELTA_T = 0.1 -CUTOFF = 500 +CUTOFF = 1000 {J = -1} diff --git a/tutorials/mc-06-qwl/parm6d b/tutorials/mc-06-qwl/parm6d index c7a565258..ce6976f00 100644 --- a/tutorials/mc-06-qwl/parm6d +++ b/tutorials/mc-06-qwl/parm6d @@ -1,11 +1,7 @@ LATTICE="simple cubic lattice" MODEL="spin" local_S=1/2 -T=0.946 J=1 -T_MIN = 0.5 -T_MAX = 5.0 -DELTA_T = 0.05 -CUTOFF = 1000 -{L = 6} +{L = 4; CUTOFF = 500} +{L = 6; CUTOFF = 1000} diff --git a/tutorials/mc-07-phase-transition/parm7a b/tutorials/mc-07-phase-transition/parm7a index e762527ea..8bff9470b 100644 --- a/tutorials/mc-07-phase-transition/parm7a +++ b/tutorials/mc-07-phase-transition/parm7a @@ -67,9 +67,9 @@ SWEEPS=400000 { T=3.0; } { T=2.9; } { T=2.8; } +{ T=2.7; } SWEEPS=40000 -{ T=2.7; } { T=2.6; } { T=2.5; } { T=2.4; } diff --git a/tutorials/mc-07-phase-transition/parm7b b/tutorials/mc-07-phase-transition/parm7b index 400debf6d..625bb0bba 100644 --- a/tutorials/mc-07-phase-transition/parm7b +++ b/tutorials/mc-07-phase-transition/parm7b @@ -2,12 +2,11 @@ LATTICE="square lattice" T=2.269186 J=1 THERMALIZATION=5000 -SWEEPS=60000 +SWEEPS=150000 UPDATE="cluster" MODEL="Ising" L=32 -SWEEPS=120000 {T=2.24;} {T=2.25;} {T=2.26;} @@ -22,9 +21,6 @@ SWEEPS=120000 {T=2.35;} L=48 -SWEEPS=200000 - - {T=2.24;} {T=2.25;} {T=2.26;} @@ -35,11 +31,10 @@ SWEEPS=200000 {T=2.31;} {T=2.32;} {T=2.33;} - +{T=2.34;} +{T=2.35;} L=64 -SWEEPS=200000 - {T=2.24;} {T=2.25;} {T=2.26;} @@ -50,9 +45,5 @@ SWEEPS=200000 {T=2.31;} {T=2.32;} {T=2.33;} - - - - - - +{T=2.34;} +{T=2.35;} diff --git a/tutorials/mc-08-quantum-phase-transition/tutorial8b.py b/tutorials/mc-08-quantum-phase-transition/tutorial8b.py index 02601d330..3dfd8c47d 100644 --- a/tutorials/mc-08-quantum-phase-transition/tutorial8b.py +++ b/tutorials/mc-08-quantum-phase-transition/tutorial8b.py @@ -34,7 +34,7 @@ 'SWEEPS' : 50000, 'MODEL' : "spin", 'L' : l, - 'W' : l/2 + 'W' : l//2 } ) diff --git a/tutorials/mc-08-quantum-phase-transition/tutorial8c.py b/tutorials/mc-08-quantum-phase-transition/tutorial8c.py index ad0ba549d..cea791410 100644 --- a/tutorials/mc-08-quantum-phase-transition/tutorial8c.py +++ b/tutorials/mc-08-quantum-phase-transition/tutorial8c.py @@ -34,7 +34,7 @@ 'SWEEPS' : 50000, 'MODEL' : "spin", 'L' : l, - 'W' : l/2 + 'W' : l//2 } ) diff --git a/tutorials/mc-08-quantum-phase-transition/tutorial8d.py b/tutorials/mc-08-quantum-phase-transition/tutorial8d.py index 53374e063..51ddcec97 100644 --- a/tutorials/mc-08-quantum-phase-transition/tutorial8d.py +++ b/tutorials/mc-08-quantum-phase-transition/tutorial8d.py @@ -18,26 +18,31 @@ #prepare the input parameters parms = [] -for l in [8,10,12,16]: - for j2 in [1.8,1.85,1.9,1.95,2.,2.05,2.1]: +for l in [16,32,64,128]: + # the two largest sizes only scan the immediate neighbourhood of the crossing + if l <= 32: + j2list = [0.31,0.311,0.312,0.313,0.314,0.315,0.316,0.317,0.318,0.319,0.32] + else: + j2list = [0.312,0.313,0.314,0.315,0.316] + for j2 in j2list: parms.append( - { - 'LATTICE' : "coupled ladders", + { + 'LATTICE' : "coupled ladders", 'local_S' : 0.5, 'ALGORITHM' : 'loop', 'SEED' : 0, - 'BETA' : l, + 'BETA' : 2*l, 'J0' : 1 , 'J1' : 1, 'J2' : j2, 'THERMALIZATION' : 5000, - 'SWEEPS' : 50000, + 'SWEEPS' : 50000, 'MODEL' : "spin", 'L' : l, - 'W' : l/2 + 'W' : l//2 } ) - + #write the input file and run the simulation input_file = pyalps.writeInputFiles('parm8d',parms) pyalps.runApplication('loop',input_file) diff --git a/tutorials/notebook/en/DMRG-02_Gaps.ipynb b/tutorials/notebook/en/DMRG-02_Gaps.ipynb index 5f9b2d4ff..5e268e3c0 100644 --- a/tutorials/notebook/en/DMRG-02_Gaps.ipynb +++ b/tutorials/notebook/en/DMRG-02_Gaps.ipynb @@ -305,8 +305,7 @@ " 'SWEEPS' : 4,\n", " 'NUMBER_EIGENVALUES' : 1,\n", " 'L' : 32,\n", - " 'MAXSTATES' : 40,\n", - " 'NUMBER_EIGENVALUES' : 1\n", + " 'MAXSTATES' : 40\n", " } )\n", "\n", "input_file = pyalps.writeInputFiles('parm_spin_one_half_triplet',parms)\n", diff --git a/tutorials/notebook/en/DMRG-04_Correlations.ipynb b/tutorials/notebook/en/DMRG-04_Correlations.ipynb index 1c5b29c4f..282336d33 100644 --- a/tutorials/notebook/en/DMRG-04_Correlations.ipynb +++ b/tutorials/notebook/en/DMRG-04_Correlations.ipynb @@ -368,7 +368,7 @@ " 'CONSERVED_QUANTUMNUMBERS' : 'N,Sz',\n", " 'Sz_total' : 0,\n", " 'J' : 1,\n", - " 'SWEEPS' : 4,\n", + " 'SWEEPS' : 6,\n", " 'NUMBER_EIGENVALUES' : 1,\n", " 'MAXSTATES' : D,\n", " 'MEASURE_AVERAGE[Magnetization]' : 'Sz',\n",