Skip to content

Commit

Permalink
Define the general form of the optimization functional
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Sep 21, 2024
1 parent 5ce75c3 commit 36b5b03
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
14 changes: 13 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ using QuantumControl.Generators
using Krotov
using GRAPE
import OrdinaryDiffEq # ensure ODE extension is loaded
using Documenter.HTMLWriter: KaTeX
using DocumenterCitations
using DocumenterInterLinks

Expand Down Expand Up @@ -93,13 +94,24 @@ makedocs(;
"https://juliaquantumcontrol.github.io/QuantumControl.jl/dev/assets/topbar/topbar.js"
),
],
mathengine=KaTeX(
Dict(
:macros => Dict(
"\\Op" => "\\hat{#1}",
"\\ket" => "\\vert#1\\rangle",
"\\bra" => "\\langle#1\\vert",
"\\Im" => "\\operatorname{Im}",
"\\Re" => "\\operatorname{Re}",
),
),
),
footer="[$NAME.jl]($GITHUB) v$VERSION docs powered by [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl).",
size_threshold=1024 * 1024,
),
pages=[
"Home" => "index.md",
"Glossary" => "glossary.md",
"User Manual" => "manual.md",
"Overview" => "overview.md",
"Control Methods" => "methods.md",
"Howto" => "howto.md",
"Examples" => "examples/index.md",
Expand Down
20 changes: 17 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ Markdown.parse("$github_badge $version_badge")

Quantum optimal control [BrumerShapiro2003,BrifNJP2010,Shapiro2012,KochJPCM2016,SolaAAMOP2018,MorzhinRMS2019,Wilhelm2003.10132,KochEPJQT2022](@cite) attempts to steer a quantum system in some desired way by finding optimal control parameters or control fields inside the system Hamiltonian or Liouvillian. Typical control tasks are the preparation of a specific quantum state or the realization of a logical gate in a quantum computer (["pulse level control"](https://arxiv.org/abs/2004.06755)). Thus, quantum control theory is a critical part of realizing quantum technologies at the lowest level. Numerical methods of *open-loop* quantum control (methods that do not involve measurement feedback from a physical quantum device) such as [Krotov's method](https://github.com/JuliaQuantumControl/Krotov.jl) [Krotov1996,SomloiCP1993,BartanaJCP1997,PalaoPRA2003,ReichJCP2012,GoerzSPP2019](@cite) and [GRAPE](https://github.com/JuliaQuantumControl/GRAPE.jl) [KhanejaJMR2005,FouquieresJMR2011](@cite) address the control problem by [simulating the dynamics of the system](https://github.com/JuliaQuantumControl/QuantumPropagators.jl) and then iteratively improving the value of a functional that encodes the desired outcome.

The `QuantumControl.jl` package provides a single coherent [API](@ref QuantumControlAPI) for solving the quantum control problem with the [packages](https://github.com/JuliaQuantumControl#packages) in the [JuliaQuantumControl](https://github.com/JuliaQuantumControl) organization.

##### Functional

Mathematically, the control problem is the minimization of a functional of the form

```math
J(\{ϵ_l(t)\})
= J_T(\{|Ψ_k(T)⟩\})
+ λ_a \, \underbrace{∑_l \int_{0}^{T} g_a(ϵ_l(t)) \, dt}_{=J_a(\{ϵ_l(t)\})}
+ λ_b \, \underbrace{∑_k \int_{0}^{T} g_b(|Ψ_k(t)⟩) \, dt}_{=J_b(\{|Ψ_k(t)⟩\})}\,,
```

where ``\{ϵ_l(t)\}`` is a set of [control functions](@ref "Control Function") defined between the initial time ``t=0`` and the final time ``t=T``, and ``\{|Ψ_k(t)⟩\}`` is a set of ["trajectories"](@ref QuantumControl.Trajectory) evolving from a set of initial states ``\{|\Psi_k(t=0)⟩\}`` under the controls ``\{ϵ_l(t)\}``. The full functional consists of the final-time functional ``J_T``, a control-dependent running cost ``J_a`` weighted by ``λ_a``, and sometimes a state-dependent running cost ``J_b`` weighted by ``λ_b``. The states can be Hilbert space vectors or density matrices, and the equation of motion is implicit, typically the Schrödinger or Liouville equation.

The `QuantumControl.jl` package provides a single coherent [API](@ref QuantumControlAPI) for solving the quantum control problem with the [packages](https://github.com/JuliaQuantumControl#packages) in the [JuliaQuantumControl](https://github.com/JuliaQuantumControl) organization. Different [optimization methods](@ref "Control Methods") target specific variants of the above functional.


## Getting Started
Expand All @@ -26,14 +40,14 @@ The `QuantumControl.jl` package provides a single coherent [API](@ref QuantumCon

* Look at a [simple example for a state-to-state transition with GRAPE](@extref Examples :doc:`examples/simple_state_to_state/index`) to get a feeling for how the `QuantumControl` package is intended to be used, or look at the larger list of [Examples](@extref Examples :doc:`index`).

* Read the [Glossary](@ref) and [User Manual](@ref) to understand the philosophy of the framework.
* Read the [Glossary](@ref) and [Overview](@ref) to understand the philosophy of the framework.

## Contents

```@contents
Pages = [
"glossary.md",
"manual.md",
"overview.md",
"methods.md",
"howto.md",
]
Expand Down
6 changes: 3 additions & 3 deletions docs/src/manual.md → docs/src/overview.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# User Manual
# Overview

The User Manual describes the API of the `QuantumControl` package by outlining the general procedure for defining and solving quantum control problems. See the [API](@ref) for a detailed reference.
This page describes the API of the `QuantumControl` package by outlining the general procedure for defining and solving quantum control problems. See the [API](@ref) for a detailed reference.

## Setting up control problems

Quantum control problems are described by instantiating [`ControlProblem`](@ref). Remember that a quantum control problem aims to find control parameters in the dynamical generators ([Hamiltonians](@ref hamiltonian), [Liouvillians](@ref liouvillian)) of a quantum system to steer the dynamics of the system in some desired way. The dynamics of system are probed by one or more quantum states, each with its particular dynamical generator, which we encode as a [`Trajectory`](@ref) object.

To determine how well the system dynamics meet the desired behavior, a [`Trajectory`](@ref) can have additional properties that are taken into account in the optimization functional. Most commonly, this is represented by a `target_state` property of the [`Trajectory`](@ref). The objective is fulfilled when the control parameters are chosen such that the initial state of each [`Trajectory`](@ref) evolves into the target state, on the time grid given as `tlist` in the [`ControlProblem`](@ref).
To determine how well the system dynamics meet the desired behavior, a [`Trajectory`](@ref) can have additional properties that are taken into account in the [optimization functional](@ref "Functional"). Most commonly, this is represented by a `target_state` property of the [`Trajectory`](@ref). The objective is fulfilled when the control parameters are chosen such that the initial state of each [`Trajectory`](@ref) evolves into the target state, on the time grid given as `tlist` in the [`ControlProblem`](@ref).

A control problem with a single such trajectory already encodes the common state-to-state problem, e.g., to initialize a system into an entangled state, or to control a chemical reaction. However, there are many control problems that require *simultaneously* solving more than one trajectory. For example, finding the control parameters that implement a two-qubit quantum gate ```` on a quantum computer naturally translates to four simultaneous trajectories, one for each two-qubit basis state: ``|00⟩ → Ô |00⟩``, ``|01⟩ → Ô |01⟩``, ``|10⟩ → Ô |10⟩``, ``|00⟩ → Ô |11⟩``. By virtue of the linearity of Hilbert space, finding a simultaneous solution to these four trajectories means the *any* state ``|Ψ⟩`` will then evolve as ``|Ψ⟩ → Ô |Ψ⟩``.

Expand Down

0 comments on commit 36b5b03

Please sign in to comment.