omre doc fixes

This commit is contained in:
Valentin Boettcher 2023-03-10 12:29:10 -05:00
parent 1deba1ce10
commit f0e20e9758
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE
6 changed files with 16 additions and 49 deletions

View file

@ -4,4 +4,4 @@ using Documenter, Looping
DocMeta.setdocmeta!(Looping.Utilities, :DocTestSetup, :(using Looping.Utilities); recursive=true) DocMeta.setdocmeta!(Looping.Utilities, :DocTestSetup, :(using Looping.Utilities); recursive=true)
DocMeta.setdocmeta!(Looping.FloquetUtils, :DocTestSetup, :(using Looping.FloquetUtils); recursive=true) DocMeta.setdocmeta!(Looping.FloquetUtils, :DocTestSetup, :(using Looping.FloquetUtils); recursive=true)
makedocs(sitename="Looping Documentation", modules=map(eval, modules), draft=false, strict=:doctest) makedocs(sitename="Looping Documentation", modules=[Looping.Utilities, Looping.FloquetUtils], draft=false, strict=:doctest)

View file

@ -2,10 +2,3 @@
Some numerical tools and experiments for the fiber loop reservoir Some numerical tools and experiments for the fiber loop reservoir
engineering project. engineering project.
```@contents
Pages = ["modules/Utilities.md" "modules/FloquetUtilities.md"]
Depth = 3
```

View file

@ -1,19 +1,5 @@
# Floquet Utilities # Floquet Utilities
```@docs ```@autodocs
Looping.FloquetUtils Modules = [Looping.FloquetUtils]
```
```@meta
CurrentModule = Looping.FloquetUtils
```
```@docs
time_evolution_op
floquet_hamiltonian
trivial_floquet_hamiltonian
KickOperator
``` ```

View file

@ -1,17 +1,5 @@
# Utilities # Utilities
```@docs ```@autodocs
Looping.Utilities Modules = [Looping.Utilities]
```
```@meta
CurrentModule = Looping.Utilities
```
```@docs
periodic_distance
restrict_to_range
``` ```

View file

@ -19,7 +19,7 @@ using ..Utilities
Calculate the time evolution operator for a Hamiltonian `H` up to a Calculate the time evolution operator for a Hamiltonian `H` up to a
total time `T`. The rest arguments are passed on to total time `T`. The rest arguments are passed on to
`DifferentialEquations.solve`. [`de.solve`](@ref).
""" """
function time_evolution_op(H::Function, T::Real, args...; kwargs...) function time_evolution_op(H::Function, T::Real, args...; kwargs...)
function u_step!(dU, U, _, t) function u_step!(dU, U, _, t)
@ -52,7 +52,7 @@ end
Returns the Floquet Hamiltonian given a Hamiltionian `H` and a time Returns the Floquet Hamiltonian given a Hamiltionian `H` and a time
`T`. The rest arguments are passed on to `T`. The rest arguments are passed on to
[`DifferentialEquations.solve`](@ref). [`de.solve`](@ref).
""" """
function floquet_hamiltonian(H::Function, T::Real, args...; kwargs...) function floquet_hamiltonian(H::Function, T::Real, args...; kwargs...)
U = time_evolution_op(H, T, args...; kwargs...) U = time_evolution_op(H, T, args...; kwargs...)
@ -93,12 +93,12 @@ struct KickOperator
H_F::Matrix H_F::Matrix
""" """
KickOperator(U(t), H_F) KickOperator(U(t), H_F)
Return the Kick operator Given the time evolution operator `U(t)` and the Floquet Hamiltonian Return the Kick operator Given the time evolution operator `U(t)` and the Floquet Hamiltonian
`H_F`. `H_F`.
""" """
function KickOperator(U, H_F::Matrix) function KickOperator(U, H_F::Matrix)
if size(U(0)) != size(H_F) if size(U(0)) != size(H_F)
throw(DimensionMismatch("`U` and `H_F` should have the same dimension.")) throw(DimensionMismatch("`U` and `H_F` should have the same dimension."))
@ -107,7 +107,11 @@ struct KickOperator
end end
end end
"""
KickOperator(H(t), T)
Return the Kick operator Given the Hamiltonian `H(t)` and the total time ``T``.
"""
function KickOperator(H::Function, T::Real) function KickOperator(H::Function, T::Real)
U = time_evolution_op(H, T) U = time_evolution_op(H, T)
H_F = floquet_hamiltonian(U(T), T) H_F = floquet_hamiltonian(U(T), T)

View file

@ -1,8 +1,4 @@
module Looping module Looping
export hi
hi() = print("hi")
include("Utilities.jl") include("Utilities.jl")
include("FloquetUtils.jl") include("FloquetUtils.jl")
end end