geope.jax.dexpm¤
geope.jax.dexpm.Ui(x, basis)
¤
Compute a unitary from a linear combination of Hermitian basis matrices.
Constructs \(U = \exp(i \sum_k x_k B_k)\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
Coefficient vector of shape |
required |
basis
|
Array
|
Array of Hermitian matrices of shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A unitary matrix of shape |
geope.jax.dexpm.get_Ui_fn(basis)
¤
Create a partial unitary function with a fixed basis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
basis
|
Array
|
Array of Hermitian matrices of shape |
required |
Returns:
| Type | Description |
|---|---|
Callable[[Array], Array]
|
A callable that accepts a coefficient vector and returns |
Callable[[Array], Array]
|
the corresponding unitary matrix. |
geope.jax.dexpm.dexpm_block(A, x)
¤
Compute the derivative of the matrix exponential via the block method.
Implements the block-matrix approach of
Al-Mohy & Higham (2009) <https://arxiv.org/pdf/1506.00628>_,
Eq. (31), extracting \(d\exp(iA)/dA \cdot x\) from the upper-right
block of \(\exp(i[[A, x], [0, A]])\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
Array
|
The Hamiltonian matrix of shape |
required |
x
|
Array
|
The direction matrix of shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The directional derivative matrix of shape |
geope.jax.dexpm.dexpm(x, basis)
¤
Compute the derivative of the exponential map for all basis directions.
For each basis element \(B_k\), computes \(\partial \exp(i \sum_j x_j B_j) / \partial x_k\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
Coefficient vector of shape |
required |
basis
|
Array
|
Array of Hermitian matrices of shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of shape |
Array
|
partial derivatives with respect to each coefficient. |
geope.jax.dexpm.dexpm_batched(x, basis, batch_size)
¤
Batched derivative of the exponential map.
Same as dexpm but uses jax.lax.map with a configurable
batch_size to limit peak memory usage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
Coefficient vector of shape |
required |
basis
|
Array
|
Array of Hermitian matrices of shape |
required |
batch_size
|
int
|
Number of basis elements to process per batch. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of shape |
geope.jax.dexpm.get_dexpm(basis, batch_size=None)
¤
Create a JIT-compiled exponential-map derivative function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
basis
|
Array
|
Array of Hermitian matrices of shape |
required |
batch_size
|
int | None
|
Optional batch size. If |
None
|
Returns:
| Type | Description |
|---|---|
Callable[[Array], Array]
|
A callable that accepts a coefficient vector and returns |
Callable[[Array], Array]
|
the derivative array of shape |