Code Monkey home page Code Monkey logo

quantumcollocation.jl's Introduction

QuantumCollocation.jl

Documentation Build Status Support Paper License
Dev Build Status Coverage Unitary Fund arXiv License: MIT

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 paper Direct Collocation for Quantum Optimal Control.

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.

⚠️ Notice ⚠️

This package is under active development and issues may arise -- please be patient and report any issues you find!

Installation

QuantumCollocation.jl is registered! To install:

using Pkg
Pkg.add(QuantumCollocation)

Examples

Single Qubit X-Gate

See the example script examples/scripts/single_qubit_gate.jl, which produces the following plot:

Single Qubit X-Gate

Development Guidelines

Documentation

Documentation is built using Documenter.jl and uses Literate.jl to generate markdown files from scripts stored in docs/literate. To build the documentation locally, start julia with the docs environment:

julia --project=docs

Then (for ease of development) load the following packages:

using Revise, LiveServer, QuantumCollocation

To live-serve the docs, run

servedocs(literate_dir="docs/literate", skip_dir="docs/src/generated")

Changes made to files in the docs directory should be automatically reflected in the live server. To reflect changes in the source code (e.g. doc strings), since we are using Revise, simply kill the live server running in the REPL (with, e.g., Ctrl-C) and restart it with the above command.

TODO:

Documentation:

  • cross-referencing to library
  • notation explanation
  • examples
    • two-qubit
    • cat qubit
    • three-qubit
    • qubit-cavity
    • qubit-cavity-qubit
  • contributing guidelines

Functionality:

  • custom QuantumTrajectory types (repr. of isomorphic states)
  • better quantum system constructors (e.g. storing composite system info)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.