Skip to content

Store and expose the DLR node fine grid indices and the symmetrize flag - #21

Open
Wentzell wants to merge 2 commits into
mainfrom
itnode_idx
Open

Store and expose the DLR node fine grid indices and the symmetrize flag#21
Wentzell wants to merge 2 commits into
mainfrom
itnode_idx

Conversation

@Wentzell

Copy link
Copy Markdown
Member

The DLR imaginary time nodes are exact copies of fine grid points, so their integer indices, together with the symmetrize option, identify the node set exactly — suitable for fingerprinting the grid across toolchains, e.g. for hashing or comparing grids.

Changes

  • imtime_ops stores the fine grid indices of its nodes (the sorted Gram-Schmidt pivots), exposed via get_itnodes_idx
  • imtime_ops and imfreq_ops retain their symmetrize option, exposed via is_symmetrized
  • Both quantities are carried in the h5 archives (it_idx, symmetrize) and in serialize/deserialize. Legacy archives are still read: the flag defaults to NONSYM and the indices are reconstructed via the new free function recover_itnode_idx
  • Symmetrized grids from cppdlr <= 1.3.0 are rejected via the new check_unsymmetrized: their pair-only selection is mirror-symmetric without containing omega=0, so their node indices would fingerprint against a fine grid the symmetrize flag does not name. Reading such an archive, or passing such a grid to the constructors predating the flag, now throws
  • Bump version to 1.4.0 and update the ChangeLog

The DLR imaginary time nodes are exact copies of fine grid points, so
their integer indices, together with the symmetrize option, identify
the node set exactly. This makes them suitable for fingerprinting the
grid across toolchains, e.g. for hashing or comparing grids.

- imtime_ops stores the fine grid indices of its nodes (the sorted
  Gram-Schmidt pivots), exposed via get_itnodes_idx
- imtime_ops and imfreq_ops retain their symmetrize option, exposed
  via is_symmetrized
- Both quantities are carried in the h5 archives (it_idx, symmetrize)
  and in serialize/deserialize. Legacy archives without them are still
  read: the flag defaults to NONSYM and the indices are reconstructed
  from the nodes via the new free function recover_itnode_idx
- Symmetrized grids from cppdlr <= 1.3.0 are rejected via the new
  check_unsymmetrized: their pair-only selection is mirror-symmetric
  without containing omega=0, so their node indices would fingerprint
  against a fine grid the symmetrize flag does not name. Reading such
  an archive, or passing such a grid to the constructors predating the
  flag, now throws
- Bump version to 1.4.0 and update the ChangeLog

Assisted-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant