Skip to content

Conversation

@kevinsung
Copy link
Collaborator

Adds a section showing how to pass initial occupancies, which allows SQD to run even if there are no valid configurations. It may also improve convergence.

@qiskit-bot
Copy link
Contributor

One or more of the following people are relevant to this code:

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@nathanearnestnoble
Copy link
Collaborator

Thank you for adding this component @kevinsung , I think it will help some issues which a few users have raised.

  • Naive question: is there a scenario in which a user would not have the ability to guess the initial occupancies? If not, perhaps it can just be the default workflow rather than an "advanced section"
  • Perhaps just adding a sentence which briefly explains the initial occupancy you selected?

@kevinsung
Copy link
Collaborator Author

kevinsung commented Jan 14, 2026

Thank you for adding this component @kevinsung , I think it will help some issues which a few users have raised.

* Naive question: is there a scenario in which a user would not have the ability to guess the initial occupancies?  If not, perhaps it can just be the default workflow rather than an "advanced section"

* Perhaps just adding a sentence which briefly explains the initial occupancy you selected?

I've edited the notebook to just change the existing workflow, and expanded on the explanation for choosing the Hartree-Fock configuration. I've also added a cell that counts the number of valid configurations returned by the hardware. The diff seems to render incorrectly on GitHub, but it looks fine on ReviewNB.

Currently the notebook is showing a warning due to Qiskit/qiskit-addon-sqd#274. I will investigate that.

@kevinsung
Copy link
Collaborator Author

kevinsung commented Jan 15, 2026

Ok I've fixed the warning in Qiskit/qiskit-addon-sqd#276 and re-run the notebook with that PR. @caleb-johnson agreed to cut a new release of the SQD addon shortly.

I've also updated the reference energy with the results of an improved SCI calculation, and added print statements that print the number of sampled valid bitstrings as well as the final energy error, like this:

Fraction of sampled configurations that are valid: 0.00065
Final energy error: 0.03878764275833646

@kaelynj
Copy link
Collaborator

kaelynj commented Jan 26, 2026

Naive question about this PR @kevinsung. Does this address #4430 at all? Or is that something that'll have to be done separately?

@kevinsung
Copy link
Collaborator Author

Naive question about this PR @kevinsung. Does this address #4430 at all? Or is that something that'll have to be done separately?

No, this PR does not address #4430.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants