From 06dd1bba654fb7ffbb26a9087b9ffa6d4eced497 Mon Sep 17 00:00:00 2001 From: Huanchen Zhai Date: Thu, 28 Nov 2024 11:20:39 -0500 Subject: [PATCH] fix docs --- docs/source/tutorial/qc-hamiltonians.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/tutorial/qc-hamiltonians.ipynb b/docs/source/tutorial/qc-hamiltonians.ipynb index 14b7df76..178953e9 100644 --- a/docs/source/tutorial/qc-hamiltonians.ipynb +++ b/docs/source/tutorial/qc-hamiltonians.ipynb @@ -1276,7 +1276,7 @@ "Time elapsed = 3.045 | E = -106.9391328597 | DE = 0.00e+00 | DW = 2.47e-20\n", "\n", "DMRG energy = -106.939132859666600\n", - "Norm = 1.000000000000000\n", + "Norm^2 = 1.000000000000000\n", "Energy expectation = -106.939132859666586\n", " expectation = 2.000000000000001\n" ] @@ -1304,16 +1304,16 @@ "\n", "impo = driver.get_identity_mpo()\n", "\n", - "norm = driver.expectation(ket, impo, ket)\n", + "normsq = driver.expectation(ket, impo, ket)\n", "ener = driver.expectation(ket, mpo, ket)\n", "\n", - "print('Norm = %20.15f' % norm)\n", - "print('Energy expectation = %20.15f' % (ener / norm))\n", + "print('Norm^2 = %20.15f' % normsq)\n", + "print('Energy expectation = %20.15f' % (ener / normsq))\n", "\n", "# [ in spin-adapted mode this is always S(S+1) ]\n", "ssq_mpo = driver.get_spin_square_mpo(iprint=0)\n", "ssq = driver.expectation(ket, ssq_mpo, ket)\n", - "print(' expectation = %20.15f' % (ssq / norm))" + "print(' expectation = %20.15f' % (ssq / normsq))" ] }, { @@ -1355,7 +1355,7 @@ "n_mpo = driver.get_mpo(b.finalize(), iprint=0)\n", "\n", "n_0 = driver.expectation(ket, n_mpo, ket)\n", - "print('N0 expectation = %20.15f' % (n_0 / norm))" + "print('N0 expectation = %20.15f' % (n_0 / normsq))" ] }, {