Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerGoldfriend committed Mar 6, 2025
1 parent d40cbce commit 934fbfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
"id": "eacde622-296a-4c80-8369-8af68648c973",
"metadata": {},
"source": [
"Next, we draw a histogram for the energies, by taking the output of the `phase` variable and multypling back the normalization facor."
"Next, we draw a histogram for the energies, by taking the output of the `phase` variable and multiplying back the normalization factor."
]
},
{
Expand Down Expand Up @@ -827,9 +827,9 @@
"id": "d295b803-a203-47e5-82e8-5820b0e31b26",
"metadata": {},
"source": [
"Recall that we are looking for a signal from the smallest eigenvalue, under the assumption that the initial state has some overlap with the ground state. Below we estimate the energy as the first peak of the histogram, such that the corresponding probability is larger than `ASSUMED_OVERLAP`*0.4 (0.4 is the case for ASSUMED_OVERLAP=1).\n",
"Recall that we are looking for a signal from the smallest eigenvalue, under the assumption that the initial state has some overlap with the ground state. Below we estimate the energy as the first peak of the histogram, such that the corresponding probability is larger than `ASSUMED_OVERLAP`*0.4 (0.4 is the case for ASSUMED_OVERLAP=1, and `ASSUMED_OVERLAP` given by the user).\n",
"\n",
"*Note that this is a very rough and simplistic analysis of the QPE algorithm result. One can utilize more complex tools of spectral analysis, such as Gaussian mixtures, etc. Additional assumptions, such as difference between adjacent eigenvalues or number of overlapping eigenstates, can facilitate the analysis further.*"
"*Note that this is a very rough and simplistic analysis of the QPE algorithm result. One can utilize more complex tools of spectral analysis, such as Gaussian mixtures, etc. Additional assumptions, such as the difference between adjacent eigenvalues or the number of overlapping eigenstates, can facilitate the analysis further.*"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions tests/notebooks/test_qpe_for_molecules.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def test_notebook(tb: TestbookNotebookClient) -> None:
)

# test notebook content
solution_max_prob = tb.ref("measured_phase")
solution_first_peak = tb.ref("estimated_energy")
resolution = tb.ref("post_process_phase(2**(-QPE_SIZE), normalization)")
solution_max_prob = tb.ref("max_prob_energy")
solution_first_peak = tb.ref("measured_energy")
resolution = tb.ref("2**(-QPE_SIZE)* normalization")

exact_result = tb.ref(
"np.real(min( np.linalg.eig( hamiltonian_to_matrix(mol_hamiltonian))[0] ))"
Expand Down

0 comments on commit 934fbfc

Please sign in to comment.