omnibias.qcalculus.jax.hybrid
q-numbers, Jackson derivatives and integrals, q-series, and the ordinary-calculus limit as q approaches one.
import omnibias.qcalculus.jax.hybridModule contract & mathematical conventions
q-OMBU hybrid (jax; theory 09-15).
Named q -> 1 is not founding bias collapse (delta -> 0) and
not temperature collapse (beta -> inf, feasibility). Ordinary
sigma cells still use founding bias collapse. do not conflate
the two.
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.
Imports & aliases
These names share a definition with another public module. Follow a name for its full contract, parameters, and examples.
| Import from this module | Canonical reference |
|---|---|
QOMBUConfig | omnibias.qcalculus.QOMBUConfig |
DISCLAIMER
omnibias.qcalculus.jax.hybrid.DISCLAIMERSource ↗DISCLAIMER = 'q-OMBU hybrid: named q -> 1 limit, not founding bias collapse, not temperature collapse, and not a continuum PDE'This exported constant is defined by the expression above. Its exact value and annotation come from the pinned source; use it with the module contract.
Regression example · g3 honesty
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_g3_honesty() -> None:
payload = honesty_payload()
assert payload["continuum_claimed_from_q_limit"] is False
assert payload["theorem_prover_verified"] is False
assert "not founding bias collapse" in DISCLAIMERpython -m pytest packages/omnibias-qcalculus/tests/test_hybrid.py -k test_g3_honesty -qRead the implementation
DISCLAIMER = (
"q-OMBU hybrid: named q -> 1 limit, not founding bias collapse, "
"not temperature collapse, and not a continuum PDE"
)Other public import paths
omnibias.qcalculus.jax.hybrid.DISCLAIMERomnibias.qcalculus.torch.hybrid.DISCLAIMER
honesty_payload
omnibias.qcalculus.jax.hybrid.honesty_payloadSource ↗honesty_payload() -> dict[str, bool]The module contract describes the context for this operation. Its signature, explicit validation, return expressions, and implementation are recorded below.
dict[str, bool]Executed regression · g3 honesty
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_g3_honesty() -> None:
payload = honesty_payload()
assert payload["continuum_claimed_from_q_limit"] is False
assert payload["theorem_prover_verified"] is False
assert "not founding bias collapse" in DISCLAIMERpython -m pytest "packages/omnibias-qcalculus/tests/test_hybrid.py::test_g3_honesty" -qRead the implementation
def honesty_payload() -> dict[str, bool]:
return {
"continuum_claimed_from_q_limit": False,
"stretch_claim": False,
"theorem_prover_verified": False,
}Other public import paths
omnibias.qcalculus.jax.hybrid.honesty_payloadomnibias.qcalculus.torch.hybrid.honesty_payload
q_ombu_forward
omnibias.qcalculus.jax.q_ombu_forwardSource ↗q_ombu_forward(x: Array, params: Sequence[float] | None=None, *, config: QOMBUConfig | None=None) -> tuple[Array, Array]Returns (y, limit_residual).
Parameters
| Name | Type & default | Contract |
|---|---|---|
xpositional-or-keyword | ArrayRequired | See the operation contract and implementation below. |
paramspositional-or-keyword | Sequence[float] | NoneDefault: None | See the operation contract and implementation below. |
configkeyword-only | QOMBUConfig | NoneDefault: None | See the operation contract and implementation below. |
tuple[Array, Array]Regression example · g4 bit identical
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_g4_bit_identical() -> None:
torch.set_default_dtype(torch.float64)
assert torch_ex()["y"] == jax_ex()["y"]
t_y, t_r = torch_fwd(torch.tensor(2.0))
j_y, j_r = jax_fwd(jnp.asarray(2.0))
assert float(t_y) == float(j_y)
assert float(t_r) == float(j_r)python -m pytest tests/test_q_ombu_parity.py -k test_g4_bit_identical -qRead the implementation
def q_ombu_forward(
x: Array,
params: Sequence[float] | None = None,
*,
config: QOMBUConfig | None = None,
) -> tuple[Array, Array]:
"""Returns ``(y, limit_residual)``."""
arr = jnp.asarray(x)
y, residual = core.q_ombu_forward(float(arr.reshape(-1)[0]), params, config=config)
return jnp.asarray(y, dtype=arr.dtype), jnp.asarray(residual, dtype=arr.dtype)Other public import paths
omnibias.qcalculus.jax.q_ombu_forwardomnibias.qcalculus.jax.hybrid.q_ombu_forward
worked_example
omnibias.qcalculus.jax.hybrid.worked_exampleSource ↗worked_example() -> dict[str, float]The module contract describes the context for this operation. Its signature, explicit validation, return expressions, and implementation are recorded below.
dict[str, float]Regression example · g4 bit identical
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_g4_bit_identical() -> None:
torch.set_default_dtype(torch.float64)
assert torch_ex()["y"] == jax_ex()["y"]
t_y, t_r = torch_fwd(torch.tensor(2.0))
j_y, j_r = jax_fwd(jnp.asarray(2.0))
assert float(t_y) == float(j_y)
assert float(t_r) == float(j_r)python -m pytest tests/test_q_ombu_parity.py -k test_g4_bit_identical -qRead the implementation
def worked_example() -> dict[str, float]:
return core.worked_example()