Skip to content

Test: increase geminal test coverage#217

Open
kzsigmond wants to merge 13 commits into
mainfrom
112-test-ap1rog-wfns-have-low-test-coverage
Open

Test: increase geminal test coverage#217
kzsigmond wants to merge 13 commits into
mainfrom
112-test-ap1rog-wfns-have-low-test-coverage

Conversation

@kzsigmond

Copy link
Copy Markdown
Contributor

This pull request significantly expands and improves the test coverage for coupled cluster (CC) wavefunction classes, especially around excitation operator assignment and overlap calculations. It introduces new tests for generalized and spin-adapted AP1roGSD classes, enhances error handling and validation for excitation operator assignment, and adds comprehensive tests for overlap and its derivatives (including edge cases and parameterizations).

The most important changes are:

New and Expanded Test Suites:

  • Added new test files for AP1roGSDGeneralized and AP1roGSDSpin, covering assignment of excitation ranks, validation of allowed excitation operators, and verifying the generation of excited determinants. [1] [2]
  • Enhanced the test suite for PCCD and related AP1roGSD classes with tests for overlap calculations, edge cases, and derivatives (including finite difference checks and symmetry properties). [1] [2] [3] [4]

Validation and Error Handling for Excitation Operator Assignment:

  • Added and improved tests for assign_exops in APset1roGD and APset1GroSD, including validation of input types, value ranges, set disjointness, and occupied orbital checks. [1] [2] [3]

Improvements to Excitation Operator Assignment in Implementation:

  • Modified PCCD and its child classes to pass indices directly to the base class, ensuring correct handling of excitation operator assignment and reducing redundant calls.

Test Refactoring and Organization:

  • Refactored and organized test files to group related tests (e.g., assignment, overlap, derivatives), improving readability and maintainability. [1] [2]

Minor Additions and Imports:

  • Added missing imports and utility functions to test files to support new tests (e.g., ground, vir_indices). [1] [2]

@kzsigmond kzsigmond added this to the v2.0.0 milestone Jun 16, 2026
@kzsigmond kzsigmond self-assigned this Jun 16, 2026
@kzsigmond kzsigmond added the test unit tests, integration tests, etc. label Jun 16, 2026
@kzsigmond kzsigmond linked an issue Jun 16, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test unit tests, integration tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test: AP1roG wfns have low test coverage

2 participants