From 3fe72277cb9dfb8abe4676a31daa67558d8b8c1e Mon Sep 17 00:00:00 2001 From: Fionn Malone Date: Wed, 20 Sep 2023 22:41:15 +0000 Subject: [PATCH] Update. --- qualtran/bloqs/arithmetic.py | 2 +- qualtran/bloqs/chemistry/trotter.ipynb | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/qualtran/bloqs/arithmetic.py b/qualtran/bloqs/arithmetic.py index c8fc95fdb..a26874307 100644 --- a/qualtran/bloqs/arithmetic.py +++ b/qualtran/bloqs/arithmetic.py @@ -311,7 +311,7 @@ class MultiplyTwoReals(Bloq): References: [Compilation of Fault-Tolerant Quantum Heuristics for Combinatorial Optimization - ](https://arxiv.org/pdf/2007.07391.pdf) pg 71. + ](https://arxiv.org/pdf/2007.07391.pdf) pg 71. """ bitsize: int diff --git a/qualtran/bloqs/chemistry/trotter.ipynb b/qualtran/bloqs/chemistry/trotter.ipynb index 8d9acdded..d7f8b507b 100644 --- a/qualtran/bloqs/chemistry/trotter.ipynb +++ b/qualtran/bloqs/chemistry/trotter.ipynb @@ -591,8 +591,7 @@ "source": [ "import matplotlib.pyplot as plt \n", "# Assume 4 electrons for the moment\n", - "num_elec = 20\n", - "ij_pairs = np.triu_indices(num_elec, k=1)\n", + "ij_pairs = np.triu_indices(len(x_int), k=1)\n", "rij = np.sqrt((x_scl[ij_pairs[0]] - x_scl[ij_pairs[1]])**(2))\n", "Vij = 1.0 / rij\n", "plt.plot(rij, Vij, marker='o', lw=0, label=\"grid\")\n", @@ -617,10 +616,7 @@ "metadata": {}, "outputs": [], "source": [ - "ij_pairs = np.triu_indices(num_elec, k=1)\n", - "# print(x_int[ij_pairs[0][0]], x_int[ij_pairs[1][-1]])\n", "rij_int = np.sqrt((x_int[ij_pairs[0]] - x_int[ij_pairs[1]])**(2))\n", - "print(rij_int)\n", "Vij_int = 1.0 / rij_int\n", "plt.plot(rij_int, Vij_int, marker='o', lw=0, label=\"grid\")\n", "xmin = np.min(rij_int)\n",