Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate SQD feedback #2460

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Incorporate SQD feedback #2460

wants to merge 2 commits into from

Conversation

kaelynj
Copy link
Collaborator

@kaelynj kaelynj commented Dec 10, 2024

Closes #2360

Tried to parse the feedback as best I could and would especially appreciate a review from either @garrison or @mrossinek to double check my work. Essentially all I did here was give a bit more detail on the configuration recovery step of SQD both in the intro and getting started pages.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@qiskit-bot
Copy link
Contributor

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

"1. Then use the batches of subsamples as arguments to the `solve_fermion()` method to obtain an approximation of the ground state."
"1. Then use the batches of subsamples as arguments to the `solve_fermion()` method to obtain an approximation of the ground state.\n",
"\n",
"One important note here is how to address the very first iteration of the configuration recovery loop. Here the average orbital occupancy is not yet available and so only the `postselect_and_subsample()` method is called. This removes any non-physical samples (samples with incorrect Hamming weight) before running the eigenstate solver, `solve_fermion()`. Afterwards, the average orbital occupation is calculated across all batches and used as input to the `recover_configurations()` method which flips individual bits probabilistically based on this average. The probability of flipping an individual bit is based on the distance between the value of the bit and the average orbital occupancy obtained. (See Section **II-A** of the supplementary information in the [SQD paper](https://arxiv.org/abs/2405.05068) for more information.)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"One important note here is how to address the very first iteration of the configuration recovery loop. Here the average orbital occupancy is not yet available and so only the `postselect_and_subsample()` method is called. This removes any non-physical samples (samples with incorrect Hamming weight) before running the eigenstate solver, `solve_fermion()`. Afterwards, the average orbital occupation is calculated across all batches and used as input to the `recover_configurations()` method which flips individual bits probabilistically based on this average. The probability of flipping an individual bit is based on the distance between the value of the bit and the average orbital occupancy obtained. (See Section **II-A** of the supplementary information in the [SQD paper](https://arxiv.org/abs/2405.05068) for more information.)"
"It is important to note how to address the first iteration of the configuration recovery loop. Since the average orbital occupancy is not yet available, only the `postselect_and_subsample()` method is called. This removes any non-physical samples (samples with incorrect Hamming weight) before running the eigenstate solver, `solve_fermion()`. Afterward, the average orbital occupation is calculated across all batches and used as input to the `recover_configurations()` method, which flips individual bits probabilistically based on this average. The probability of flipping an individual bit is based on the distance between the value of the bit and the average orbital occupancy obtained. (See Section **II-A** of the supplementary information in the [SQD paper](https://arxiv.org/abs/2405.05068) for more information.)"

@@ -60,7 +60,7 @@ $$ \hat{H}_{S^{(k)}} = \hat{P}_{\mathcal{S}^{(k)}}\hat{H}\hat{P}_{\mathcal{S}^{(

where $\hat{H}_{\mathcal{S}^{(k)}}$ is the Hamiltonian of a given subspace.

The bulk of the SQD workflow lies here wherein each of these subspace Hamiltonians is diagonalized. The ground states obtained from each of these subspaces, $|\psi^{(k)}\rangle$, are used to obtain an estimate of a reference vector of occupancies $\mathbf{n}^{(K)}$ averaged over each of the $K$ subspaces and sent back to the configuration recovery step. A new set of subspaces are then obtained and diagonalized, and this procedure iterates in a loop until a user specified criterion is met.
The bulk of the SQD workflow lies here wherein each of these subspace Hamiltonians is diagonalized. The ground states obtained from each of these subspaces, $|\psi^{(k)}\rangle$, are used to obtain an estimate of a reference vector of occupancies $\mathbf{n}^{(K)}$ averaged over each of the $K$ subspaces. A new set of configurations $\mathcal{X}_R$ is then generated by probabilistically flipping individual bits based on this average occupation and the known total number of particles (hamming weight) in the system. This configuration recovery process is then repeated by preparing a new set of subspaces to diagonalize, obtaining new eigenstates and averaged orbital occupancy, then generating a new set of configurations. This loop is iterated until a user specified criterion is met, and the overall process is analogous to filtering a noisy signal to improve its fidelity.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The bulk of the SQD workflow lies here wherein each of these subspace Hamiltonians is diagonalized. The ground states obtained from each of these subspaces, $|\psi^{(k)}\rangle$, are used to obtain an estimate of a reference vector of occupancies $\mathbf{n}^{(K)}$ averaged over each of the $K$ subspaces. A new set of configurations $\mathcal{X}_R$ is then generated by probabilistically flipping individual bits based on this average occupation and the known total number of particles (hamming weight) in the system. This configuration recovery process is then repeated by preparing a new set of subspaces to diagonalize, obtaining new eigenstates and averaged orbital occupancy, then generating a new set of configurations. This loop is iterated until a user specified criterion is met, and the overall process is analogous to filtering a noisy signal to improve its fidelity.
The bulk of the SQD workflow lies here wherein each of these subspace Hamiltonians is diagonalized. The ground states obtained from each of these subspaces, $|\psi^{(k)}\rangle$, are used to obtain an estimate of a reference vector of occupancies $\mathbf{n}^{(K)}$ averaged over each of the $K$ subspaces. A new set of configurations $\mathcal{X}_R$ is then generated by probabilistically flipping individual bits based on this average occupation and the known total number of particles (Hamming weight) in the system. This configuration recovery process is then repeated by preparing a new set of subspaces to diagonalize, obtaining new eigenstates and averaged orbital occupancy, and generating a new set of configurations. This loop is iterated until a user-specified criterion is met, and the overall process is analogous to filtering a noisy signal to improve its fidelity.

Copy link
Collaborator

@abbycross abbycross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple copyedit changes, otherwise LGTM!

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.

[QDC Feedback] Minor improvement to SQD addons docs
3 participants