Documentation |
Build Status |
Support |
Paper |
License |
![Dev](https://camo.githubusercontent.com/7cbc77d856c315d21c914ed59db57075cfe72fba990b92067b2c96132188c50e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6465762d626c75652e737667) |
![Coverage](https://camo.githubusercontent.com/c78cc4431d7a318300a7c0ac24aa6bca02d6f631b588c3eb0cfa9e3b44864dfd/68747470733a2f2f636f6465636f762e696f2f67682f6161726f6e74726f776272696467652f5175616e74756d436f6c6c6f636174696f6e2e6a6c2f6272616e63682f6d61696e2f67726170682f62616467652e737667) |
![Unitary Fund](https://camo.githubusercontent.com/388f35cbbdb4b90b175e5e0a35f427b0878ce567519e71f01d1d3102ed776301/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537570706f7274656425323042792d556e697461727925323046756e642d4646464630302e737667) |
![arXiv](https://camo.githubusercontent.com/7dd0bf0b31986a11d7fa30a2c1cd774b6cb67ffabc680890a9be0450f5d05c39/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f61725869762d323330352e30333236312d6233316231622e737667) |
![License: MIT](https://camo.githubusercontent.com/a4426cbe5c21edb002526331c7a8fbfa089e84a550567b02a0d829a98b136ad0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667) |
QuantumCollocation.jl uses NamedTrajectories.jl to set up and solve direct collocation problems specific to quantum optimal control, i.e. generating a pulse sequence $a_{1:T-1}$ to drive a quantum system and realize a target gate $U_{\text{goal}}$. We formulate this problem as a nonlinear program (NLP) of the form
$$\begin{aligned}
\underset{U, a, \Delta t}{\text{minimize}} & \quad \ell(U_T, U_{\text{goal}})\\\
\text{ subject to } & \quad U_{t+1} = \exp(-i \Delta t H(a_t)) U_t
\end{aligned}$$
Where the dynamics between knot points $(U_t, a_t)$ and $(U_{t+1}, a_{t+1})$ are enforced as constraints on the states which are free variables in the solver; this optimization framework is called direct collocation. For details of our implementation please see our award-winning IEEE QCE 2023 paper, Direct Collocation for Quantum Optimal Control. If you use QuantumCollocation.jl in your work, please cite 🙌!
QuantumCollocation.jl gives the user the ability to add other constraints and objective functions to this problem and solve it efficiently using Ipopt.jl and MathOptInterface.jl under the hood.
This package is under active development and issues may arise -- please be patient and report any issues you find!
QuantumCollocation.jl is registered! To install:
using Pkg
Pkg.add(QuantumCollocation)
See the example script examples/scripts/single_qubit_gate.jl, which produces the following plot:
![Single Qubit X-Gate](https://raw.githubusercontent.com/aarontrowbridge/QuantumCollocation.jl/main/images/T_100_Q_1000_iter_1000_00004_fidelity_0.9999999999994745.png)