Skip to content

Add unit tests for PauliStringLCU block encoding - #94

Open
cferenba wants to merge 5 commits into
mainfrom
cferenba/pauli-string-unit-tests
Open

Add unit tests for PauliStringLCU block encoding#94
cferenba wants to merge 5 commits into
mainfrom
cferenba/pauli-string-unit-tests

Conversation

@cferenba

@cferenba cferenba commented Aug 6, 2026

Copy link
Copy Markdown
Member

This adds two unit tests for the (Qualtran-based) PauliStringLCU block encoding, which verify that the upper corner of the generated block encoding is equal to the original Hamiltonian, up to a scale factor. It also does some cleanup of the PauliStringLCU logic and fixes a minor bug.

EDIT: I've also added the same two tests for the PyLIQTR version of the encoding.

@cferenba

Copy link
Copy Markdown
Member Author

I found that my contraction of the select bits shouldn't have been necessary - it was only needed to work around a bug in Qualtran 0.4.0. I've backported a fix from 0.5.0 and that allows me to simplify the tests nicely.

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