omnibias.keras.activations.trigonometric
Keras 3 operator layers and activation paths implemented with keras.ops for TensorFlow, JAX, or Torch.
import omnibias.keras.activations.trigonometricModule contract & mathematical conventions
Trigonometric & hyperbolic activations for physics-class wavefunctions.
Mirrors omnibias.torch.activations.trigonometric on keras.ops.
sin / cos / sinh / cosh are closed form for every order;
tan / cot / coth for n in {0, 1, 2, 3}; sech for
n in {0, 1, 2, 3}.
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.
COS
omnibias.keras.activations.trigonometric.COSSource ↗COS = register_activation(ActivationSpec(name='cos', forward=_cos_forward, derivative=lambda z: -ops.sin(z), fastpath=_cos_fastpath, integral=lambda z: ops.sin(z), riccati_polynomial=None, noise_model='none', operator_role='Plane-wave / Bloch embedding (real part); cos(z + n*pi/2) gives every order in closed form.'))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.
Read the implementation
COS = register_activation(
ActivationSpec(
name="cos",
forward=_cos_forward,
derivative=lambda z: -ops.sin(z),
fastpath=_cos_fastpath,
integral=lambda z: ops.sin(z),
riccati_polynomial=None,
noise_model="none",
operator_role=(
"Plane-wave / Bloch embedding (real part); cos(z + n*pi/2) "
"gives every order in closed form."
),
)
)COSH
omnibias.keras.activations.trigonometric.COSHSource ↗COSH = register_activation(ActivationSpec(name='cosh', forward=_cosh_forward, derivative=lambda z: ops.sinh(z), fastpath=_cosh_fastpath, integral=lambda z: ops.sinh(z), riccati_polynomial=None, noise_model='none', operator_role='Hyperbolic even primitive; eigenfunction of d^2/dz^2 with eigenvalue +1; alternates with sinh under differentiation.'))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.
Read the implementation
COSH = register_activation(
ActivationSpec(
name="cosh",
forward=_cosh_forward,
derivative=lambda z: ops.sinh(z),
fastpath=_cosh_fastpath,
integral=lambda z: ops.sinh(z),
riccati_polynomial=None,
noise_model="none",
operator_role=(
"Hyperbolic even primitive; eigenfunction of d^2/dz^2 with "
"eigenvalue +1; alternates with sinh under differentiation."
),
)
)COT
omnibias.keras.activations.trigonometric.COTSource ↗COT = register_activation(ActivationSpec(name='cot', forward=_cot_forward, derivative=lambda z: -(1.0 + (1.0 / ops.tan(z)) ** 2), fastpath=_cot_fastpath, integral=lambda z: ops.log(ops.abs(ops.sin(z))), riccati_polynomial=(-1.0, 0.0, -1.0), noise_model='none', operator_role="Riccati-class periodic activation; cot'(z) = -(1 + cot^2(z)); complementary to tan in phase-only ansatze.", aliases=('ctg', 'ctan')))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.
Read the implementation
COT = register_activation(
ActivationSpec(
name="cot",
forward=_cot_forward,
derivative=lambda z: -(1.0 + (1.0 / ops.tan(z)) ** 2),
fastpath=_cot_fastpath,
integral=lambda z: ops.log(ops.abs(ops.sin(z))),
riccati_polynomial=(-1.0, 0.0, -1.0),
noise_model="none",
operator_role=(
"Riccati-class periodic activation; cot'(z) = -(1 + cot^2(z)); "
"complementary to tan in phase-only ansatze."
),
aliases=("ctg", "ctan"),
)
)COTH
omnibias.keras.activations.trigonometric.COTHSource ↗COTH = register_activation(ActivationSpec(name='coth', forward=_coth_forward, derivative=lambda z: 1.0 - (1.0 / ops.tanh(z)) ** 2, fastpath=_coth_fastpath, integral=lambda z: ops.log(ops.abs(ops.sinh(z))), riccati_polynomial=(1.0, 0.0, -1.0), noise_model='none', operator_role="Hyperbolic Riccati: coth'(z) = 1 - coth^2(z); Langevin-like saturation, finite-T NQS amplitude."))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.
Read the implementation
COTH = register_activation(
ActivationSpec(
name="coth",
forward=_coth_forward,
derivative=lambda z: 1.0 - (1.0 / ops.tanh(z)) ** 2,
fastpath=_coth_fastpath,
integral=lambda z: ops.log(ops.abs(ops.sinh(z))),
riccati_polynomial=(1.0, 0.0, -1.0),
noise_model="none",
operator_role=(
"Hyperbolic Riccati: coth'(z) = 1 - coth^2(z); Langevin-like "
"saturation, finite-T NQS amplitude."
),
)
)SECH
omnibias.keras.activations.trigonometric.SECHSource ↗SECH = register_activation(ActivationSpec(name='sech', forward=_sech_forward, derivative=lambda z: -(1.0 / ops.cosh(z)) * ops.tanh(z), fastpath=_sech_fastpath, integral=lambda z: 2.0 * ops.arctan(ops.tanh(0.5 * z)), riccati_polynomial=None, noise_model='none', operator_role='Soliton bound-state amplitude: sech(z) is the Poschl-Teller ground state and the sine-Gordon / KdV / NLS soliton profile.'))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.
Read the implementation
SECH = register_activation(
ActivationSpec(
name="sech",
forward=_sech_forward,
derivative=lambda z: -(1.0 / ops.cosh(z)) * ops.tanh(z),
fastpath=_sech_fastpath,
integral=lambda z: 2.0 * ops.arctan(ops.tanh(0.5 * z)),
riccati_polynomial=None,
noise_model="none",
operator_role=(
"Soliton bound-state amplitude: sech(z) is the Poschl-Teller "
"ground state and the sine-Gordon / KdV / NLS soliton profile."
),
)
)SIN
omnibias.keras.activations.trigonometric.SINSource ↗SIN = register_activation(ActivationSpec(name='sin', forward=_sin_forward, derivative=lambda z: ops.cos(z), fastpath=_sin_fastpath, integral=lambda z: -ops.cos(z), riccati_polynomial=None, noise_model='none', operator_role='Plane-wave / Bloch embedding; eigenfunction of d^2/dz^2 with eigenvalue -1; sin(z + n*pi/2) gives every order in closed form.'))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.
Read the implementation
SIN = register_activation(
ActivationSpec(
name="sin",
forward=_sin_forward,
derivative=lambda z: ops.cos(z),
fastpath=_sin_fastpath,
integral=lambda z: -ops.cos(z),
riccati_polynomial=None,
noise_model="none",
operator_role=(
"Plane-wave / Bloch embedding; eigenfunction of d^2/dz^2 with "
"eigenvalue -1; sin(z + n*pi/2) gives every order in closed form."
),
)
)SINH
omnibias.keras.activations.trigonometric.SINHSource ↗SINH = register_activation(ActivationSpec(name='sinh', forward=_sinh_forward, derivative=lambda z: ops.cosh(z), fastpath=_sinh_fastpath, integral=lambda z: ops.cosh(z), riccati_polynomial=None, noise_model='none', operator_role='Hyperbolic odd primitive; eigenfunction of d^2/dz^2 with eigenvalue +1; alternates with cosh under differentiation.'))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.
Read the implementation
SINH = register_activation(
ActivationSpec(
name="sinh",
forward=_sinh_forward,
derivative=lambda z: ops.cosh(z),
fastpath=_sinh_fastpath,
integral=lambda z: ops.cosh(z),
riccati_polynomial=None,
noise_model="none",
operator_role=(
"Hyperbolic odd primitive; eigenfunction of d^2/dz^2 with "
"eigenvalue +1; alternates with cosh under differentiation."
),
)
)TAN
omnibias.keras.activations.trigonometric.TANSource ↗TAN = register_activation(ActivationSpec(name='tan', forward=_tan_forward, derivative=lambda z: 1.0 + ops.tan(z) ** 2, fastpath=_tan_fastpath, integral=lambda z: -ops.log(ops.abs(ops.cos(z))), riccati_polynomial=(1.0, 0.0, 1.0), noise_model='none', operator_role="Riccati-class periodic activation; tan'(z) = 1 + tan^2(z); phase factor in unitary-RNN amplitude/phase factorisations."))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.
Read the implementation
TAN = register_activation(
ActivationSpec(
name="tan",
forward=_tan_forward,
derivative=lambda z: 1.0 + ops.tan(z) ** 2,
fastpath=_tan_fastpath,
integral=lambda z: -ops.log(ops.abs(ops.cos(z))),
riccati_polynomial=(1.0, 0.0, 1.0),
noise_model="none",
operator_role=(
"Riccati-class periodic activation; tan'(z) = 1 + tan^2(z); "
"phase factor in unitary-RNN amplitude/phase factorisations."
),
)
)