Skip to main content

A Python package for computing optimal quantum control pulses using the geodesic approach.

Project description

Logo

geodesiq: Geometric optimal control

Installation | Example code | Citing geodesiq

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

Installation

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

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.

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.

Development

Use the following checks before submitting changes:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geodesiq-0.1.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geodesiq-0.1.1-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file geodesiq-0.1.1.tar.gz.

File metadata

  • Download URL: geodesiq-0.1.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geodesiq-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c4b791552a037869ef0409e4c2f40fdde76799a642f68ec8973f7a49bba4fe5
MD5 16d7ecff9ad142138df6b2603ebbf2f2
BLAKE2b-256 d7b96c7d36d65e344a87b33d29a13d95a9a2d3513d7d06ce4520cc9d01502247

See more details on using hashes here.

Provenance

The following attestation bundles were made for geodesiq-0.1.1.tar.gz:

Publisher: publish.yml on geodesiq-control/geodesiq-control

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geodesiq-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: geodesiq-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geodesiq-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d1be5e1ef9064015f1123c6e1e875a0b53b6e3ca3b8bebe66c3ba16f6127223
MD5 018ecebd5c95745ba8244f173e3fa0d5
BLAKE2b-256 7eb904924b8b9727089ede3fba95f06645be8e69c9582a40a7079c0834eb95d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for geodesiq-0.1.1-py3-none-any.whl:

Publisher: publish.yml on geodesiq-control/geodesiq-control

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page