From 934fbfc1c0ec40c5c51fb3cbe7fee644f74b0c43 Mon Sep 17 00:00:00 2001 From: Tomer Goldfriend Date: Thu, 6 Mar 2025 15:40:16 +0200 Subject: [PATCH] fix test --- .../chemistry/qpe_for_molecules/qpe_for_molecules.ipynb | 6 +++--- tests/notebooks/test_qpe_for_molecules.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/chemistry/qpe_for_molecules/qpe_for_molecules.ipynb b/applications/chemistry/qpe_for_molecules/qpe_for_molecules.ipynb index 853ae930..c2664e40 100644 --- a/applications/chemistry/qpe_for_molecules/qpe_for_molecules.ipynb +++ b/applications/chemistry/qpe_for_molecules/qpe_for_molecules.ipynb @@ -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." ] }, { @@ -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.*" ] }, { diff --git a/tests/notebooks/test_qpe_for_molecules.py b/tests/notebooks/test_qpe_for_molecules.py index 928fcd74..7381bae3 100644 --- a/tests/notebooks/test_qpe_for_molecules.py +++ b/tests/notebooks/test_qpe_for_molecules.py @@ -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] ))"