This code is a proof of concept designed to solve a minimal-time transfer problem on the special unitary group
This code is written in the JAX ecosystem using Python version 3.14.0. The solver is based on a natural gradient descent in the discretize-then-optimize paradigm, also known as direct method.
Open the terminal and run
git clone https://github.com/killianlutz/pyMagicarp.git
Create and activate a new virtual environment
python -m venv magicarp
source magicarp/bin/activate
Install the required packages
pip install -r requirements.txt
Run the optimizer
python -m scripts.main
This creates or overwrites the file ./sims/example.npz to store both the target gate and the optimal control.
We are given
subject to the constraint that the solution
starting at
Caveats: at the moment, the solver only solves for a control
Feel free to reach out to me: Killian Lutz.