Skip to content

ENH: skip spin-projection expansion - #382

Open
grayson-helmholz wants to merge 2 commits into
qn-transitionsfrom
skip-projection-combinatorics
Open

grayson-helmholz wants to merge 2 commits into
qn-transitionsfrom
skip-projection-combinatorics

Conversation

@grayson-helmholz

@grayson-helmholz grayson-helmholz commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

⚙️ Enhancements

  • create_qn_problem_sets() takes a spin_projections argument. With spin_projections=False, the Cartesian expansion over the spin-projection combinations of the initial and final state is never generated, instead of being generated and then discarded. The result is the same as passing the collection through strip_spin_projections(), but it avoids building the combinations in the first place, which dominates the cost for reactions with several spin-carrying states. Combining it with merge_spin_projections=True is rejected with a ValueError, because there is nothing left to merge.
  • create_initial_facts() and create_problem_sets() expose the same switch as expand_spin_projections. When it is off, create_initial_facts() returns a single InitialFacts in which every external state has its spin projection set to None.

📝 Documentation

  • New usage page usage/qn-transitions, which walks through solving a reaction at the $J^{P(C)}$ level: creating projection-free problem sets, solving them with find_qn_transitions(), and reading the resulting QNTransitions. QNTransition is registered in the Sphinx configuration so that it renders as a type alias in the API pages.

Squash commit messages

* DOC: add notebook on quantum-number transitions

@redeboer
redeboer added this pull request to stack #386 September 15, 2026 14:29
@redeboer redeboer changed the title ENH: skip spin-projection expansion for projection-free problem sets ENH: skip spin-projection expansion Sep 15, 2026
@redeboer redeboer added ⚙️ Enhancement Improvements and optimizations of existing features 📝 Docs Improvements or additions to documentation labels Sep 15, 2026
@redeboer
redeboer self-requested a review September 15, 2026 14:41
@redeboer redeboer added this to the 0.11.0 milestone Sep 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 Docs Improvements or additions to documentation ⚙️ Enhancement Improvements and optimizations of existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate transitions without spin projections

2 participants