Skip to content

harmoniqs/QuantumCollocation.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation
Stable Dev arXiv
Build Status
Build Status Coverage
License
MIT License
Support
Unitary Fund
Quickly set up and solve problem templates for quantum optimal control

QuantumCollocation.jl

QuantumCollocation.jl sets up and solves quantum control problems as nonlinear programs (NLPs). In this context, a generic quantum control problem looks like

$$\begin{aligned} \arg \min_{\mathbf{Z}}\quad & J(\mathbf{Z}) \\\ \nonumber \text{s.t.}\qquad & \mathbf{f}(\mathbf{Z}) = 0 \\\ \nonumber & \mathbf{g}(\mathbf{Z}) \le 0 \end{aligned}$$

where $\mathbf{Z}$ is a trajectory containing states and controls, from NamedTrajectories.jl.

For details of our implementation please see our IEEE QCE 2023 paper, Direct Collocation for Quantum Optimal Control. If you use QuantumCollocation.jl in your work, please cite 🙌!

Installation

This package is registered! To install, enter the Julia REPL, type ] to enter pkg mode, and then run:

pkg> add QuantumCollocation

Example

Single Qubit Hadamard Gate

using QuantumCollocation

T = 50
Δt = 0.2
system = QuantumSystem([PAULIS[:X], PAULIS[:Y]])
U_goal = GATES.H

# Hadamard Gate
prob = UnitarySmoothPulseProblem(system, U_goal, T, Δt)
solve!(prob, max_iter=100)