README: concise version with physical quantities, repo name phi4-generative

#1
Files changed (1) hide show
  1. README.md +54 -105
README.md CHANGED
@@ -11,144 +11,93 @@ size_categories:
11
  - 10K<n<100K
12
  ---
13
 
14
- # φ⁴ lattice field configurations near the critical point
15
 
16
- Monte Carlo configurations of the scalar φ⁴ theory on periodic lattices close to the
17
- critical point, as plain NumPy `.npy` arrays.
18
-
19
- | | κ | λ | L | configurations per L | size |
20
- |---|---|---|---|---|---|
21
- | 2D | 0.2705 | 0.022 | 16, 32, 64, 128 | 10240 | 1.8 GB |
22
- | 3D | 0.1923 | 0.9 | 16, 32, 64, 128 | 2560 | 49 GB |
23
-
24
- ## Physics
25
-
26
- Lattice action in hopping-parameter form
27
 
28
  $$S[\phi] = \sum_x \Big[-2\kappa \sum_{\mu=1}^{D} \phi_x \phi_{x+\hat\mu} + (1-2\lambda)\phi_x^2 + \lambda\phi_x^4\Big]$$
29
 
30
- on an L^D lattice with periodic boundary conditions and Boltzmann weight exp(−S).
31
-
32
- In 2D the quartic coupling is λ = 0.022 and the hopping parameter κ = 0.2705. For
33
- this λ the critical point is κ_c ≈ 0.27088 (Binder-cumulant estimate at L = 128,
34
- where U₄ reaches the 2D Ising value 0.6106), so κ = 0.2705 lies slightly on the
35
- symmetric side of κ_c and U₄ decreases with L.
36
-
37
- In 3D the couplings are λ = 0.9 and κ = 0.1923. The critical point for this λ is
38
- κ_c ≈ 0.19225 (Binder-cumulant crossing at L = 64), so κ = 0.1923 lies very slightly
39
- on the ordered side of κ_c and U₄ grows with L. At L = 16 and 32 it is within errors
40
- of the 3D Ising value 0.465.
41
 
42
- Both sets are therefore near-critical rather than exactly critical. The Binder
43
- cumulants in the tables below show how far each L is from the fixed point.
44
 
45
  ## Files
46
 
47
  ```
48
- README.md
49
- 2D/phi4_2D_L16_kappa0.2705_lambda0.022.npy shape (10240, 16, 16) 21 MB
50
- 2D/phi4_2D_L32_kappa0.2705_lambda0.022.npy shape (10240, 32, 32) 84 MB
51
- 2D/phi4_2D_L64_kappa0.2705_lambda0.022.npy shape (10240, 64, 64) 336 MB
52
- 2D/phi4_2D_L128_kappa0.2705_lambda0.022.npy shape (10240, 128, 128) 1342 MB
53
- 3D/phi4_3D_L16_kappa0.1923_lambda0.9.npy shape (2560, 16, 16, 16) 84 MB
54
- 3D/phi4_3D_L32_kappa0.1923_lambda0.9.npy shape (2560, 32, 32, 32) 671 MB
55
- 3D/phi4_3D_L64_kappa0.1923_lambda0.9.npy shape (2560, 64, 64, 64) 5369 MB
56
- 3D/phi4_3D_L128_kappa0.1923_lambda0.9.npy shape (2560, 128, 128, 128) 42950 MB
57
  ```
58
 
59
- Every array is float64 with shape (n_cfg, L, …, L). Axis 0 is the Markov-chain order
60
- of the sampler. The remaining axes are the lattice directions, all periodic. The
61
- values are the raw field φ_x with no normalisation applied.
62
-
63
- The configurations were generated by Monte Carlo sampling with Wolff cluster updates
64
- combined with Fourier-accelerated HMC. Each chain started from a random field and ran
65
- 2000 warm-up iterations before production. In 2D every fifth production iteration was
66
- stored, in 3D every tenth. The 3D L = 128 file holds ten independent chains of 256
67
- configurations each, concatenated along axis 0 (entries 0 to 255 are chain 1, 256 to
68
- 511 chain 2, and so on). All other files are single chains.
69
 
70
  ## Download
71
 
72
- Install the Hugging Face Hub client and fetch the whole dataset or a part of it. The
73
- 3D L = 128 file alone is 43 GB, so pick what you need.
74
-
75
  ```bash
76
  pip install -U huggingface_hub
77
 
78
- # everything (51 GB) into ./phi4-critical-configs
79
- hf download YangyangTan/phi4-critical-configs --repo-type dataset --local-dir phi4-critical-configs
80
 
81
- # 2D only (1.8 GB)
82
- hf download YangyangTan/phi4-critical-configs --repo-type dataset --local-dir phi4-critical-configs --include "2D/*"
83
 
84
- # one lattice size only
85
- hf download YangyangTan/phi4-critical-configs --repo-type dataset --local-dir phi4-critical-configs --include "3D/*L64*"
86
  ```
87
 
88
- With huggingface_hub older than 1.0 the command is `huggingface-cli download` with
89
- the same arguments. The same from Python
90
-
91
  ```python
92
- from huggingface_hub import snapshot_download, hf_hub_download
93
-
94
- # 2D only
95
- path = snapshot_download("YangyangTan/phi4-critical-configs", repo_type="dataset",
96
- local_dir="phi4-critical-configs", allow_patterns=["2D/*"])
97
 
98
- # one file, returns its local path
99
- f = hf_hub_download("YangyangTan/phi4-critical-configs",
100
  "3D/phi4_3D_L32_kappa0.1923_lambda0.9.npy", repo_type="dataset")
 
 
101
  ```
102
 
103
- If the dataset is private you must be logged in to an account that can see it. Run
104
- `hf auth login` once with a read token, or pass `token="hf_..."` to the Python calls.
105
 
106
- ## Usage
107
 
108
- ```python
109
- import numpy as np
110
-
111
- phi = np.load("phi4-critical-configs/2D/phi4_2D_L32_kappa0.2705_lambda0.022.npy") # (10240, 32, 32)
112
- M = phi.mean(axis=(1, 2)) # magnetisation per configuration
113
-
114
- phi3 = np.load("phi4-critical-configs/3D/phi4_3D_L64_kappa0.1923_lambda0.9.npy", mmap_mode="r") # (2560, 64, 64, 64)
115
- ```
116
 
117
- `np.load(path, mmap_mode="r")` reads the large files lazily.
118
-
119
- ## Observables
120
-
121
- Computed from the files as stored, with M = L⁻ᴰ Σ_x φ_x,
122
- χ = Lᴰ (⟨M²⟩ − ⟨|M|⟩²) and U₄ = 1 − ⟨M⁴⟩ / (3⟨M²⟩²). Errors are jackknife over 64
123
- blocks of consecutive configurations. τ_int is the integrated autocorrelation time
124
- along axis 0 in units of stored configurations (Sokal window), measured for |M| and
125
- for the action S. A value of 0.5 means consecutive configurations are uncorrelated.
126
 
127
  2D, κ = 0.2705, λ = 0.022
128
 
129
- | L | ⟨\|M\|⟩ | χ | U₄ | τ_int(\|M\|) | τ_int(S) |
130
- |---|---|---|---|---|---|
131
- | 16 | 0.8149(26) | 23.0(3) | 0.5524(18) | 0.53 | 0.56 |
132
- | 32 | 0.7147(25) | 64.3(8) | 0.5672(16) | 0.58 | 0.60 |
133
- | 64 | 0.6019(26) | 212(3) | 0.5551(20) | 0.64 | 0.66 |
134
- | 128 | 0.4447(23) | 772(7) | 0.4815(27) | 0.69 | 0.79 |
135
 
136
  3D, κ = 0.1923, λ = 0.9
137
 
138
- | L | ⟨\|M\|⟩ | χ | U₄ | τ_int(\|M\|) | τ_int(S) |
139
- |---|---|---|---|---|---|
140
- | 16 | 0.2119(24) | 43.4(9) | 0.468(7) | 0.60 | 0.55 |
141
- | 32 | 0.1497(14) | 172(4) | 0.472(6) | 0.53 | 0.54 |
142
- | 64 | 0.1125(12) | 641(15) | 0.503(5) | 0.78 | 0.88 |
143
- | 128 | 0.0973(9) | 2372(73) | 0.566(4) | 0.74 | 0.74 |
144
-
145
- The stored configurations are close to statistically independent in every file. The
146
- largest value, τ_int = 0.88 for S in 3D at L = 64, corresponds to an effective
147
- sample size of about 2560 / (2 τ_int) ≈ 1450.
148
-
149
- ## Related
150
 
151
- An earlier, independent set of 2D κ = 0.2705 chains (not thinned, so neighbouring
152
- configurations are correlated at L = 128), together with κ = 0.26 and κ = 0.28 and
153
- L = 8, is available in `.npz` form at
154
- https://huggingface.co/datasets/phi4-generative/2d-phi4-configs.
 
11
  - 10K<n<100K
12
  ---
13
 
14
+ # φ⁴ lattice configurations near the critical point
15
 
16
+ Monte Carlo configurations of the scalar φ⁴ theory on periodic lattices of volume V = L^D with action
 
 
 
 
 
 
 
 
 
 
17
 
18
  $$S[\phi] = \sum_x \Big[-2\kappa \sum_{\mu=1}^{D} \phi_x \phi_{x+\hat\mu} + (1-2\lambda)\phi_x^2 + \lambda\phi_x^4\Big]$$
19
 
20
+ | D | κ | λ | κ_c | L | configurations per L | total size |
21
+ |---|---|---|---|---|---|---|
22
+ | 2 | 0.2705 | 0.022 | 0.27088 | 16, 32, 64, 128 | 10240 | 1.8 GB |
23
+ | 3 | 0.1923 | 0.9 | 0.19225 | 16, 32, 64, 128 | 2560 | 49 GB |
 
 
 
 
 
 
 
24
 
25
+ κ_c is the critical point estimated from the Binder cumulant.
 
26
 
27
  ## Files
28
 
29
  ```
30
+ 2D/phi4_2D_L16_kappa0.2705_lambda0.022.npy (10240, 16, 16) 21 MB
31
+ 2D/phi4_2D_L32_kappa0.2705_lambda0.022.npy (10240, 32, 32) 84 MB
32
+ 2D/phi4_2D_L64_kappa0.2705_lambda0.022.npy (10240, 64, 64) 336 MB
33
+ 2D/phi4_2D_L128_kappa0.2705_lambda0.022.npy (10240, 128, 128) 1342 MB
34
+ 3D/phi4_3D_L16_kappa0.1923_lambda0.9.npy (2560, 16, 16, 16) 84 MB
35
+ 3D/phi4_3D_L32_kappa0.1923_lambda0.9.npy (2560, 32, 32, 32) 671 MB
36
+ 3D/phi4_3D_L64_kappa0.1923_lambda0.9.npy (2560, 64, 64, 64) 5369 MB
37
+ 3D/phi4_3D_L128_kappa0.1923_lambda0.9.npy (2560, 128, 128, 128) 42950 MB
 
38
  ```
39
 
40
+ Each array holds the float64 field values φ_x. Axis 0 runs over configurations in
41
+ Monte Carlo order and the remaining axes are the periodic lattice directions. The
42
+ configurations were generated with Wolff cluster updates combined with
43
+ Fourier-accelerated HMC. The 3D L = 128 file consists of ten independent chains of
44
+ 256 configurations, concatenated along axis 0.
 
 
 
 
 
45
 
46
  ## Download
47
 
 
 
 
48
  ```bash
49
  pip install -U huggingface_hub
50
 
51
+ # everything, 51 GB
52
+ hf download phi4-generative/phi4-critical-configs --repo-type dataset --local-dir phi4-critical-configs
53
 
54
+ # 2D only, 1.8 GB
55
+ hf download phi4-generative/phi4-critical-configs --repo-type dataset --local-dir phi4-critical-configs --include "2D/*"
56
 
57
+ # a single file
58
+ hf download phi4-generative/phi4-critical-configs --repo-type dataset --local-dir phi4-critical-configs --include "3D/*L64*"
59
  ```
60
 
 
 
 
61
  ```python
62
+ import numpy as np
63
+ from huggingface_hub import hf_hub_download
 
 
 
64
 
65
+ f = hf_hub_download("phi4-generative/phi4-critical-configs",
 
66
  "3D/phi4_3D_L32_kappa0.1923_lambda0.9.npy", repo_type="dataset")
67
+ phi = np.load(f, mmap_mode="r") # (2560, 32, 32, 32)
68
+ M = phi.mean(axis=(1, 2, 3)) # magnetisation per configuration
69
  ```
70
 
71
+ ## Physical quantities
 
72
 
73
+ $$M = \frac{1}{V}\sum_x \phi_x, \qquad \chi = V\langle M^2\rangle, \qquad U_4 = 1-\frac{\langle M^4\rangle}{3\langle M^2\rangle^2}, \qquad \xi_2 = \frac{\sqrt{\chi/F-1}}{2\sin(\pi/L)}$$
74
 
75
+ $$F = \frac{1}{V}\Big\langle\Big|\sum_x e^{2\pi i x_\mu/L}\phi_x\Big|^2\Big\rangle$$
 
 
 
 
 
 
 
76
 
77
+ F is the propagator at the smallest nonzero momentum, averaged over the D directions
78
+ μ, and ⟨S⟩/V is the action per site. Errors are jackknife over 64 blocks of
79
+ consecutive configurations. The integrated autocorrelation time of |M| and S is at
80
+ most 0.9 configurations in every file, so the configurations are effectively
81
+ independent.
 
 
 
 
82
 
83
  2D, κ = 0.2705, λ = 0.022
84
 
85
+ | L | ⟨φ²⟩ | ⟨S⟩/V | ⟨\|M\|⟩ | χ | U₄ | ξ₂/L |
86
+ |---|---|---|---|---|---|---|
87
+ | 16 | 1.5215(29) | 0.38758(49) | 0.8149(26) | 192.98(94) | 0.5524(18) | 0.7709(53) |
88
+ | 32 | 1.4698(19) | 0.39297(26) | 0.7147(25) | 587.3(32) | 0.5672(16) | 0.7374(53) |
89
+ | 64 | 1.4400(11) | 0.39619(18) | 0.6019(26) | 1696(11) | 0.5551(20) | 0.6512(55) |
90
+ | 128 | 1.41936(61) | 0.398604(90) | 0.4446(23) | 4011(32) | 0.4815(27) | 0.4797(38) |
91
 
92
  3D, κ = 0.1923, λ = 0.9
93
 
94
+ | L | ⟨φ²⟩ | ⟨S⟩/V | ⟨\|M\|⟩ | χ | U₄ | ξ₂/L |
95
+ |---|---|---|---|---|---|---|
96
+ | 16 | 0.62329(34) | −0.12466(49) | 0.2119(24) | 227.3(42) | 0.4681(65) | 0.6478(99) |
97
+ | 32 | 0.61929(11) | −0.11846(16) | 0.1497(14) | 906(12) | 0.4721(64) | 0.6576(75) |
98
+ | 64 | 0.617963(58) | −0.116385(81) | 0.1125(12) | 3959(68) | 0.5032(48) | 0.7127(97) |
99
+ | 128 | 0.617684(26) | −0.116003(38) | 0.09725(87) | 22205(327) | 0.5658(35) | 0.917(12) |
 
 
 
 
 
 
100
 
101
+ At κ = κ_c and large L, U₄ and ξ₂/L approach the Ising values 0.6107 and 0.9050 in 2D
102
+ (Salas and Sokal, J. Stat. Phys. 98, 551 (2000)) and 0.4655 and 0.6431 in 3D
103
+ (Hasenbusch, Phys. Rev. B 82, 174433 (2010)).