Skip to content

Weyl algebra for bosonic functions - #12

Merged
BrunoQNF merged 13 commits into
mainfrom
weyl-algebra
Nov 5, 2026
Merged

BrunoQNF merged 13 commits into
mainfrom
weyl-algebra

Conversation

@BrunoQNF

@BrunoQNF BrunoQNF commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

…siak ordering

BosonicNormalOrder, BosonicAntinormalOrder, BosonicVEV, BosonicBCHTerms and BosonicZassenhausTerms take vars = {{c1, ...}, {a1, ...}} or a WeylAlgebra, checked by ResolveLadderVariables with messages under the calling function. Automatic orders in the Weyl algebra, replacing the Groebner reduction; Blasiak folds the two-block formula so products of sums no longer expand to 2^n words. BosonicRelations, the one-argument VEV form and the Scalars option are removed. Tests and docs still use the old forms.
BosonicExpOrder, BosonicExpSimplify and BosonicExpBraid take vars as the second argument; the normal and antinormal rule lists are generated from each mode pair and cached per vars, and canonicalizeGenerators orders modes by declared position. NormalOrdered and AntinormalOrdered carry vars, their polynomial collapse no longer fires on an inactive Sum, and shift rules normal-order every declared mode. Old positional assumptions get a message pointing to Assumptions; antinormal coefficients are expanded after the final swap. Tests still use the old forms.
Antinormal, BosonicExpBraid, BosonicExpSimplify, BosonicExpOrder and BosonicExpOrderAntinormal pass vars as {{creators}, {annihilators}}, drop the Scalars option, and expect NormalOrdered and AntinormalOrdered to carry vars. The Blasiak bad-factor test expects BosonicNormalOrder::ladpoly, and the explicit-vars Simplify test now passes a WeylAlgebra.
…ixElement on declared vars

FieldVariables returns {{creators}, {annihilators}} for any symbols or labels, ToBosonicOperator takes vars with mode k on AnnihilationOperator[size, {k}], and BosonicMatrixElement takes vars after the expression in place of the Generators option, resolving them once and pairing index k with mode k. The symbolic displacement and squeeze operators unpack the new FieldVariables shape. FormalSymbolQ and ExtractNCVars are removed. The BosonicMatrixElement, ToBosonicOperator and SecondQuantization tests still use the old forms.
Brings in fbebae8. Its three changes are applied to the vars-based BosonicMatrixElement: numberDiagonal reads a zero base with a nonnegative exponent as KroneckerDelta, the coherent polynomial branch uses ZeroLimitPower, and the coherent number-function branch sums before substituting amplitudes. Its new tests still use the old call forms.
…variables

Both suites pass vars from FieldVariables after the expression, unpacking it into the field names they already use. The Generators options become vars, the vacuum tests from main pass the vars to NormalOrdered and BosonicMatrixElement, and ToBosonicOperator takes vars before the size.
…xponent collection

BosonicExpSimplify conjugates a sum, a scalar multiple, a product or a power piece by piece when the whole operator does not close, and expands a merged exponent so S(xi) S(-xi) collapses to 1. numberDiagonal reads any zero base with an n-dependent exponent as 1 where the exponent vanishes, BosonicVEV and the Blasiak engine map over lists, and canonicalizeGenerators collects each exponent by monomial so a summed coefficient still meets its rule.
…r shorthand

BosonicMatrixElement evaluates coherent-basis elements of exponentials and ordered products by the same wing route as the Fock basis, the wings becoming P(conj alpha) and Q(beta) beside the summed number function, with BosonicExpOrder disentangling first when needed. Ladder variables may also be given as the annihilators alone, {a, b}, each creator then being SuperDagger of its name; a flat list containing a dagger is still rejected.
normalFactor tags a bare creator or annihilator power, and normalProductElement folds it into its side as x^p Exp[P], so ad^p f(N) a^q and its products with wings evaluate in both bases. Without exponentials the Fock element is the closed form, zero for n < q before f(n - q) is read, which keeps the vacuum in E^dagger E = 1 - |0><0|.
…ables

The BosonicVEV tests pass the annihilator shorthand and compare it with the full form in place of the removed one-argument call, a creator given as annihilator and an empty declaration are tested as rejections, and the two remaining BosonicExpOrder lines pass vars. Every SecondQuantization test file passes, 274 tests.
a^q f(N) = f(N+q) a^q and f(N) ad^p = ad^p f(N+p), adjacent functions of one N merge, and a balanced ladder word beside a function of N becomes a polynomial in N, so E E^dag, f-deformed and Holstein-Primakoff products reduce. ad f(N) a is left alone to keep the vacuum.
One short line per call form. BosonicNormalOrder lists the vars forms {a1, ...}, {{c1, ...}, {a1, ...}} and a WeylAlgebra; the others name vars. Minor option lines dropped; NormalOrdered and AntinormalOrdered get usage.
@BrunoQNF
BrunoQNF merged commit 9a5fa39 into main Nov 5, 2026
1 check passed
@BrunoQNF
BrunoQNF deleted the weyl-algebra branch November 5, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant