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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Also see the [GitHub Releases](https://github.com/JuliaQuantumControl/QuantumGra
* Changed: The field `G` of `GradGenerator` and `GradgenOperator` is now `H`, and the field `control_deriv_ops` of `GradgenOperator` is now `control_derivs`, the same name as in `GradGenerator`. To adapt, replace `G.G` with `G.H` and `G.control_deriv_ops` with `G.control_derivs` for any gradient generator `G`. The positional arguments of the `GradgenOperator` constructor are unchanged
* Changed: The documentation uses a simplified notation that matches the field names: the dynamical generator `H`, the control derivatives `control_derivs` (μ̂ₗ), the gradient generator `G`, and the gradient vector `Ψ` with the state `Ψ.state` and the gradient states `Ψ.grad_states` (Ψ′ₗ)
* Added: An overview of the gradient generator and the gradient vector in the documentation
* Added: A "Background" page in the documentation that proves that propagating a gradient vector under a gradient generator yields the exact derivatives of the propagated state, interprets gradient vectors as dual numbers in forward-mode automatic differentiation, and extends the theory to time-dependent generators and to arbitrary control parameters (the basis for GOAT-type methods)
* Fixed: `isreal` for a `GradgenOperator` no longer throws a `MethodError`


Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ SPDX-License-Identifier: MIT OR CC-BY-4.0

Dynamic Gradients for Quantum Control.

For a [dynamical generator](https://juliaquantumcontrol.github.io/QuantumPropagators.jl/stable/generators/) $\hat{H}$ (a Hamiltonian or Liouvillian) that depends on control functions $\epsilon_1(t), \dots, \epsilon_L(t)$, this package defines the "gradient generator" $G = G[\hat{H}]$ and the "gradient vector" $\Psi = (|\Psi^\prime_1⟩, \dots, |\Psi^\prime_L⟩, |\Psi⟩)^T$, with the state $|\Psi⟩$ and the gradient states $|\Psi^\prime_l⟩$, so that
For a [dynamical generator](https://juliaquantumcontrol.github.io/QuantumPropagators.jl/stable/generators/) $\hat{H}$ (a Hamiltonian or Liouvillian) that depends on control functions $ϵ_1(t), \dots, ϵ_L(t)$, this package defines the "gradient generator" $G = G[\hat{H}]$ and the "gradient vector" $Ψ = (|Ψ^\prime_1⟩, \dots, |Ψ^\prime_L⟩, |Ψ⟩)^T$, with the state $|Ψ⟩$ and the gradient states $|Ψ^\prime_l⟩$, so that

```math
e^{-i G dt} \begin{pmatrix} 0 \\ \vdots \\ 0 \\ |\Psi⟩ \end{pmatrix}
e^{-i G dt} \begin{pmatrix} 0 \\ \vdots \\ 0 \\ |Ψ⟩ \end{pmatrix}
= \begin{pmatrix}
\frac{\partial}{\partial \epsilon_1} e^{-i \hat{H} dt} |\Psi⟩ \\
\frac{\partial}{\partial ϵ_1} e^{-i \hat{H} dt} |Ψ⟩ \\
\vdots \\
\frac{\partial}{\partial \epsilon_L} e^{-i \hat{H} dt} |\Psi⟩ \\
e^{-i \hat{H} dt} |\Psi⟩
\frac{\partial}{\partial ϵ_L} e^{-i \hat{H} dt} |Ψ⟩ \\
e^{-i \hat{H} dt} |Ψ⟩
\end{pmatrix}\,.
```

Expand Down
5 changes: 5 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ path = [
]
SPDX-FileCopyrightText = "© 2022 Michael Goerz <mail@michaelgoerz.net>"
SPDX-License-Identifier = "MIT OR CC0-1.0"

[[annotations]]
path = "docs/src/refs.bib"
SPDX-FileCopyrightText = "© 2026 Michael Goerz <mail@michaelgoerz.net>"
SPDX-License-Identifier = "CC0-1.0"
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
QuantumControl = "8a270532-f23f-47a8-83a9-b33d10cad486"
Expand All @@ -11,5 +12,6 @@ QuantumGradientGenerators = {path = ".."}

[compat]
Documenter = "1.4"
DocumenterCitations = "1.5"
DocumenterInterLinks = "1.1"
julia = "1.10"
27 changes: 25 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using QuantumGradientGenerators
using Documenter
using DocumenterCitations
using DocumenterInterLinks
using Pkg

Expand All @@ -23,6 +24,7 @@ links = InterLinks(
"Julia" => "https://docs.julialang.org/en/v1/",
"QuantumPropagators" => "https://juliaquantumcontrol.github.io/QuantumPropagators.jl/$DEV_OR_STABLE",
"QuantumControl" => "https://juliaquantumcontrol.github.io/QuantumControl.jl/$DEV_OR_STABLE",
"GRAPE" => "https://juliaquantumcontrol.github.io/GRAPE.jl/$DEV_OR_STABLE",
)

fallbacks = ExternalFallbacks(
Expand All @@ -32,8 +34,17 @@ fallbacks = ExternalFallbacks(

println("Starting makedocs")

bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"); style = :numeric)

PAGES = [
"Home" => "index.md",
"Background" => "background.md",
"API" => "api.md",
"References" => "references.md",
]

makedocs(;
plugins = [links, fallbacks],
plugins = [bib, links, fallbacks],
authors = AUTHORS,
sitename = "QuantumGradientGenerators.jl",
doctest = false,
Expand All @@ -48,9 +59,21 @@ makedocs(;
"https://juliaquantumcontrol.github.io/QuantumControl.jl/dev/assets/topbar/topbar.js"
),
],
mathengine = MathJax3(
Dict(
:loader => Dict("load" => ["[tex]/physics"]),
:tex => Dict(
"inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
"tags" => "ams",
"packages" =>
["base", "ams", "autoload", "configmacros", "physics"],
"macros" => Dict("ii" => "{\\mathrm{i}}"),
),
)
),
footer = "[$NAME.jl]($GITHUB) v$VERSION docs powered by [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl)."
),
pages = ["Home" => "index.md", "API" => "api.md",]
pages = PAGES,
)

println("Finished makedocs")
Expand Down
9 changes: 4 additions & 5 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!--
SPDX-FileCopyrightText: © 2022 Michael Goerz <mail@michaelgoerz.net>

SPDX-License-Identifier: MIT OR CC-BY-4.0
-->
```@meta
# SPDX-FileCopyrightText: © 2022 Michael Goerz <mail@michaelgoerz.net>
# SPDX-License-Identifier: MIT OR CC-BY-4.0
```

# `QuantumGradientGenerators` API

Expand Down
Loading