Skip to content

Commit cf31286

Browse files
Add info about approximations in phi4 docstrings (#165)
* add information about the approximations in phi4real docstring * bump * add phi4_complex
1 parent d39c2ab commit cf31286

3 files changed

Lines changed: 26 additions & 6 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "TNRKit"
22
uuid = "7dfc3ef0-df9b-475f-b8e2-b91f34f5d84d"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
authors = ["Victor Vanthilt, Adwait Naravane, Atsushi Ueda and contributors"]
55

66
[deps]

src/models/phi4_complex.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,23 @@ Compatible with no symmetry, explicit ℤ₂×ℤ₂ symmetry or explicit U(1) s
156156
Defaults to U(1) symmetry if the symmetry type is not provided.
157157
158158
### Arguments
159-
- `K::Integer`: Number of quadrature points for Gauss-Hermite integration.
159+
- `K::Integer`: Approximation parameter.
160160
- `μ0::Float64`: Bare mass. Note that in the calculation actually ``µ_0^2`` is used, but for readibility we write the ``µ_0^2`` as μ0
161161
- `λ::Float64`: Coupling constant.
162162
163+
### Approximation parameter `K`
164+
#### Trivial (no symmetry)
165+
The tensor is constructed by performing a Gauss-Hermite quadrature to approximate the integrals in the partition function.
166+
The bond dimension is equal to `K^2`.
167+
168+
#### ℤ₂×ℤ₂ symmetry
169+
The tensor is constructed by Taylor expanding the mixed sites term in the partition function.
170+
The order of the Taylor expansion is `K`. The total bond dimension is `K^2`.
171+
172+
#### U(1) symmetry
173+
The tensor is constructed by Taylor expanding the mixed sites term in the partition function.
174+
The order of the Taylor expansion is `K`. The total bond dimension is `K^2`.
175+
163176
### Examples
164177
```julia
165178
phi4_complex(10, -1., 1.)

src/models/phi4_real.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,24 @@ Constructs the partition function tensor for a 2D square lattice
4949
for the real ϕ^4 model with a given approximation (and bond dimension) `K`, bare mass ``µ_0^2`` `μ0`, interaction constant `λ` and external field `h`.
5050
5151
Compatible with no symmetry or with explicit ℤ₂ symmetry on each of its spaces.
52-
The latter is based on Taylor expanding the mixed sites term, and requires the external field `h` to be zero.
5352
Defaults to ℤ₂ symmetry and `h = 0` if the symmetry type and magnetic field are not provided.
5453
55-
It is based on [Gauss-Hermite quadrature](https://en.wikipedia.org/wiki/Gauss%E2%80%93Hermite_quadrature).
56-
5754
### Arguments
58-
- `K::Integer`: Number of quadrature points for Gauss-Hermite integration. Has to be even for the ℤ₂ symmetric version.
55+
- `K::Integer`: Approximation parameter.
5956
- `μ0::Float64`: Bare mass. Note that in the calculation actually ``µ_0^2`` is used, but for readibility we write the ``µ_0^2`` as μ0
6057
- `λ::Float64`: Coupling constant.
6158
- `h::Float64`: External field (default is 0).
6259
60+
### Approximation parameter `K`
61+
#### Trivial (no symmetry)
62+
The tensor is constructed by performing a Gauss-Hermite quadrature to approximate the integrals in the partition function.
63+
The bond dimension is equal to the number of quadrature points `K`.
64+
65+
#### ℤ₂ symmetry
66+
The tensor is constructed by Taylor expanding the mixed sites term in the partition function.
67+
The order of the Taylor expansion is K, and the bond dimension is K/2 for the even and odd sectors each (K in total).
68+
Not compatible with a non-zero magnetic field, as the magnetic field breaks the ℤ₂ symmetry.
69+
6370
### Examples
6471
```julia
6572
phi4_real(10, -1.0, 1.0, 1.0) # default ℤ₂ symmetry, h = 0

0 commit comments

Comments
 (0)