ComPWA / qrules

Rule-based particle reaction problem solver on a quantum number level
https://qrules.rtfd.io
Apache License 2.0
9 stars 5 forks source link

Write example that finds J^PC numbers with `CSPSolver` directly #272

Closed redeboer closed 3 weeks ago

redeboer commented 5 months ago

As a step towards https://github.com/ComPWA/qrules/issues/219 and https://github.com/ComPWA/qrules/issues/20 (and an alternative to #266), it would be a good exercise to generate all allowed $J^{PC}$ numbers (spin, parity, $C$ parity) in a three-body decay using the CSPSolver directly (or if needed, using python-constraints directly). It's essentially reproducing the steps from the STM for a limited number of quantum numbers, without using a particle database.

### Sub-tasks
- [x] Try at first to just use the STM-Method for the generation of the `QNProblemSet`
- [x] Create `self.__allowed_intermediate_states` (`particles = load_pdg()` -> `create_edge_properties()` -> `GraphEdgePropertyMap`)
- [x] Test `CSPSolver.find_solutions()` on `QNProblemSet` directly
- [x] Limit available edge properties + settings in `QNProblemSet`
- [ ] Optional: Find where CSPSolver introduces spin-projections

An example from the visualization tutorial, $\psi^\prime \to \gamma \eta \eta$, i.e. $1^{--} \to 1^{--}\,0^{+-}\,0^{+-}$:

jpc

Particle transitions ![particles](https://github.com/ComPWA/qrules/assets/29308176/b2263cf9-1cd7-4271-8276-07462a9dad87)
redeboer commented 4 months ago

Looking through the code for the STM, I found that the only place where CSPSolver is called is in the _solve() method of the STM:

https://github.com/ComPWA/qrules/blob/9d2bb7c94cd075e6732c7a33f388156d06fdd0cd/src/qrules/transition.py#L648-L651

In the documentation, the closest thing to _solve() is find_quantum_number_transitions(), which is described here: https://qrules.readthedocs.io/0.10.x/usage/visualize.html#quantum-number-solutions

It seems to me you have to formulate a limited form of a ProblemSet (only spin, parity and c_parity plus the relevant conversation rules. Maybe that tutorial shines some light on it 😬