Skip to content

Commit

Permalink
Merge pull request #6 from yakovbraver/tweaks
Browse files Browse the repository at this point in the history
Tweaks
  • Loading branch information
yakovbraver authored Jul 19, 2023
2 parents f2aa904 + a420344 commit 5f7f5e1
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name = "TTSC"
uuid = "f8e47de0-90c4-48ec-a6c2-713e7f641db1"
authors = ["Yakov Braver [email protected]"]
version = "1.0.0-DEV"
version = "1.0.0"

[deps]
Dierckx = "39dd38d3-220a-591b-8e3c-4c3a8c710a94"
DiffEqPhysics = "055956cb-9e8b-5191-98cc-73ae4a59e68a"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
FLoops = "cc61a311-1640-44b5-9fba-1b764f453329"
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For usage examples, see the `examples` folder.
For further details, please refer to:

* [Phys. Rev. B **106**, 144301 (2022)](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.106.144301) or [arXiv:2206.14804](https://arxiv.org/abs/2206.14804)
* [arXiv:2305.07668](https://arxiv.org/abs/2305.07668)
* [Phys. Rev. B **108**, L020303 (2023)](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.108.L020303) or [arXiv:2305.07668](https://arxiv.org/abs/2305.07668)

## Visualisation of Thouless pumping using the Wannier states

Expand Down
2 changes: 1 addition & 1 deletion examples/DeltaModel/article_plotter.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A script for producing all the figures for https://arxiv.org/abs/2305.07668
# A script for producing all the figures for https://doi.org/10.1103/physrevb.108.l020303 (https://arxiv.org/abs/2305.07668)
import TTSC.DeltaModel as dm
using Plots, Measures, LaTeXStrings
using LinearAlgebra
Expand Down
4 changes: 2 additions & 2 deletions examples/DeltaModel/classical.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A driving script for the classical analysis of Hamiltonian (2) from https://arxiv.org/abs/2305.07668
# A driving script for the classical analysis of Hamiltonian (1) from https://doi.org/10.1103/physrevb.108.l020303 (https://arxiv.org/abs/2305.07668)
using TTSC.Classical
using Plots, LaTeXStrings, ProgressMeter

Expand Down Expand Up @@ -67,7 +67,7 @@ x₀ = -1.04l/2
p₀ = 0.0

# calculate `n_T` periods of unperturbed motion to check accuracy
import DifferentialEquations as DiffEq
import OrdinaryDiffEq as DiffEq
using DiffEqPhysics: HamiltonianProblem

T = l/sqrt(𝐻₀(p₀, x₀, params)) # analytical period
Expand Down
2 changes: 1 addition & 1 deletion examples/DeltaModel/floquet.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A driving script for analysing Floquet Hamiltonian (S1) from https://arxiv.org/abs/2305.07668
# A driving script for analysing Floquet Hamiltonian (S1) from https://doi.org/10.1103/physrevb.108.l020303 (https://arxiv.org/abs/2305.07668)
import TTSC.DeltaModel as dm
using Plots, LaTeXStrings, ProgressMeter

Expand Down
2 changes: 1 addition & 1 deletion examples/DeltaModel/floquet_tb.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A driving script for analysing the tight-binding Hamiltonian (4) from https://arxiv.org/abs/2305.07668
# A driving script for analysing the tight-binding Hamiltonian (4) from https://doi.org/10.1103/physrevb.108.l020303 (https://arxiv.org/abs/2305.07668)
import TTSC.DeltaModel as dm
using Plots, LaTeXStrings, ProgressMeter
using LinearAlgebra: diagind
Expand Down
2 changes: 1 addition & 1 deletion examples/DeltaModel/spatial.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A driving script for analysing Hamiltonian (2) from https://arxiv.org/abs/2305.07668
# A driving script for analysing Hamiltonian (2) from https://doi.org/10.1103/physrevb.108.l020303 (https://arxiv.org/abs/2305.07668)
import TTSC.DeltaModel as dm
using Plots, LaTeXStrings, ProgressMeter

Expand Down
5 changes: 3 additions & 2 deletions examples/SineModel/classical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ s = 2
params = [gₗ, l, Vₗ, λₛ, λₗ, ω]
H = ClassicalHamiltonian(𝐻₀, 𝐻, params, s, min_pos=(1.5, 2), max_pos=(2, 2.5))

import Dierckx
function plot_actions(H::ClassicalHamiltonian)
figs = [plot() for _ in 1:4];
x = range(0, 2π, length=200);
Expand Down Expand Up @@ -87,7 +88,7 @@ p = Progress(length(φₜ), 1)
U = @. -λₛ*Aₛ*cos(4x) + λₗ*Aₗ*cos(2x - ϕ) + H.𝐸(Iₛ) - ω/s*Iₛ
plot(x, U, label=false, ylims=(-5610, -5575))
scatter!(h.w.pos[:, i], h.w.E[:, i]; marker_z=h.w.E[:, i], c=:coolwarm, label=false, markerstrokewidth=0, clims=(-5610, -5575))
for j in 1:size(w, 2)
for j in axes(w, 2)
plot!(x, 4abs2.(w[:, j, i]) .+ h.w.E[j, i], label=false)
end
next!(p)
Expand Down Expand Up @@ -122,7 +123,7 @@ p = Progress(length(φₜ), 1)
U = @. -λₛ*Aₛ*cos(4x) + λₗ*Aₗ*cos(2x - ϕ) + H.𝐸(Iₛ) - ω/s*Iₛ
plot(x, U, label=false, ylims=(-5610, -5575))
scatter!(h.w.pos[:, i], h.w.E[:, i]; marker_z=h.w.E[:, i], c=:coolwarm, label=false, markerstrokewidth=0, clims=(-5610, -5575))
for j in 1:size(w, 2)
for j in axes(w, 2)
plot!(x, 4abs2.(w[:, j, i]) .+ h.w.E[j, i], label=false)
end
next!(p)
Expand Down
3 changes: 2 additions & 1 deletion examples/SineModel/classical_6D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ params = [V₀, λ, ω]
# plot(range(0, 2π, length=200), x -> 𝐻₀(0, x, params))
H = ClassicalHamiltonian(𝐻₀, 𝐻, params, s, min_pos=(3.0, 3.2), max_pos=(1.4, 1.6))

import Dierckx
function plot_actions(H::ClassicalHamiltonian)
figs = [plot() for _ in 1:4];
x = range(0, 2π, length=50);
Expand Down Expand Up @@ -52,7 +53,7 @@ p₀ = 0.0; x₀ = 2.0;
# 𝑦″ + 4𝑉₀sin(𝑦) = 0
# with the initial condition 𝑦(0) = 2𝑥₀. The period is then
# 𝑇 = 4 / √(4𝑉₀) 𝐾(𝑚²), where 𝑚 = sin(𝑦(0)/2) = sin(𝑥₀)
import DifferentialEquations as DiffEq
import OrdinaryDiffEq as DiffEq
using DiffEqPhysics: HamiltonianProblem
import Elliptic
m = sin(x₀)
Expand Down
4 changes: 2 additions & 2 deletions src/Classical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Roots
import Optim
import Dierckx
using QuadGK: quadgk
import DifferentialEquations as DiffEq
using DiffEqPhysics: HamiltonianProblem, DynamicalODEProblem
import OrdinaryDiffEq as DiffEq
using DiffEqPhysics: HamiltonianProblem

"A type representing a classical Hamiltonian."
mutable struct ClassicalHamiltonian
Expand Down

0 comments on commit 5f7f5e1

Please sign in to comment.