A Python package for computing optimal quantum control pulses using the geodesic approach.
Project description
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:
ControlModelPulseControlDynamicsGeodesiQErrorand the typed exception hierarchyGeodesiQWarningand 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4b791552a037869ef0409e4c2f40fdde76799a642f68ec8973f7a49bba4fe5
|
|
| MD5 |
16d7ecff9ad142138df6b2603ebbf2f2
|
|
| BLAKE2b-256 |
d7b96c7d36d65e344a87b33d29a13d95a9a2d3513d7d06ce4520cc9d01502247
|
Provenance
The following attestation bundles were made for geodesiq-0.1.1.tar.gz:
Publisher:
publish.yml on geodesiq-control/geodesiq-control
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geodesiq-0.1.1.tar.gz -
Subject digest:
9c4b791552a037869ef0409e4c2f40fdde76799a642f68ec8973f7a49bba4fe5 - Sigstore transparency entry: 2138859474
- Sigstore integration time:
-
Permalink:
geodesiq-control/geodesiq-control@9ef9fe58e5b49ad2fd351e16c4e5fe1bf41f7f95 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/geodesiq-control
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ef9fe58e5b49ad2fd351e16c4e5fe1bf41f7f95 -
Trigger Event:
workflow_run
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d1be5e1ef9064015f1123c6e1e875a0b53b6e3ca3b8bebe66c3ba16f6127223
|
|
| MD5 |
018ecebd5c95745ba8244f173e3fa0d5
|
|
| BLAKE2b-256 |
7eb904924b8b9727089ede3fba95f06645be8e69c9582a40a7079c0834eb95d1
|
Provenance
The following attestation bundles were made for geodesiq-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on geodesiq-control/geodesiq-control
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geodesiq-0.1.1-py3-none-any.whl -
Subject digest:
1d1be5e1ef9064015f1123c6e1e875a0b53b6e3ca3b8bebe66c3ba16f6127223 - Sigstore transparency entry: 2138859479
- Sigstore integration time:
-
Permalink:
geodesiq-control/geodesiq-control@9ef9fe58e5b49ad2fd351e16c4e5fe1bf41f7f95 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/geodesiq-control
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ef9fe58e5b49ad2fd351e16c4e5fe1bf41f7f95 -
Trigger Event:
workflow_run
-
Statement type: