Skip to content

possible bug in returning wavefunction amplitudes #19

Closed

Description

@alex-golts

_solve_sci_core reshapes the dumped wavefunction against the carryover determinant counts, but SaveMatrixFormWF writes it over the full input subspace. The sizes disagree here, so the code silently substitutes a uniform amplitude array. as a result, any downstream property computed from the amplitudes becomes wrong.

include/sbd/chemistry/tpb/sbdiag.h:753 dumps over adet/bdet, not co_adet/co_bdet:

SaveMatrixFormWF(sbd_data.dump_matrix_form_wf,
                 bit_length, L, adet, bdet, ...);

with the default (carryover_type=1, ratio=0.1) the carryover keeps ~10% per spin, so there's a mismatch.
I think the fix should be to reshape against the full subspace regardless of the carryover_type, which to my understanding is relevant for the next SQD iteration.
If you agree, I'm happy to open a PR for it.

Activity

  1. added a commit that references this issue on Sep 14, 2026
    a9717eb
  2. hfwen0502 commented on Sep 14, 2026

    @hfwen0502
    Member

    Alex Golts (@alex-golts) Thanks for reporting this bug and this PR has been merged to main.
    #26

    Please let us know if there are more issues regarding this.

  3. alex-golts commented on Sep 14, 2026

    @alex-golts
    Author

    Sophia Wen (@hfwen0502) thanks a lot!
    I did leave a comment in the PR about another possible issue, let me know if it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions