BREAK: remove spin projections from states - #385
Open
grayson-helmholz wants to merge 8 commits into
Open
grayson-helmholz wants to merge 8 commits into
grayson-helmholz wants to merge 8 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.
Spin projections disappear from the states, the settings, and the workflow. A transition now carries
Particleinstances on its edges, and the initial and final state are plain particle names. The projections are not lost as a concept: they can be re-enabled explicitly on aQNProblemSet, as the newusage/spin-projectionspage shows.StateStateTransitionis now aFrozenTransition[Particle, InteractionProperties]StateDefinition,StateDefinitionInput,StateWithSpinsas_state_definition(),to_state_definitions()create_initial_facts(...) -> list[InitialFacts]create_initial_facts(...) -> InitialFacts, withoutexpand_spin_projectionscreate_interaction_settings(formalism, ...)create_interaction_settings(..., ls_couplings=True)create_edge_properties(particle, spin_projection)create_edge_properties(particle)find_particle(...) -> ParticleWithSpinfind_particle(...) -> Particlestrip_spin_projections()create_qn_problem_sets(spin_projections=..., merge_spin_projections=...)ls_couplingstakes their placemerge_qn_problem_sets(problem_sets, merge_qns=None)merge_qn_problem_sets(problem_sets, merge_qns), the quantum numbers are now requiredqrules.io.build_state()SpinFormalismno longer selects conservation rules or quantum-number domains. It only determines which interaction properties are kept in the output:"helicity"filters the"canonical"and"canonical-helicity"keep them. As a consequence the default node settings no longer containhelicity_conservation,parity_conservation_helicity,clebsch_gordan_helicity_to_canonical,identical_particle_symmetrization, orls_spin_validity, the edge settings no longer containspin_validity, and there is nospin_projectionorparity_prefactordomain.✨ New features
generate_transitions(),generate_qn_transitions(),StateTransitionManager,create_qn_problem_sets(), andcreate_interaction_settings()take anls_couplingsargument. Withls_couplings=Falsethe settings declare noSpinCoupling,SpinParityCoupling,CParityCoupling, andGParityCoupling. Rather than constraining a givenmax_angular_momentumcouples the spins, parities,remove_dominated_qn_problem_sets()drops problem sets that cannot contribute solutions of their own. Problem sets with equal initial facts and equal domains solve over the same variables, so one whose rule sets contain another's can only yield a subset of that other's solutions. In practice this removes the interaction-type combinations that merely add rules on top of a weaker type, such as the strong settings extending the EM ones by isospin andfind_qn_transitions()takes anumber_of_threadsargument and solves the remaining problem sets over a process pool, defaulting toNumberOfThreads.❗ Behavioral changes
collapse="spin"no longer means "combine transitions that differ only in their spin projections", since there are none. It now hides the interaction properties, such as thecheck_reaction_violations()no longer checksclebsch_gordan_helicity_to_canonicalandidentical_particle_symmetrization, which both need spin projections to be meaningful.CSPSolverinitializes every edge and node of the topology in a solution, so a node for which nothing was solved (as happens withls_couplings=False) still appears, with an empty property map.⚙️ Enhancements
CParityCouplingandGParityCouplingderive the composite parity of such a pair from the couplings that conserve parity, so these rules keep their discriminating power in the projection-free workflow.📝 Documentation
usage/spin-projections, which shows how to put spin projections back into aQNProblemSetand solve with them, now that they are no longer part of the default workflow.usage/productionpage gains three-body double-exchange examples.Squash commit messages