neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
feynlag는 순수 SymPy 파이썬 라이브러리로 BSM 라그랑지안에서 트리 수준 파인만 규칙을 추출해 UFO로 내보냅니다
feynlag is a pure-SymPy Python library for extracting tree-level Feynman rules from BSM Lagrangians. It automates the pipeline from declaring fields/gauge groups all the way to UFO export (MadGraph-co
개발 도구PythonGitHub @moiseszeleny온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기feynlag is a pure-SymPy Python library for extracting tree-level Feynman rules from BSM Lagrangians. It automates the pipeline from declaring fields/gauge groups all the way to UFO export (MadGraph-compatible)
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Tree-level Feynman rules from Beyond-Standard-Model Lagrangians, in pure
SymPy.
You declare particle fields with their gauge and discrete-symmetry
representations, write the Lagrangian explicitly with library building blocks
(Dmu, dag, Bilinear), and feynlag takes it from there:README 전문 보기 ↗Tree-level Feynman rules from Beyond-Standard-Model Lagrangians, in pure SymPy.
You declare particle fields with their gauge and discrete-symmetry
representations, write the Lagrangian explicitly with library building blocks
(Dmu, dag, Bilinear), and feynlag takes it from there:
Model.validate()): invariance,
hermiticity, anomaly cancellation, charge conservation,feynlag.pheno): decay widths and branching ratios
(tree-level 1→2, off-shell h→WW*/ZZ*, loop-induced h→gg/γγ/Zγ) and
tree-level 2→2 cross sections with forward–backward asymmetries.Parameters are split into external (fixed by experiment, e.g. v, m_h,
g) and internal (derived: tadpole solutions, mixing angles, inverted
quartics), forming a dependency chain that closes the UFO parameter card.
Full docs, including an Algorithms Manual deriving the physics and design of every pipeline stage (invariance checking, EWSB/tadpoles, mass matrices, diagonalization, vertex extraction, export), tutorial notebooks, an examples gallery, and the API reference: https://moiseszeleny.github.io/feynlag/
pip install feynlag # add [numeric] for SciPy-backed integration
For development:
pip install -e .[dev]
pytest
import sympy as sp
from feynlag import (ExternalParameter, InternalParameter, SU2, U1, Scalar,
Lagrangian, Model, Dmu, dag)
gw = ExternalParameter("gw", 0.6535, positive=True)
g1 = ExternalParameter("g1", 0.3580, positive=True)
SU2L, U1Y = SU2("SU2L", coupling=gw), U1("U1Y", coupling=g1)
v = ExternalParameter("v", 246.0, positive=True, unit_dim=1)
lam = ExternalParameter("lam", 0.129)
mu2 = InternalParameter("mu2", unit_dim=2) # defined by the tadpole
H = Scalar("H", reps={SU2L: 2, U1Y: sp.Rational(1, 2)},
component_names=["Gp", "H0"])
H.expand_vev({H.components[1]: v}) # H0 -> (v + h + i G0)/√2
HdH = (dag(H) * H.mat)[0]
DH = Dmu(H)
L = Lagrangian()
L.add((dag(DH) * DH)[0], sector="kinetic")
L.add(mu2.s * HdH - lam.s * HdH**2, sector="potential")
m = Model("SM", gauge_groups=[SU2L, U1Y],
fields=[H, SU2L.bosons("W"), U1Y.bosons("B")],
parameters=[gw, g1, v, lam, mu2], lagrangian=L)
m.check_invariance() # gauge invariance, hermiticity, dim ≤ 4
m.solve_tadpoles([mu2]) # {mu2: lam v²}, registered as internal
h = sp.Symbol("H0_r", real=True)
m.mass_matrix([h]) # Matrix([[2 lam v²]])
m.feynman_rules([h]) # {(h,h,h): -6i lam v, (h,h,h,h): -6i lam}
See examples/ (index: examples/README.md) for full runs: sm_scalar_gauge.py (complete SM: Higgs +
electroweak gauge + leptons + quark/QCD sector), sm_vll.py (SM + a
vector-like lepton doublet, biunitary mass-matrix diagonalization),
sm_u1x.py (SM × U(1)_X with a Z′, symbolic charges, chained rotations),
thdm.py (2HDM with the α rotation), thdm_s3.py (3HDM+S₃, where the
tadpole conditions force the √3 vacuum alignment), sm_ckm.py (CKM quark
mixing), fermi_theory.py (four-fermion muon decay), sm_weinberg.py and
sm_seesaw.py (Majorana neutrino masses), sm_decays.py and
sm_higgs_decays.py (widths and the full Higgs branching-ratio table), and
ee_to_ff.py (2→2 scattering). The
docs site walks these models
stage by stage in ten executed tutorial notebooks.
The test suite pins the physics, not just the code (dual verification: symbolic difference and random-point numeric checks):
μ² = λv², m_h² = 2λv², h³ = −3i m_h²/v, h⁴ = −3i m_h²/v²m_W = gv/2, Weinberg rotation, hWW = i g m_W g^{μν},
γW⁺W⁻ = e, ZW⁺W⁻ = g cosθ_W, scalar-QED Goldstone verticeshℓℓ = −i m_ℓ/v, Wℓν = i g/√2 γ^μ P_L,
Z couplings ∝ T³ − Q sin²θ_W√3 alignmenthWW coupling pinned numericallyfeynlag 0.1 is a beta: the tree-level pipeline above is complete and
tested (400+ tests pinning physical results), and the exported SM UFO is
cross-checked against MadGraph (e+e-→μ+μ- and the gauge-cancelling
e+e-→W+W- reproduce the stock sm cross sections to MC precision, and a
four-fermion UFO reproduces the muon width — see
docs/benchmark.md).
Known limitations (planned, see docs/roadmap.md):
VVV decays are not implemented;Unsupported cases raise NotImplementedError rather than returning a
plausible-looking wrong answer.
MIT — see LICENSE.