Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MPSKitModels"
uuid = "ca635005-6f8c-4cd1-b51d-8491250ef2ab"
authors = ["Maarten Van Damme", "Lukas Devos", "Gertian Roose", "Klaas Gunst"]
version = "0.4.1"
version = "0.4.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -13,7 +13,7 @@ TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"

[compat]
MPSKit = "0.12"
MPSKit = "0.13.1"
MacroTools = "0.5"
PrecompileTools = "1"
QuadGK = "2.11.1"
Expand Down
4 changes: 3 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502"
MPSKitModels = "ca635005-6f8c-4cd1-b51d-8491250ef2ab"

[compat]
Documenter = "0.25 - 0.30"
Documenter = "1"
12 changes: 11 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# if examples is not the current active environment, switch to it
if Base.active_project() != joinpath(@__DIR__, "Project.toml")
using Pkg
Pkg.activate(@__DIR__)
Pkg.develop(PackageSpec(; path=(@__DIR__) * "/../"))
Pkg.resolve()
Pkg.instantiate()
end

using Documenter
using MPSKitModels

Expand All @@ -13,6 +22,7 @@ makedocs(;
"man/mpoham.md",
"man/lattices.md",
"man/models.md"],
"Index" => "package_index.md"])
"Index" => "package_index.md"],
checkdocs=:public)

deploydocs(; repo="github.com/QuantumKitHub/MPSKitModels.jl.git")
5 changes: 4 additions & 1 deletion docs/src/man/lattices.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ In order to facilitate this mapping, the combination of the `@mpoham` macro and
```@docs
AbstractLattice
FiniteChain
FiniteCylinder
FiniteStrip
InfiniteChain
InfiniteCylinder
InfiniteHelix
Expand All @@ -26,6 +28,7 @@ LatticePoint
linearize_index
vertices
nearest_neighbours
next_nearest_neighbours
bipartition
```

Expand All @@ -39,4 +42,4 @@ Any mapping of linear indices can be used, but the following patterns can be hel
```@docs
backandforth_pattern
frontandback_pattern
```
```
4 changes: 3 additions & 1 deletion docs/src/man/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ CurrentModule = MPSKitModels
```@docs
transverse_field_ising
kitaev_model
quantum_potts
heisenberg_XXX
heisenberg_XXZ
heisenberg_XYZ
bilinear_biquadratic_model
tj_model
hubbard_model
bose_hubbard_model
quantum_chemistry_hamiltonian
Expand All @@ -25,4 +27,4 @@ classical_ising
sixvertex
hard_hexagon
qstate_clock
```
```
9 changes: 8 additions & 1 deletion docs/src/man/mpoham.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The `@mpoham` macro

```@meta
CurrentModule = TensorKit
CurrentModule = MPSKitModels
```

When dealing with (quasi-) one-dimensional systems that are defined by a sum of local operators, a convenient representation exists in terms of a sparse matrix product operator with an upper diagonal structure (`MPOHamiltonian`).
Expand All @@ -10,3 +10,10 @@ The generation of such an object starting from a sum of local operators is facil
```@docs
@mpoham
```

Internally, the macro generates operators that have some knowledge of the lattice structure, through the following structures:

```@docs
LocalOperator
SumOfLocalOperators
```
17 changes: 12 additions & 5 deletions docs/src/man/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ S_zz
S_plusmin
S_minplus
S_exchange
spinmatrices
```

For convenience, the Pauli matrices can also be recovered as ``σⁱ = 2 Sⁱ``.
Expand Down Expand Up @@ -62,6 +63,8 @@ Supported values of `symmetry` for the `X` operator are `Trivial` and `ZNIrrep{Q
potts_X
potts_Z
potts_ZZ
potts_field
weyl_heisenberg_matrices
```

## Bosonic operators
Expand Down Expand Up @@ -102,8 +105,12 @@ c_number

Spinful fermions.

```@docs
e_plus
e_min
e_number
```
```@autodocs
Modules = [MPSKitModels.HubbardOperators]
```

TJ-model operators.

```@autodocs
Modules = [MPSKitModels.TJOperators]
```
2 changes: 1 addition & 1 deletion src/models/hamiltonians.jl
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function bose_hubbard_model(elt::Type{<:Number}=ComplexF64,
elseif symmetry === U1Irrep
isinteger(2n) ||
throw(ArgumentError("`U₁` symmetry requires halfinteger particle number"))
H = MPSKit.add_physical_charge(H, fill(U1Irrep(-n), length(H)))
H = MPSKit.add_physical_charge(H, fill(U1Irrep(n), length(H)))
else
throw(ArgumentError("symmetry not implemented"))
end
Expand Down
12 changes: 3 additions & 9 deletions src/operators/spinoperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,6 @@ function potts_ZZ(elt::Type{<:Number}, ::Type{ZNIrrep{Q}}; q=Q) where {Q}
return ZZ
end

"""
potts_field([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; q=3)

The Potts field operator ``X``, an alias for ``potts_X``.
"""
potts_field(args...; kwargs...) = potts_X(args...; kwargs...)

# Generalisations of Pauli matrices

"""
weyl_heisenberg_matrices(dimension [, eltype])

Expand Down Expand Up @@ -516,6 +507,7 @@ end

"""
potts_X([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; Q=3)
potts_field([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; Q=3)

The Potts X operator, also known as the shift operator, where X^q=1.
"""
Expand All @@ -539,3 +531,5 @@ function potts_X(elt::Type{<:Number}, ::Type{ZNIrrep{Q}}; q=Q) where {Q}
end
return X
end

const potts_field = potts_X
Loading