Add P_constraint=1 to solve_qmd and solve_imd for correct axial tensor behavior#18
Draft
Add P_constraint=1 to solve_qmd and solve_imd for correct axial tensor behavior#18
Conversation
QMD and IMD tensors require both T_constraint=1 (time-reversal odd) and P_constraint=1 (axial/pseudo), making the effective parity coefficient det(Rs)^T_constraint. This correctly handles magnetic point groups where anti-unitary operations combine with improper spatial rotations. For the magnetic point group 31m (3 unitary + 3 anti-unitary operations): - QMD now gives 4 independent components (was 2) - IMD now gives 3 independent components (was 1) Co-authored-by: Connor1y <55659348+Connor1y@users.noreply.github.com>
…olve_qmd_imd_magnetic_31m Co-authored-by: Connor1y <55659348+Connor1y@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update matrix transformation data structure
Add P_constraint=1 to solve_qmd and solve_imd for correct axial tensor behavior
Mar 7, 2026
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.
solve_qmdandsolve_imdreturned too few independent components for magnetic point groups with anti-unitary operations. For 31m (3 unitary + 3 anti-unitary ops), QMD gave 2 instead of 4, IMD gave 1 instead of 3.QMD/IMD tensors are axial (pseudo) tensors requiring
P_constraint=1alongsideT_constraint=1. The effective parity coefficient isdet(Rs)^T_constraint, so for anti-unitary improper rotations (θσ_v), the T-sign (−1) and P-sign (−1) cancel, and these operations contribute the same constraints as pure spatial rotations.Changes
tensorconstraint.py: AddedP_constraint=1tosolve_qmd()andsolve_imd()calls tosolve_tensor_constraints()test_tensorconstraint.py: Updated expected values in 5 affected tests; addedtest_solve_qmd_imd_magnetic_31mregression test verifying 4/3 independent components and nullspace structureBefore/After
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.