omnibias.fields.jax.ops.complex
Structured scalar, vector, and tensor fields with derivative caches, calculus operators, and coordinate conventions.
import omnibias.fields.jax.ops.complexModule contract & mathematical conventions
Complex (Wirtinger) calculus on a split-real field (jax).
Bit-identical twin of omnibias.fields.torch.ops.complex.
Shared formulas do not imply universal floating-point identity. Verify dtype, shape, derivative-order support, and the stated numerical assumptions for the path you use.
FUNCTION
dz
omnibias.fields.jax.ops.dzSource ↗dz(state: FieldState, re_name: str, im_name: str, *, real_axis: int | str='x', imag_axis: int | str='y') -> tuple[Array, Array]\partial_z f as a (real, imag) pair.
Parameters
| Name | Type & default | Contract |
|---|---|---|
statepositional-or-keyword | FieldStateRequired | See the operation contract and implementation below. |
re_namepositional-or-keyword | strRequired | See the operation contract and implementation below. |
im_namepositional-or-keyword | strRequired | See the operation contract and implementation below. |
real_axiskeyword-only | int | strDefault: 'x' | See the operation contract and implementation below. |
imag_axiskeyword-only | int | strDefault: 'y' | See the operation contract and implementation below. |
Returns
tuple[Array, Array]Executed regression · wirtinger cross backend
Recorded coverage confirms this test executed the API body. This example belongs to the pinned upstream test suite. It may use fixtures and imports from its full file. Run it from that checkout with its test dependencies installed.
def test_wirtinger_cross_backend(): # type: ignore[no-untyped-def]
from omnibias.fields.jax import _ops_dispatch as jd
from omnibias.fields.jax.ops.complex import dz as jdz
from omnibias.fields.torch import _ops_dispatch as td
from omnibias.fields.torch.ops.complex import dz as tdz
ts = _ExpZField(torch, td)(torch.as_tensor(COORDS, dtype=torch.float64))
js = _ExpZField(jnp, jd)(jnp.asarray(COORDS, dtype=jnp.float64))
tre, tim = tdz(ts, "fR", "fI")
jre, jim = jdz(js, "fR", "fI")
assert np.allclose(_np(tre), _np(jre), rtol=1e-12, atol=1e-12)
assert np.allclose(_np(tim), _np(jim), rtol=1e-12, atol=1e-12)python -m pytest "packages/omnibias-fields/tests/test_wirtinger.py::test_wirtinger_cross_backend" -qRead the implementation
def dz(
state: FieldState,
re_name: str,
im_name: str,
*,
real_axis: int | str = "x",
imag_axis: int | str = "y",
) -> tuple[Array, Array]:
r""":math:`\partial_z f` as a ``(real, imag)`` pair."""
fr_x, fr_y, fi_x, fi_y = _partials(state, re_name, im_name, real_axis, imag_axis)
return 0.5 * (fr_x + fi_y), 0.5 * (fi_x - fr_y)Other public import paths
omnibias.fields.jax.ops.dzomnibias.fields.jax.ops.complex.dz
FUNCTION
dzbar
omnibias.fields.jax.ops.dzbarSource ↗dzbar(state: FieldState, re_name: str, im_name: str, *, real_axis: int | str='x', imag_axis: int | str='y') -> tuple[Array, Array]\partial_{\bar z} f as a (real, imag) pair (zero if holomorphic).
Parameters
| Name | Type & default | Contract |
|---|---|---|
statepositional-or-keyword | FieldStateRequired | See the operation contract and implementation below. |
re_namepositional-or-keyword | strRequired | See the operation contract and implementation below. |
im_namepositional-or-keyword | strRequired | See the operation contract and implementation below. |
real_axiskeyword-only | int | strDefault: 'x' | See the operation contract and implementation below. |
imag_axiskeyword-only | int | strDefault: 'y' | See the operation contract and implementation below. |
Returns
tuple[Array, Array]Read the implementation
def dzbar(
state: FieldState,
re_name: str,
im_name: str,
*,
real_axis: int | str = "x",
imag_axis: int | str = "y",
) -> tuple[Array, Array]:
r""":math:`\partial_{\bar z} f` as a ``(real, imag)`` pair (zero if holomorphic)."""
fr_x, fr_y, fi_x, fi_y = _partials(state, re_name, im_name, real_axis, imag_axis)
return 0.5 * (fr_x - fi_y), 0.5 * (fi_x + fr_y)Other public import paths
omnibias.fields.jax.ops.dzbaromnibias.fields.jax.ops.complex.dzbar