-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for fermionic systems (#47)
* ctmrg for fermions * NNanisotropic * Merge remote-tracking branch 'origin' * fix onsites * Add ChainRulesTestUtils test dependency * Format * Add FiniteDifferences test dependency * Move rotation functions * Make tests their own testset * Attempt GMRES for p-wave * Fix ugly "fix" for gaugefix * Fiddle with some settings * Refactor transfer matrix eigensolver * Fix typo * Add sum over onsite expectation values * Add nontrivial unit cell and change some settings to 'force' optimization to proceed * Some cleanup * Fix docstring AnisotropicNNOperator * Tweak some more settings to reduce runtime * Formatter [no ci] * Cleanup gradparts tests [no ci] --------- Co-authored-by: leburgel <[email protected]> Co-authored-by: lkdvos <[email protected]>
- Loading branch information
1 parent
996893a
commit 4a1e5fb
Showing
17 changed files
with
409 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## Model Hamiltonians | ||
# ------------------- | ||
|
||
""" | ||
square_lattice_heisenberg(; Jx=-1, Jy=1, Jz=-1) | ||
Square lattice Heisenberg model. | ||
By default, this implements a single site unit cell via a sublattice rotation. | ||
""" | ||
function square_lattice_heisenberg( | ||
::Type{T}=ComplexF64; Jx=-1, Jy=1, Jz=-1 | ||
) where {T<:Number} | ||
physical_space = ComplexSpace(2) | ||
σx = TensorMap(T[0 1; 1 0], physical_space, physical_space) | ||
σy = TensorMap(T[0 im; -im 0], physical_space, physical_space) | ||
σz = TensorMap(T[1 0; 0 -1], physical_space, physical_space) | ||
H = (Jx * σx ⊗ σx) + (Jy * σy ⊗ σy) + (Jz * σz ⊗ σz) | ||
return NLocalOperator{NearestNeighbor}(H / 4) | ||
end | ||
|
||
""" | ||
square_lattice_pwave(; t=1, μ=2, Δ=1) | ||
Square lattice p-wave superconductor model. | ||
""" | ||
function square_lattice_pwave( | ||
::Type{T}=ComplexF64; t::Number=1, μ::Number=2, Δ::Number=1 | ||
) where {T<:Number} | ||
physical_space = Vect[FermionParity](0 => 1, 1 => 1) | ||
# on-site | ||
h0 = TensorMap(zeros, T, physical_space ← physical_space) | ||
block(h0, FermionParity(1)) .= -μ | ||
|
||
# two-site (x-direction) | ||
hx = TensorMap(zeros, T, physical_space^2 ← physical_space^2) | ||
block(hx, FermionParity(0)) .= [0 -Δ; -Δ 0] | ||
block(hx, FermionParity(1)) .= [0 -t; -t 0] | ||
|
||
# two-site (y-direction) | ||
hy = TensorMap(zeros, T, physical_space^2 ← physical_space^2) | ||
block(hy, FermionParity(0)) .= [0 Δ*im; -Δ*im 0] | ||
block(hy, FermionParity(1)) .= [0 -t; -t 0] | ||
|
||
return AnisotropicNNOperator(h0, hx, hy) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.