Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Latest commit

 

History

History
54 lines (33 loc) · 1.8 KB

README.md

File metadata and controls

54 lines (33 loc) · 1.8 KB

QuOptimalControl is superseded by QuantumControl.jl

Usage

Trying to mimic the interface that DifferentialEquations.jl uses we offer several problem definitions. Problems define the dynamics of the quantum system.

Once a problem has been constructed we can use any of the available algorithms (ADGRAPE, GRAPE and dCRAB) to solve the problem. Using multiple dispatch the solver should then get to work.

using QuantumInformation # provides Pauli matrices for example

ρinit = [1.0 0.0]' * [1.0 0.0 + 0im]
ρfin = [0.0 1.0]' * [0.0 1.0 + 0im]


prob = Problem(
    B = [sx, sy],
    A = [0.0 * sz],
    Xi = [ρ1],
    Xt = [ρt],
    T = 1.0,
    n_controls = 2,
    guess = rand(2, 10),
    sys_type = StateTransfer()
)

sol = solve(prob)

And in this case our chosen algorithm, the approximate GRAPE algorithm, will solve the problem automatically, there's no need to define anything else!

Now we can visualise the output pulse:

visualise_pulse(sol.opti_pulses, duration = prob.T)

Bar plot of pulse amplitudes

Installation

Using Julia's package manager QuOptimalControl.jl is easy to install and use!

] add https://github.com/alastair-marshall/QuOptimalControl.jl

Available Algorithms

Currently the package supports both an analytical gradient based GRAPE optimiser, a new automatic differentiation based version of GRAPE (using Zygote) and a dCRAB (gradient free optimiser). For the defined problem types within the package (ClosedStateTransfer, UnitarySynthesis, OpenSystemCoherenceTransfer, ExperimentInterface) there are several predefined solver methods to make it easy to construct and solve common problems.