Skip to content

Accept NumPy bitstrings in fermionic diagonalization - #343

Open
danielgaskins wants to merge 1 commit into
Qiskit:mainfrom
danielgaskins:fix/numpy-bitstring-diagonalization
Open

Accept NumPy bitstrings in fermionic diagonalization#343
danielgaskins wants to merge 1 commit into
Qiskit:mainfrom
danielgaskins:fix/numpy-bitstring-diagonalization

Conversation

@danielgaskins

Copy link
Copy Markdown

Closes #265.

diagonalize_fermionic_hamiltonian now accepts sampled bitstrings as either a Qiskit BitArray or a two-dimensional NumPy boolean array.

NumPy samples are deduplicated and converted to empirical probabilities in the same way as BitArray samples. The tests cover both representations and exercise the NumPy input through the full diagonalization path.

Tests:

  • pytest test/
  • Ruff formatting and lint checks
  • Pylint
  • reno lint

@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@danielgaskins

Copy link
Copy Markdown
Author

The minimum-version job was canceled after 30 minutes without reporting a test failure. The remaining test matrix, development-version tests, lint, docs, CLA, and Mergify summary all pass. Could someone with Actions access rerun the canceled job?

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.

diagonalize_fermionic_hamiltonian should also accept Numpy array of bools in place of BitArray

2 participants