GOAT.ControllableSystemMethod
ControllableSystem(drift_op, basis_ops, c_func, ∂c_func)

Instantiate a ControllableSystem struct from input operators and functions.

The basis_ops is a vector of basis operators which will be weighted by the coefficient functions c_func. ∂c_func computes the first derivative of c_func evaluated at an input.

source
GOAT.ControllableSystemMethod
ControllableSystem(drift_op, basis_ops, RF_generator::Eigen, c_func, ∂c_func; <keyword arguments>)

Instantiate a ControllableSystem struct with a specified RF_generator.

The RF_generator is a specification of the time-independent generator of the rotating reference frame. i.e., if $∂V(t)=A*V(t)$ where A is the generator of type $LinearAlgebra.Diagonal$.

Keyword Arguments

  • sparse_tol::Float: A tolerance which defines a threshold to discard matrix elements
source
GOAT.ControllableSystemMethod
ControllableSystem(drift_op, basis_ops, RF_generator::Eigen, c_func, ∂c_func; <keyword arguments>)

Instantiate a ControllableSystem struct with a specified RF_generator.

The RF_generator is a specification of the time-independent generator of the rotating reference frame. i.e., if $∂V(t)=A*V(t)$ where A is the generator of type $Eigen$.

Keyword Arguments

  • sparse_tol::Float: A tolerance which defines a threshold to discard matrix elements
source
GOAT.ControllableSystemMethod
ControllableSystem(drift_op, basis_ops, RF_generator::Matrix, c_func, ∂c_func; <keyword arguments>)

Instantiate a ControllableSystem struct with a specified RF_generator.

The RF_generator is a specification of the time-independent generator of the rotating reference frame. i.e., if $∂V(t)=A*V(t)$ where A is the generator of type $Matrix$.

Keyword Arguments

  • sparse_tol::Float: A tolerance which defines a threshold to discard matrix elements
source
GOAT.QOCParametersMethod
QOCParameters(ODE_options,SE_reduce_map, GOAT_reduce_map, optim_alg, optim_options; <keyword arguments> )

Instantiate a QOCParameters struct with specified parameters.

Arguments

  • ODE_options::NamedTuple: The settings that will be input to the ODE solver.
  • SE_reduce_map::Function: A function mapping the output from the Schrodinger equation to the objective value.
  • GOAT_reduce_map::Function: A function mapping the output from the GOAT E.O.M.s to the objective value and gradient.
  • optim_alg::Optim Algorithm: The specific optimization algorithm specified via Optim.jl
  • optim_options::Optim options: The optimization algorithm options specified via Optim.jl
source
GOAT.QOCProblemMethod
QOCProblem(target, control_time, Pc, Pa)

Instantiate a QOCProblem struct with specified input operators and control time.

Arguments

  • target::Array{ComplexF64}: the target unitary operator in the computational subspace.
  • control_time::Float64: The duration of the control.
  • Pc::Array{ComplexF64}: A projector from the full unitary operator on the system to the computational subspace
  • Pa::Array{ComplexF64}: A projector from the full unitary operator on the system to any ancillary subspace
source
GOAT.GOAT_action!Method
GOAT_action!(du, u, p, t, d_ms, d_ls, d_vs, c_ms, c_ls, c_vs, opt_param_inds, c_func, ∂c_func)

Compute the action of the GOAT equation of motions on a matrix u and place in du.

Arguments

  • du::Array{ComplexF64}: The array for the derivative t
  • u::Array{ComplexF64}: The array for the state at time t
  • p::Vector{Float64}: The parameter vector defining the evolution.
  • t::Float64: The time.
  • d_ms::Vector{Vector{Int64}}: The sparse representation of the drift operator's first index.
  • d_ls::Vector{Vector{Int64}}: The sparse representation of the drift operators's second index.
  • d_vs::Vector{Vector{ComplexF64}}: The sparse representation of the mtrix element of the drift operator.
  • c_ms::Vector{Vector{Int64}}: The sparse representation of the control operators' first index.
  • c_ls::Vector{Vector{Int64}}: The sparse representation of the control operators' second index.
  • c_vs::Vector{Vector{ComplexF64}}: The sparse representation of the mtrix element of the control operators.
  • opt_param_inds::Vector{Int64}: The indices of the parameter vector p to propogate a derivative for
  • c_func::Function: The function that computes the time-dependent coefficients of the control operators.
  • ∂c_func::Function: The function that computes the derivative of the time-dependent coefficients of the control operators.
source
GOAT.GOAT_infidelity_reduce_mapMethod
GOAT_infidelity_reduce_map(sys, prob, goat_sol)

Maps the GOAT ODE solution to the objective function and gradient vector using an infidelity measure.

Arguments

  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The QOCProblem
  • goat_sol::OrdinaryDiffEq.solution: The solution to the GOAT equations of motion.
source
GOAT.L1Method
L1(U, P1, P2)

Computes the instantaneous population transferred from between two subspaces.

P1 and P2 are projectors onto subspaces 1 and 2.

source
GOAT.LOMethod
LO(t,w)

Simulates a local oscillator with frequency w.

source
GOAT.NoDiffControllableSystemMethod
NoDiffControllableSystem(drift_op, basis_ops, c_func)

Instantiate a ControllableSystem struct with no specified ∂c_func.

The basis_ops is a vector of basis operators which will be weighted by the coefficient functions c_func.

source
GOAT.SMethod
S(x, lower, upper ; gradient=1)

A saturation function that limits amplitudes to a particular range specified by [lower,upper].

source
GOAT.SE_action!Method
SE_action!(du, u, p, t, d_ms, d_ls, d_vs, c_ms, c_ls, c_vs, c_func)

Compute the action of the Schrodinger equation on a matrix u and place in du.

Arguments

  • du::Array{ComplexF64}: The array for the derivative t
  • u::Array{ComplexF64}: The array for the state at time t
  • p::Vector{Float64}: The parameter vector defining the evolution.
  • t::Float64: The time.
  • d_ms::Vector{Vector{Int64}}: The sparse representation of the drift operator's first index.
  • d_ls::Vector{Vector{Int64}}: The sparse representation of the drift operators's second index.
  • d_vs::Vector{Vector{ComplexF64}}: The sparse representation of the mtrix element of the drift operator.
  • c_ms::Vector{Vector{Int64}}: The sparse representation of the control operators' first index.
  • c_ls::Vector{Vector{Int64}}: The sparse representation of the control operators' second index.
  • c_vs::Vector{Vector{ComplexF64}}: The sparse representation of the mtrix element of the control operators.
  • c_func::Function: The function that computes the time-dependent coefficients of the control operators.
source
GOAT.SE_infidelity_reduce_mapMethod
SE_infidelity_reduce_map(sys, prob, SE_sol)

Maps Schrodinger ODE solution to the objective function using an infidelity measure.

Arguments

  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The QOCProblem
  • SE_sol::OrdinaryDiffEq.solution: The solution to the Schrodinger equation.
source
GOAT.colored_noiseMethod
colored_noise(lf, hf, n, alpha, seed)

Generate a set of amplitude, frequencies, and phases for randomly generated colored noise.

Specifically, generates colored noise with P(ω) ∝ ωᵅ

Arguments

  • lf: The low frequency cutoff.
  • hf: The high frequency cutoff.
  • n: The number of frequncy components.
  • alpha: The color of the noise.
source
GOAT.dSdxMethod
dSdx(x, lower, upper; gradient=1)

Calculates the partial derivative of the saturation function w.r.t the independent variable x.

source
GOAT.evaluate_objectiveMethod
evaluate_objective(p, sys, prob, params)

Evaluate the objective function at p.

Arguments:

  • p: The optimal control parameters at which to evalute the objective.
  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The quantum optimal control problem.
  • param::QOCParameters: The quantum optimal control parameters.
source
GOAT.evaluate_objectiveMethod
evaluate_objective(ps, sys, prob, params)

Parallelized evaluation the objective function at multiple control parameters.

Arguments:

  • ps::Vector{Vector{Float64}}: The optimal control parameters at which to evalute the objective.
  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The quantum optimal control problem.
  • param::QOCParameters: The quantum optimal control parameters.
source
GOAT.find_optimal_controlsMethod
find_optimal_controls(p0, opt_param_inds, sys, prob, params)

Run the GOAT algorithm and find optimal controls.

Arguments:

  • p0: The initial guess of the optimal control parameters.
  • opt_param_inds: Indices of p0 which specify which parameters to hold constant and which to optimize.
  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The quantum optimal control problem.
  • param::QOCParameters: The quantum optimal control parameters.
source
GOAT.find_optimal_controlsMethod
find_optimal_controls(p0, sys, prob, params)

Run the GOAT algorithm and find optimal controls.

Arguments:

  • p0: The initial guess of the optimal control parameters.
  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The quantum optimal control problem.
  • param::QOCParameters: The quantum optimal control parameters.
source
GOAT.flat_top_cosineMethod
flat_top_cosine(t, A, T, tr)

A flat-top cosine function kernel.

Arguments

  • A: The amplitude of the function.
  • T: Duration of the function.
  • tr: The rise and fall time.
source
GOAT.fourier_coefficientMethod
fourier_coefficient(p,t,i,N)

Compute the time dependent coefficient for a control basis operator given by a Fourier ansatze.

Arguments

  • p: The vector of control parameters.
  • t: The time at which to evaluate the coefficient function.
  • i: The index of the control basis operator.
  • N: The total number of basis functions used to define the coefficient function.
source
GOAT.g_absMethod
g_abs(V, U)

Computes the norm of the difference between V and U.

source
GOAT.g_realMethod
g_real(V, ∂U)

Computes infidelity based on the real component of the overlap between V and U.

source
GOAT.g_smMethod
g_sm(V, ∂U)

Computes infidelity via the squared modulus of the overlap between V and U.

This definition is perhaps the most standard used for quantum optimal control of unitaries.

source
GOAT.gaussian_coefficientMethod
gaussian_coefficient(p,t,i,N)

Compute the time dependent coefficient for a control basis operator given by a gaussian ansatze.

Arguments

  • p: The vector of control parameters.
  • t: The time at which to evaluate the coefficient function.
  • i: The index of the control basis operator.
  • N: The total number of basis functions used to define the coefficient function.
source
GOAT.general_logisticFunction
general_logistic(t, lower, upper, slope, start, nu)

A version of a generalized logistic function found on wikipedia: https://en.wikipedia.org/wiki/Generalisedlogisticfunction.

Arguments

  • t: The time.
  • lower: The lower asymptote.
  • upper: The upper asymptote.
  • slope : The slope of the function.
  • start = 1e3: A shift of the logistic function to adjust general_logistic(t=0).
  • nu = 1.0: A parameter to set where the maximum derivative is located.
source
GOAT.get_sinusoidal_basis_parametersMethod
get_sinusoidal_basis_parameters(ts, s)

Compute the sinusoidal amplitude, frequencies, and phases of a signal.

Outputs a triplet of: Amps, freqs, phases via the decomposition: $s(t) = ∑ᵢ aᵢ sin(ωᵢt+ϕᵢ)$.

Arguments

  • ts: the sampling times
  • s: the signal at each sampling time
source
GOAT.h_smMethod
h_sm(Us,Pc,Pd,ts)

Computes the total population transferred from between two subspaces during the control time.

source
GOAT.make_GOAT_update_functionMethod
make_GOAT_update_function(sys,opt_param_inds)

Generate an in-place update function f!(du,u,p,t) for the GOAT equations of motion equation.

Arguments

  • sys::ControllableSystem: The controllable system.
  • opt_param_inds::Vector{Int64}: A vector of indices that specifies which control derivatives will be propogated.
source
GOAT.make_SE_update_functionMethod
make_SE_update_function(sys)

Generate an in-place update function f!(du,u,p,t) for the Schrodinger equation based on sys.

Arguments

  • sys::ControllableSystem: The controllable system
source
GOAT.morlet_kernelMethod
morlet_kernel(t, a, mu, sigma, w, phi)

Morlet wavelet kernel (although not a true wavelet because it is not normalized).

Effectively a gaussian-windowed sinusoid function.

source
GOAT.parallel_GOAT_fg!Method
parallel_GOAT_fg!(F, G, p, p_storage, opt_param_inds, sys, prob, params)

Parallelized computation of the objective and gradient for QOC with GOAT.

Arguments

  • F: The objective value
  • G: The vector of gradients w.r.t. the control parameters p.
  • p: The control parameter vector.
  • p_storage: A pre-allocated storage vector for current p values.
  • opt_param_inds: The vector of parameter indices which determines which gradients are calculated.
  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The QOCProblem
  • param::QOCParameters: The QOCParameters.
source
GOAT.parallel_GOAT_fg!Method
parallel_GOAT_fg!(F, G, p, sys, prob, params)

Parallelized computation of the objective and gradient for QOC with GOAT.

Arguments

  • F: The objective value
  • G: The vector of gradients w.r.t. the control parameters p.
  • p: The control parameter vector.
  • sys::ControllableSystem: The controllable system.
  • prob::QOCProblem: The QOCProblem
  • param::QOCParameters: The QOCParameters.
source
GOAT.poly_coefficientMethod
poly_coefficient(p,t,i,N)

Compute the time dependent coefficient for a control basis operator given by a polynomial ansatze.

Arguments

  • p: The vector of control parameters.
  • t: The time at which to evaluate the coefficient function.
  • i: The index of the control basis operator.
  • N: The total number of basis functions used to define the coefficient function.
source
GOAT.solve_GOAT_eomsMethod
solve_GOAT_eoms(sys, opt_param_inds, Tmax, p; <keyword arguments>)

Integrate the Schrodinger equation for a specified time and control parameter set.

Arguments

  • sys::ControllableSystem: The controllable system.
  • opt_param_inds::Vector{Int64}: The vector of parameter indices specifying which gradients will be propogated.
  • Tmax::Float64: The total contorl time.
  • p::Vector{Float64}: The parameters which define the controlled evolution.
  • ODE_options: The specification of the integrator settings from OrdinaryDiffEq.jl
source
GOAT.solve_GOAT_eoms_reduceMethod
solve_GOAT_eoms_reduce(p, sys, prob, opt_param_inds, params::QOCParameters)

Solves the GOAT eoms and outputs a objective function and gradient vector.

Arguments

  • p: The control parameter vector at which the objective and gradient is being calculated.
  • sys::ControllableSystem: The controllable system.
  • opt_param_inds: The vector of parameter indices which determines which gradients are calculated.
  • param::QOCParameters: The QOCParameters which provides the ODE_options.
source
GOAT.solve_SEMethod
solve_SE(sys, Tmax, p; <keyword arguments>)

Integrate the Schrodinger equation for a specified time and control parameter set.

Arguments

  • sys::ControllableSystem: The controllable system.
  • Tmax::Float64: The total contorl time.
  • p::Vector{Float64}: The parameters which define the controlled evolution.
  • ODE_options: The specification of the integrator settings from OrdinaryDiffEq.jl
source
GOAT.test_derivativesMethod
test_derivatives(sys, prob, params, opt_param_inds, p_test; <keyword arguments>)

Uses a finite difference method to confirm that gradients are calculated correctly.

If only_coefficeint_funcs=true then only the coefficient functions are checked. If only_coefficeint_funcs=false then the GOAT equations of motion are solved and unitary gradients are checked too.

Arguments

  • sys: The ControllableSystem.
  • prob: The QOCProblem.
  • params: The QOCParameters.
  • dh=1e-8: The finite-difference step size of each parameter.
  • tol=1e-5: The tolerance that determines whether an error is raised.
  • only_coefficeint_funcs=true: Specifies if checking gradients of coefficients or unitaries.
source
GOAT.time_domain_signalMethod
time_domain_signal(t::Float64, amps, freqs, phases, N)

Compute a truncated inverse fourier transform at time t.

The signal $s(t)$ is reconstructed via the function $s(t) = ∑ᵢ aᵢ cos(ωᵢt+ϕᵢ)$

Arguments

  • t: The time to evaluate the inverse FFT.
  • amps: The amplitudes.
  • freqs: The frequencies.
  • phases: The phases.
  • N: The number of components to keep when reconstructing the signal.
source
GOAT.time_domain_signalMethod
time_domain_signal(t::Float64, amps, freqs, phases)

Compute a truncated inverse fourier transform at time t.

The signal $s(t)$ is reconstructed via the function $s(t) = ∑ᵢ aᵢ sin(ωᵢt+ϕᵢ)$

Arguments

  • t: The time to evaluate the inverse FFT.
  • Aks: The amplitudes.
  • freqs: The frequencies.
  • phi_ks: The phases.
source
GOAT.windowFunction
window(x,lower,upper,gradient)

A windowing function based on a product of two generalized logistic functions.

See general_logistic for additional details.

Arguments

  • lower: The location of the left tail.
  • right: The location of the right tail.
  • gradient: The maximum gradient of the logistic functions
source
GOAT.∂fourier_coefficientMethod
∂fourier_coefficient(p,t,i,l,N)

Computes the partial derivative of fourier_coefficient w.r.t p[l] evaluated at (p,t).

Arguments

  • p: The vector of control parameters.
  • t: The time at which to evaluate the coefficient function.
  • i: The index of the control basis operator.
  • l: The index of the p with which to compute the partial derivative to.
  • N: The total number of basis functions used to define the coefficient function.
source
GOAT.∂g_absMethod
∂g_abs(V, ∂U)

Computes the partial derivative of g_abs w.r.t U evaluated at ∂U

source
GOAT.∂g_realMethod
∂g_real(V, ∂U)

Computes the partial derivative of g_real w.r.t U evaluated at ∂U.

source
GOAT.∂g_smMethod
∂g_sm(V, ∂U)

Computes the partial derivative of g_sm w.r.t U evaluated at ∂U.

source
GOAT.∂gaussian_coefficientMethod
∂gaussian_coefficient(p,t,i,l,N::Int64)

Computes the partial derivative of fourier_coefficient w.r.t p[l] evaluated at (p,t).

Arguments

  • p: The vector of control parameters.
  • t: The time at which to evaluate the coefficient function.
  • i: The index of the control basis operator.
  • l: The index of the p with which to compute the partial derivative to.
  • N: The total number of basis functions used to define the coefficient function.
source
GOAT.∂h_smMethod
∂h_sm(Us,∂Us,I1,I2,ts)

Computes the partial derivative of h_sm w.r.t. U evaluated at ∂U

source
GOAT.∂poly_coefficientMethod
∂poly_coefficient(p,t,i,l,N)

Computes the partial derivative of fourier_coefficient w.r.t p[l] evaluated at (p,t).

Arguments

  • p: The vector of control parameters.
  • t: The time at which to evaluate the coefficient function.
  • i: The index of the control basis operator.
  • l: The index of the p with which to compute the partial derivative to.
  • N: The total number of basis functions used to define the coefficient function.
source