Fix/x2c double group su2#41
Open
gauravharsha wants to merge 7 commits into
Open
Conversation
PySCF Dmats encode D^L(R^{-1}) (passive convention), so the matching
SU(2) factor is D^{1/2}(R^{-1}) = D^{1/2}(R)†. Using D instead of D†
gives F(k) reconstruction error ~5.5 for Xe; D† reduces it to ~3e-8.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GHF.init_guess_by_chkfile uses 'chkfile' not 'chk' as first parameter name, causing Cell to be passed as the filename when loading checkpoints. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Computing kspace_orep_p0[ik] via L_bz^{-1} @ mat_ao @ L_irre at ik that
is its own IBZ representative analytically yields the identity, but in
practice drifts because the two Cholesky/eig decompositions are computed
independently and accumulate small numerical noise. The downstream GW
kernel (eval_p0_bz_from_ibz in green-mbpt) treats the stored U_p0 as a
genuine rotation, so the drift corrupts P0 at every IBZ rep. On the Ar
def2-svp X2C 2x2x2 test, this reduces the iter-1 mu disagreement
between full_symm and no_symm GW runs from ~1e-3 to ~1.4e-5.
The IBZ->full-BZ Fock reconstruction test now consumes the same Ar input_full_symm.h5 used by the symm-x2c GW integration test in green-mbpt, so both repos exercise the convention against a single shared reference. 2x2x2 k-mesh, nk=8, ink=4, nao=14, nso=28.
The 2x2x2 mesh had no non-trivial TR reduction for the IBZ k-mesh; the 3x3x1 mesh exercises both space-group reduction (nk=9, ink=3) and the spinor transform path tested by test_x2c_fock_ibz_to_full_bz.
…se of Cholesky. True case needs more examination
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the relativistic (X2C1e) symmetry machinery to correct the SU(2) lift convention used in space-group symmetry transforms, switches the intended default J2C factorization path to Cholesky, and refreshes the regression coverage/data for full space-group + TR symmetry in X2C.
Changes:
- Adjust SU(2) rotation usage for X2C double-group spinor representations to match PySCF’s passive (inverse) convention.
- Change CLI default intent for
--use_j2c_eig_decompositionand add an identity short-circuit for auxcell q-point reps to avoid numerical drift. - Replace the prior Hubbard X2C reconstruction dataset in symmetry tests with a precomputed cubic Ar X2C dataset.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/symmetry_test.py | Switches the X2C Fock IBZ→BZ reconstruction test to use the Ar X2C reference HDF5 dataset. |
| green_mbtools/mint/symmetry_utils.py | Updates the SU(2) factor used in the double-group spinor representation (and related documentation). |
| green_mbtools/mint/common_utils.py | Updates init-guess chkfile compatibility, changes intended default for J2C decomposition, improves symmetry-operator storage notes, and adds an identity short-circuit for auxcell transforms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "--use_j2c_eig_decomposition", | ||
| type=lambda x: (str(x).lower() in ['true', '1', 'yes']), | ||
| default='true', | ||
| default='false', |
Comment on lines
+861
to
+862
| representation :math:`D^{1/2}(R^{-1}) \\otimes U_\\text{orbital}(R)` is stored | ||
| via :func:`get_spinor_representation`. |
Comment on lines
+298
to
+305
| """Double-group spinor AO representation :math:`D^{1/2}(R^{-1}) \\otimes U_\\text{orbital}(R)`. | ||
|
|
||
| Reads the rotation directly from ``kstruct.ops[symm_op_idx]``, converts it | ||
| to a Cartesian rotation, lifts it to SU(2) via :func:`rotation_matrix_to_su2`, | ||
| and combines it with the orbital representation from :func:`get_representation`. | ||
|
|
||
| PySCF's ``Dmats`` use the passive (inverse) convention :math:`D^L(R^{-1})`, so | ||
| :func:`get_representation` returns :math:`U_\\text{orbital}(R^{-1})`. The matching |
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.
This PR fixes two major issues:
Additional changes: