FEAT: build topologies for 2-to-n reactions - #384
Open
grayson-helmholz wants to merge 9 commits into
Open
grayson-helmholz wants to merge 9 commits into
grayson-helmholz wants to merge 9 commits into
Conversation
redeboer
added this pull request to stack #386
September 15, 2026 14:29
redeboer
self-requested a review
September 15, 2026 14:41
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ New features
create_isobar_topologies()takes anumber_of_initial_statesargument. With more than one initial state it builds fromdetermine_mandelstam_channel()labels an intermediate edge asdetermine_reaction_channel()summarizes a whole topology as a single label, such as"s","t", or"tt"for a double exchange.ReactionInfo.group_by_channel()andQNReactionInfo.group_by_channel()group transitions by that label, next to the existinggroup_by_topology().create_problem_sets(),create_qn_problem_sets(), andgenerate_qn_transitions()acceptallowed_channels(for instance["s"]or["t", "u"]) to restrict the problem sets to specific Mandelstam channels. The selection is normalized and validated, so a typo raises aValueErrorinstead of silently matching nothing.g_parity_validitychecks that a❗ Behavioral changes
g_parity_validityis part of the default edge settings, with a priority just belowisospin_validity. States whose declared🐛 Bug fixes
get_originating_node_list()dropped node0, because it filtered on the truthiness of the node ID rather than onNone. This went unnoticed while every topology was a decay chain, but it misgroups the symmetric combinations that the topology builder has to skip.create_initial_facts()assigns the initial and final states to the sorted incoming and outgoing edge IDs. The sets thatTopologyexposes have no guaranteed iteration order, so the states could otherwise end up on the wrong edges.parity_conservation,parity_conservation_helicity,clebsch_gordan_helicity_to_canonical, andhelicity_conservation. In each case the single state and the two-body pair swap roles, and the equation is unchanged, since thehelicity_conservationnow requires the spin magnitude on both sides, so that it can read the parent spin from either.⚙️ Enhancements
QuantumNumberSignatureonly after maps that are subsumed by a more determined one are dropped, so a collapsed edge label stays minimal. The signature takes over the📝 Documentation
usage/production, which walks through aSquash commit messages