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
2 changes: 0 additions & 2 deletions .JuliaFormatter.toml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Format Check"
name: FormatCheck

on:
push:
Expand All @@ -7,8 +7,11 @@ on:
- 'master'
tags: '*'
pull_request:
branches:
- 'main'
- 'master'

jobs:
format-check:
formatcheck:
name: "Format Check"
uses: "QuantumKitHub/.github/.github/workflows/formatcheck.yml@main"
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/FormatCheck.yml@main"
38 changes: 23 additions & 15 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
using TensorKitTensors
using Documenter

DocMeta.setdocmeta!(TensorKitTensors, :DocTestSetup, :(using TensorKitTensors);
recursive=true)
DocMeta.setdocmeta!(
TensorKitTensors, :DocTestSetup, :(using TensorKitTensors);
recursive = true
)

operatorpages = ["spinoperators.md", "bosonoperators.md", "fermionoperators.md",
"tjoperators.md", "hubbardoperators.md"]
operatorpages = [
"spinoperators.md", "bosonoperators.md", "fermionoperators.md",
"tjoperators.md", "hubbardoperators.md",
]
makedocs(;
modules=[TensorKitTensors],
authors="QuantumKitHub",
sitename="TensorKitTensors.jl",
format=Documenter.HTML(;
canonical="https://QuantumKitHub.github.io/TensorKitTensors.jl",
edit_link="main",
assets=String[],),
pages=["Home" => "index.md", "Operators" => operatorpages],)
modules = [TensorKitTensors],
authors = "QuantumKitHub",
sitename = "TensorKitTensors.jl",
format = Documenter.HTML(;
canonical = "https://QuantumKitHub.github.io/TensorKitTensors.jl",
edit_link = "main",
assets = String[],
),
pages = ["Home" => "index.md", "Operators" => operatorpages],
)

deploydocs(; repo="github.com/QuantumKitHub/TensorKitTensors.jl",
devbranch="main",
push_preview=true)
deploydocs(;
repo = "github.com/QuantumKitHub/TensorKitTensors.jl",
devbranch = "main",
push_preview = true
)
4 changes: 2 additions & 2 deletions src/bosonoperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function b_plus_b_min(elt::Type{<:Number}, ::Type{U1Irrep}; cutoff::Integer)
for (f1, f2) in fusiontrees(b⁺b⁻)
c_out, c_in = f1.uncoupled, f2.uncoupled
if c_in[1].charge + 1 == c_out[1].charge &&
c_in[2].charge - 1 == c_out[2].charge
c_in[2].charge - 1 == c_out[2].charge
b⁺b⁻[f1, f2] .= sqrt(c_out[1].charge) * sqrt(c_in[2].charge)
end
end
Expand Down Expand Up @@ -169,7 +169,7 @@ function b_min_b_plus(elt::Type{<:Number}, ::Type{U1Irrep}; cutoff::Integer)
for (f1, f2) in fusiontrees(b⁻b⁺)
c_out, c_in = f1.uncoupled, f2.uncoupled
if c_in[1].charge - 1 == c_out[1].charge &&
c_in[2].charge + 1 == c_out[2].charge
c_in[2].charge + 1 == c_out[2].charge
b⁻b⁺[f1, f2] .= sqrt(c_in[1].charge) * sqrt(c_out[2].charge)
end
end
Expand Down
14 changes: 7 additions & 7 deletions src/fermionoperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end

Return the one-body operator that counts the nunber of particles.
""" f_num
function f_num(T::Type{<:Number}=ComplexF64)
function f_num(T::Type{<:Number} = ComplexF64)
t = single_site_operator(T)
block(t, fℤ₂(1)) .= one(T)
return t
Expand All @@ -39,7 +39,7 @@ const n = f_num

# Two site operators
# ------------------
function two_site_operator(T::Type{<:Number}=ComplexF64)
function two_site_operator(T::Type{<:Number} = ComplexF64)
V = fermion_space()
return zeros(T, V ⊗ V ← V ⊗ V)
end
Expand All @@ -50,7 +50,7 @@ end

Return the two-body operator that creates a particle at the first site and annihilates a particle at the second.
""" f_plus_f_min
function f_plus_f_min(T::Type{<:Number}=ComplexF64)
function f_plus_f_min(T::Type{<:Number} = ComplexF64)
t = two_site_operator(T)
I = sectortype(t)
t[(I(1), I(0), dual(I(0)), dual(I(1)))] .= 1
Expand All @@ -64,7 +64,7 @@ const f⁺f⁻ = f_plus_f_min

Return the two-body operator that annihilates a particle at the first site and creates a particle at the second.
""" f_min_f_plus
function f_min_f_plus(T::Type{<:Number}=ComplexF64)
function f_min_f_plus(T::Type{<:Number} = ComplexF64)
t = two_site_operator(T)
I = sectortype(t)
t[(I(0), I(1), dual(I(1)), dual(I(0)))] .= -1
Expand All @@ -78,7 +78,7 @@ const f⁻f⁺ = f_min_f_plus

Return the two-body operator that creates a particle at the first and at the second site.
""" f_plus_f_plus
function f_plus_f_plus(T::Type{<:Number}=ComplexF64)
function f_plus_f_plus(T::Type{<:Number} = ComplexF64)
t = two_site_operator(T)
I = sectortype(t)
t[(I(1), I(1), dual(I(0)), dual(I(0)))] .= 1
Expand All @@ -92,7 +92,7 @@ const f⁺f⁺ = f_plus_f_plus

Return the two-body operator that annihilates a particle at the first and at the second site.
""" f_min_f_min
function f_min_f_min(T::Type{<:Number}=ComplexF64)
function f_min_f_min(T::Type{<:Number} = ComplexF64)
t = two_site_operator(T)
I = sectortype(t)
t[(I(0), I(0), dual(I(1)), dual(I(1)))] .= 1
Expand All @@ -106,7 +106,7 @@ const f⁻f⁻ = f_min_f_min

Return the two-body operator that describes a particle that hops between the first and the second site.
""" f_hopping
function f_hopping(elt::Type{<:Number}=ComplexF64)
function f_hopping(elt::Type{<:Number} = ComplexF64)
return f_plus_f_min(elt) - f_min_f_plus(elt)
end
const f_hop = f_hopping
Expand Down
Loading
Loading