Symbolic engine for the Stokes-Mueller algebra of polarization optics: Mueller-matrix decomposition, certified identity discovery (equality saturation + exact symbolic proof), coupled-dipole modelling, and evidence-labelled LaTeX reporting.
Project description
organon-mueller
A symbolic engine for the Stokes–Mueller algebra of polarization optics: it decomposes depolarizing Mueller matrices into nondepolarizing components, discovers and certifies algebraic identities of the underlying state algebra, models coupled oriented dipoles, and reports every result as evidence-labelled LaTeX — with each mathematical statement gated by a written verification contract.
Status: experimental research software. Results are labelled by evidence class — verified (machine-checked against published equations/tables: symbolic-exact or seeded-numeric) or candidate (beyond the published results; no novelty or physics claim — that judgement is left to human experts, per
docs/novelty-protocol.md).Released under the MIT License.
What it does
- Represents a pure polarization state in six isomorphic ways — Jones
matrix
J, Mueller matrixM = ZZ*, covariance matrixH, covariance vector|h⟩ = (τ, α, β, γ), Z-matrix, and biquaternion — with exact, symbolically proven conversions between all of them [1, 2, 3]. - Decomposes depolarizing Mueller matrices into symmetry-conditioned nondepolarizing components: the six fundamental variants and three composite types of the symmetry-conditioned decomposition [4], derived from rank-1 minor conditions (not transcribed from the published tables), plus a rank-3 three-term zone that goes beyond the published cases.
- Discovers algebraic identities by equality saturation over a
covariance-vector term language (egglog), with every candidate certified
by engine-independent symbolic proof; guarded atoms open a
Horn-conditional channel (
P(x) → t₁ = t₂). - Models coupled oriented dipoles [5, 6, 7]: the three-term scattering decomposition as a theorem, mode hybridization, optical activity, Perrin reciprocity, and ensemble statistics — bridged back to the decomposition layer through the covariance representation.
- Reports any of the above as deterministic, evidence-labelled LaTeX.
Installation
Requires Python ≥ 3.10 (the discovery engine needs ≥ 3.11).
pip install -e ".[test]" # base
pip install -e ".[test,discovery]" # + discovery engine (egglog)
pip install -e ".[test,discovery,mcp]" # + MCP server surface
pip install -e ".[test,ui]" # + local web interface
python -m pytest -q # full suite: 306 tests collected (discovery self-skips on py3.10)
Quickstart
Interactive (no code) — the local web interface:
organon-ui # opens http://127.0.0.1:7860 (needs the ui extra)
As a library:
from organon_mueller import HVector
h = HVector.generic("a") # generic complex (tau, alpha, beta, gamma)
M = h.to_mueller() # M = Z Z*
Z = h.to_z()
q = h.to_quaternion() # tau*1 + i*alpha*i + i*beta*j + i*gamma*k
import numpy as np
from organon_mueller.decomposition import decompose
# a depolarizing Mueller matrix -> a symmetric + a generic pure component
result = decompose(mueller=my_4x4_matrix, symmetry="type1")
print(result.alpha1, result.m1, result.m2)
Full demonstration (decomposition against a published worked example, rank-3 recovery, the hypothesis bridge, the dipole engine):
python examples/demo.py
Usage surfaces
| Surface | For | Entry |
|---|---|---|
| Python package | scripting / integration | import organon_mueller |
| Local web UI | interactive use, no code (localhost only) | docs/README-ui.md |
| MCP server | tool use from an assistant | docs/README-mcp.md |
| Static web viewer | reading results in a browser (no terminal) | web/index.html |
Nothing is hosted or exposed by the project. The local web UI binds to 127.0.0.1 only (no tunnel, no public link); the MCP server and static viewer are code + tests only — running them is your decision.
Verification contract (the trust anchor)
No mathematical statement reaches main without passing the layers in
docs/VERIFICATION.md: exact symbolic proof · seeded
numeric checks · regression against the 21 identities of the known-identity
library (each tied to a published equation) · engine-independent
certification of every discovery candidate · an independent adversarial
review of every change set (each reviewer re-derives the mathematics from
scratch) · a 3-version CI matrix. Numeric confidence is never a substitute
for a passing test.
Architecture
Layered, with one-way dependencies: algebra → identities/conditions → discovery / decomposition / dipoles → reporting → mcp_server → web / ui,
plus a safe_parse security layer guarding deserialization. See
docs/architecture.md for the layer map and the
index of design decisions, and
docs/user-guide.md for a task-oriented walkthrough.
Every change lands with a written spec (specs/) and a closing
report (reports/); nothing untested reaches main.
References
The algorithms implement, verify against, and extend results from:
- E. Kuntman, M. A. Kuntman, O. Arteaga, Vector and matrix states for Mueller matrices of nondepolarizing optical media, J. Opt. Soc. Am. A 34, 80 (2017).
- E. Kuntman, M. A. Kuntman, O. Arteaga, Quaternion algebra for Stokes–Mueller formalism, arXiv:1705.07147 (2017).
- E. Kuntman, M. A. Kuntman, J. Sancho-Parramon, O. Arteaga, Formalism of optical coherence and polarization based on material media states, Phys. Rev. A 95, 063819 (2017).
- E. Kuntman, O. Arteaga, Decomposition of a depolarizing Mueller matrix into its nondepolarizing components by using symmetry conditions, Appl. Opt. 55, 2543 (2016).
- M. A. Kuntman, E. Kuntman, J. Sancho-Parramon, O. Arteaga, Light scattering by coupled oriented dipoles: decomposition of the scattering matrix, Phys. Rev. B 98, 045410 (2018).
- M. A. Kuntman, E. Kuntman, O. Arteaga, Asymmetric scattering and reciprocity in a plasmonic dimer, Symmetry 12, 1790 (2020).
- M. A. Kuntman, E. Kuntman, Plasmonic dimers in a solution: a theoretical approach to the optical activity in an ensemble of randomly oriented chiral and achiral plasmonic dimers, preprint.
License
MIT.
Project details
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 organon_mueller-1.0.0.tar.gz.
File metadata
- Download URL: organon_mueller-1.0.0.tar.gz
- Upload date:
- Size: 121.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
128205575203fcb632985ed8975907a8cfa63c0f60069bf88da7097447d6d238
|
|
| MD5 |
7dc1027fa5778cd4c27fa9c28f0960f7
|
|
| BLAKE2b-256 |
81ea21dd42694a4ebec9d9fd009a353d8b87da05848a09cb45fe5613b6f46999
|
Provenance
The following attestation bundles were made for organon_mueller-1.0.0.tar.gz:
Publisher:
publish.yml on tanzercakir-commits/organon-mueller
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
organon_mueller-1.0.0.tar.gz -
Subject digest:
128205575203fcb632985ed8975907a8cfa63c0f60069bf88da7097447d6d238 - Sigstore transparency entry: 2181772087
- Sigstore integration time:
-
Permalink:
tanzercakir-commits/organon-mueller@0c785a3b0e0085af96699417b1337b53500a20c6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tanzercakir-commits
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c785a3b0e0085af96699417b1337b53500a20c6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file organon_mueller-1.0.0-py3-none-any.whl.
File metadata
- Download URL: organon_mueller-1.0.0-py3-none-any.whl
- Upload date:
- Size: 95.9 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 |
7ec663696c1cc995fb277c634310ea1bf49119a7f058f5607e778973eeeda08c
|
|
| MD5 |
c161b096b7a2d498c07079cccb7ca122
|
|
| BLAKE2b-256 |
f5c66d1e931a6657f30fa480303104d88ad68873210d11f2aefa390d628537b6
|
Provenance
The following attestation bundles were made for organon_mueller-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on tanzercakir-commits/organon-mueller
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
organon_mueller-1.0.0-py3-none-any.whl -
Subject digest:
7ec663696c1cc995fb277c634310ea1bf49119a7f058f5607e778973eeeda08c - Sigstore transparency entry: 2181772194
- Sigstore integration time:
-
Permalink:
tanzercakir-commits/organon-mueller@0c785a3b0e0085af96699417b1337b53500a20c6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tanzercakir-commits
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c785a3b0e0085af96699417b1337b53500a20c6 -
Trigger Event:
workflow_dispatch
-
Statement type: