Skip to content

Commit

Permalink
Fix OO bug
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-johnson committed Oct 1, 2024
1 parent 2d1ba67 commit d5270cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_addon_sqd/fermion.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def optimize_orbitals(
k_flat, learning_rate, 0.9, num_steps_grad, dm1, dm2, hcore, eri_phys
)

return e_qsci, k_flat, [np.diagonal(dm1), np.diagonal(dm1)]
return e_qsci, k_flat, [np.diagonal(dm1), np.diagonal(dm2_chem)]


def rotate_integrals(
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/oo-bug-occs-3c348b86ee03857f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Fixed a bug in open-shell workflows where the spin-up/spin-down average orbital occupancies returned from :func:`qiskit_addon_sqd.fermion.optimize_orbitals` both reflected the occupancies of the alpha particles, rather than returning the occupancies of the alpha and beta particles.

0 comments on commit d5270cf

Please sign in to comment.