Metadata-Version: 2.4
Name: geodesiq
Version: 0.1.1
Summary: A Python package for computing optimal quantum control pulses using the geodesic approach.
Project-URL: Homepage, https://github.com/geodesiq-control/geodesiq-control
Project-URL: Documentation, https://github.com/geodesiq-control/geodesiq-control/tree/main/docs
Project-URL: Repository, https://github.com/geodesiq-control/geodesiq-control
Project-URL: Issues, https://github.com/geodesiq-control/geodesiq-control/issues
Project-URL: Changelog, https://github.com/geodesiq-control/geodesiq-control/blob/main/CHANGELOG.md
Author-email: David Fernández Fernández <david.fernandezf@hotmail.com>, Christian Ventura Meinersen <C.VenturaMeinersen@tudelft.nl>
License-Expression: LGPL-2.1-only
License-File: LICENSE
Keywords: geodesic,optimal-control,python,quantum-computing,quantum-control,quantum-dots,spin-qubits,superconducting-qubits,trapped-ions
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: numpy>=1.23
Requires-Dist: qutip>=5.0.4
Requires-Dist: scipy>=1.15
Provides-Extra: plot
Requires-Dist: matplotlib>=3.9; extra == 'plot'
Description-Content-Type: text/markdown

<p align="center">
  <img src="images/geodesiq_logo.png" alt="Logo"/>
</p>

# `geodesiq`: Geometric optimal control

[Installation](#installation) | [Example code](#example-code) | [Citing geodesiq](#citing-geodesiq)

`geodesiq` is a Python package for optimal pulse control of Hamiltonian parameters for generic quantum systems.


[//]: # (# Documentation)

[//]: # (Documentation is available [here]&#40;https://github.com/geodesiq-control/geodesiq-control&#41;.)

# Installation

To install `geodesiq`, you can use the standard Python package installer:

```bash
pip install geodesiq
```

# Example code

Here is an example code based on the two-level Landau-Zener problem $H[z(t)]=z(t)\sigma_z+x \sigma_x$ with control
parameter $z(t)$. To compute the optimal pulse, you define the Hamiltonian and, optionally, its partial
derivative with respect to the control parameter.

```python
import numpy as np
from geodesiq import ControlModel


# ----- Define the Hamiltonian and its derivative -----
def H_fun(x, z):
    return np.array([[z, x], [x, -z]])


def H_partial(x, z):
    return np.array([[1, 0], [0, -1]])


model = ControlModel(H_fun, H_partial)

# ----- Set system and control parameters -----
alpha = 2
beta = 2
x = 1
z0 = -10
zf = -z0

model.set_parameters(x=x)
model.set_control(control_name='z', pulse_initial=z0, pulse_final=zf, initial_state=0, alpha=alpha, beta=beta)

# ----- Solve for optimal pulse -----
model.solve_problem()
```

## Public API

Top-level imports are intentionally kept small and explicit:

- `ControlModel`
- `PulseControl`
- `Dynamics`
- `GeodesiQError` and the typed exception hierarchy
- `GeodesiQWarning` and related warnings
- `__version__`

# Citing `geodesiq`

If you use `geodesiq` in your research, please cite the reference paper available [here](https://github.com/geodesiq-control/geodesiq-control).

## Development

Use the following checks before submitting changes:

```bash
uv run ruff check .
uv run mypy
uv run pytest
uv run python -m build
```