diff --git a/.doctrees/api/ffsim.doctree b/.doctrees/api/ffsim.doctree index f44043638..b54f86763 100644 Binary files a/.doctrees/api/ffsim.doctree and b/.doctrees/api/ffsim.doctree differ diff --git a/.doctrees/api/ffsim.qiskit.doctree b/.doctrees/api/ffsim.qiskit.doctree index bd4cdc7ea..404e20a2d 100644 Binary files a/.doctrees/api/ffsim.qiskit.doctree and b/.doctrees/api/ffsim.qiskit.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index b4b5b5330..566ec8a10 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/how-to-guides/entanglement-forging.doctree b/.doctrees/how-to-guides/entanglement-forging.doctree index c3f05dd4c..5baf8e8ec 100644 Binary files a/.doctrees/how-to-guides/entanglement-forging.doctree and b/.doctrees/how-to-guides/entanglement-forging.doctree differ diff --git a/.doctrees/how-to-guides/fermion-operator.doctree b/.doctrees/how-to-guides/fermion-operator.doctree index 9d8539af8..dd5c55cff 100644 Binary files a/.doctrees/how-to-guides/fermion-operator.doctree and b/.doctrees/how-to-guides/fermion-operator.doctree differ diff --git a/.doctrees/how-to-guides/lucj.doctree b/.doctrees/how-to-guides/lucj.doctree index 0a303834c..d1a1eb0c9 100644 Binary files a/.doctrees/how-to-guides/lucj.doctree and b/.doctrees/how-to-guides/lucj.doctree differ diff --git a/.doctrees/nbsphinx/explanations/state-vectors-and-gates.ipynb b/.doctrees/nbsphinx/explanations/state-vectors-and-gates.ipynb index ddacaccdc..34082a168 100644 --- a/.doctrees/nbsphinx/explanations/state-vectors-and-gates.ipynb +++ b/.doctrees/nbsphinx/explanations/state-vectors-and-gates.ipynb @@ -26,10 +26,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:27.034170Z", - "iopub.status.busy": "2024-04-22T16:04:27.033982Z", - "iopub.status.idle": "2024-04-22T16:04:27.644213Z", - "shell.execute_reply": "2024-04-22T16:04:27.643569Z" + "iopub.execute_input": "2024-04-23T00:56:43.202469Z", + "iopub.status.busy": "2024-04-23T00:56:43.202092Z", + "iopub.status.idle": "2024-04-23T00:56:43.809927Z", + "shell.execute_reply": "2024-04-23T00:56:43.809149Z" } }, "outputs": [ @@ -74,10 +74,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:27.679076Z", - "iopub.status.busy": "2024-04-22T16:04:27.678605Z", - "iopub.status.idle": "2024-04-22T16:04:27.685994Z", - "shell.execute_reply": "2024-04-22T16:04:27.685515Z" + "iopub.execute_input": "2024-04-23T00:56:43.847691Z", + "iopub.status.busy": "2024-04-23T00:56:43.847206Z", + "iopub.status.idle": "2024-04-23T00:56:43.854665Z", + "shell.execute_reply": "2024-04-23T00:56:43.853953Z" } }, "outputs": [ @@ -118,10 +118,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:27.688245Z", - "iopub.status.busy": "2024-04-22T16:04:27.688026Z", - "iopub.status.idle": "2024-04-22T16:04:27.692253Z", - "shell.execute_reply": "2024-04-22T16:04:27.691737Z" + "iopub.execute_input": "2024-04-23T00:56:43.857118Z", + "iopub.status.busy": "2024-04-23T00:56:43.856763Z", + "iopub.status.idle": "2024-04-23T00:56:43.861439Z", + "shell.execute_reply": "2024-04-23T00:56:43.860789Z" } }, "outputs": [ @@ -155,10 +155,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:27.694337Z", - "iopub.status.busy": "2024-04-22T16:04:27.694144Z", - "iopub.status.idle": "2024-04-22T16:04:27.698059Z", - "shell.execute_reply": "2024-04-22T16:04:27.697487Z" + "iopub.execute_input": "2024-04-23T00:56:43.864235Z", + "iopub.status.busy": "2024-04-23T00:56:43.863975Z", + "iopub.status.idle": "2024-04-23T00:56:43.869414Z", + "shell.execute_reply": "2024-04-23T00:56:43.868838Z" } }, "outputs": [ @@ -197,10 +197,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:27.700411Z", - "iopub.status.busy": "2024-04-22T16:04:27.700045Z", - "iopub.status.idle": "2024-04-22T16:04:27.704279Z", - "shell.execute_reply": "2024-04-22T16:04:27.703790Z" + "iopub.execute_input": "2024-04-23T00:56:43.872093Z", + "iopub.status.busy": "2024-04-23T00:56:43.871820Z", + "iopub.status.idle": "2024-04-23T00:56:43.876892Z", + "shell.execute_reply": "2024-04-23T00:56:43.876286Z" } }, "outputs": [], @@ -226,10 +226,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:27.706624Z", - "iopub.status.busy": "2024-04-22T16:04:27.706264Z", - "iopub.status.idle": "2024-04-22T16:04:27.737466Z", - "shell.execute_reply": "2024-04-22T16:04:27.737023Z" + "iopub.execute_input": "2024-04-23T00:56:43.879830Z", + "iopub.status.busy": "2024-04-23T00:56:43.879301Z", + "iopub.status.idle": "2024-04-23T00:56:43.909737Z", + "shell.execute_reply": "2024-04-23T00:56:43.909076Z" } }, "outputs": [], diff --git a/.doctrees/nbsphinx/how-to-guides/entanglement-forging.ipynb b/.doctrees/nbsphinx/how-to-guides/entanglement-forging.ipynb index cbe2dce4e..039c09dbc 100644 --- a/.doctrees/nbsphinx/how-to-guides/entanglement-forging.ipynb +++ b/.doctrees/nbsphinx/how-to-guides/entanglement-forging.ipynb @@ -14,10 +14,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:29.288977Z", - "iopub.status.busy": "2024-04-22T16:04:29.288522Z", - "iopub.status.idle": "2024-04-22T16:04:30.093700Z", - "shell.execute_reply": "2024-04-22T16:04:30.093049Z" + "iopub.execute_input": "2024-04-23T00:56:45.520052Z", + "iopub.status.busy": "2024-04-23T00:56:45.519860Z", + "iopub.status.idle": "2024-04-23T00:56:46.315631Z", + "shell.execute_reply": "2024-04-23T00:56:46.315040Z" } }, "outputs": [ @@ -80,10 +80,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:30.097967Z", - "iopub.status.busy": "2024-04-22T16:04:30.096867Z", - "iopub.status.idle": "2024-04-22T16:04:30.176612Z", - "shell.execute_reply": "2024-04-22T16:04:30.175995Z" + "iopub.execute_input": "2024-04-23T00:56:46.319829Z", + "iopub.status.busy": "2024-04-23T00:56:46.318731Z", + "iopub.status.idle": "2024-04-23T00:56:46.399162Z", + "shell.execute_reply": "2024-04-23T00:56:46.398592Z" } }, "outputs": [ @@ -91,7 +91,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Energy at initialialization: -74.20656273321643\n" + "Energy at initialialization: -74.20656273321636\n" ] } ], @@ -129,10 +129,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:30.179018Z", - "iopub.status.busy": "2024-04-22T16:04:30.178818Z", - "iopub.status.idle": "2024-04-22T16:04:38.119994Z", - "shell.execute_reply": "2024-04-22T16:04:38.119439Z" + "iopub.execute_input": "2024-04-23T00:56:46.401550Z", + "iopub.status.busy": "2024-04-23T00:56:46.401150Z", + "iopub.status.idle": "2024-04-23T00:56:54.269364Z", + "shell.execute_reply": "2024-04-23T00:56:54.268768Z" } }, "outputs": [ @@ -144,10 +144,10 @@ " message: STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT\n", " success: False\n", " status: 1\n", - " fun: -75.68085112577849\n", + " fun: -75.68085161427761\n", " x: [ 2.996e+00 -7.549e-01 ... 2.650e+00 8.012e-01]\n", " nit: 6\n", - " jac: [ 1.758e-03 9.116e-03 ... -1.192e-02 9.678e-04]\n", + " jac: [ 1.764e-03 9.119e-03 ... -1.192e-02 9.393e-04]\n", " nfev: 112\n", " njev: 7\n", " hess_inv: <15x15 LbfgsInvHessProduct with dtype=float64>\n" diff --git a/.doctrees/nbsphinx/how-to-guides/fermion-operator.ipynb b/.doctrees/nbsphinx/how-to-guides/fermion-operator.ipynb index aac1df88e..6f869a948 100644 --- a/.doctrees/nbsphinx/how-to-guides/fermion-operator.ipynb +++ b/.doctrees/nbsphinx/how-to-guides/fermion-operator.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:39.573088Z", - "iopub.status.busy": "2024-04-22T16:04:39.572902Z", - "iopub.status.idle": "2024-04-22T16:04:40.192325Z", - "shell.execute_reply": "2024-04-22T16:04:40.191678Z" + "iopub.execute_input": "2024-04-23T00:56:55.603885Z", + "iopub.status.busy": "2024-04-23T00:56:55.603691Z", + "iopub.status.idle": "2024-04-23T00:56:56.212992Z", + "shell.execute_reply": "2024-04-23T00:56:56.212389Z" } }, "outputs": [ @@ -40,8 +40,8 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(0), des_a(3)): 0.5,\n", " (cre_b(1), des_b(5), cre_a(4)): 1+1j,\n", + " (cre_a(0), des_a(3)): 0.5,\n", " (cre_a(3), des_a(0)): -0.25\n", "})" ] @@ -76,17 +76,17 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.195130Z", - "iopub.status.busy": "2024-04-22T16:04:40.194675Z", - "iopub.status.idle": "2024-04-22T16:04:40.198789Z", - "shell.execute_reply": "2024-04-22T16:04:40.198196Z" + "iopub.execute_input": "2024-04-23T00:56:56.215778Z", + "iopub.status.busy": "2024-04-23T00:56:56.215336Z", + "iopub.status.idle": "2024-04-23T00:56:56.219611Z", + "shell.execute_reply": "2024-04-23T00:56:56.219130Z" } }, "outputs": [ { "data": { "text/plain": [ - "'FermionOperator({((True, False, 0), (False, False, 3)): 0.5+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 3), (False, False, 0)): -0.25+0j})'" + "'FermionOperator({((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 0), (False, False, 3)): 0.5+0j, ((True, False, 3), (False, False, 0)): -0.25+0j})'" ] }, "execution_count": 2, @@ -110,10 +110,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.201364Z", - "iopub.status.busy": "2024-04-22T16:04:40.201007Z", - "iopub.status.idle": "2024-04-22T16:04:40.205678Z", - "shell.execute_reply": "2024-04-22T16:04:40.205091Z" + "iopub.execute_input": "2024-04-23T00:56:56.221937Z", + "iopub.status.busy": "2024-04-23T00:56:56.221454Z", + "iopub.status.idle": "2024-04-23T00:56:56.225687Z", + "shell.execute_reply": "2024-04-23T00:56:56.225238Z" } }, "outputs": [ @@ -121,17 +121,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (des_a(3), des_b(3)): 0.0625,\n", + " (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,\n", + " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", + " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,\n", " (cre_b(1), des_b(5), cre_a(4)): 2+2j,\n", - " (cre_b(2)): 0-0.25j,\n", + " (des_a(3), des_b(3)): 0.0625,\n", + " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", " (cre_a(3), des_a(0)): -0.5,\n", " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,\n", - " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,\n", - " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", - " (cre_a(0), des_a(3)): 1\n", + " (cre_a(0), des_a(3)): 1,\n", + " (cre_b(2)): 0-0.25j\n", "})" ] }, @@ -170,10 +170,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.208188Z", - "iopub.status.busy": "2024-04-22T16:04:40.207818Z", - "iopub.status.idle": "2024-04-22T16:04:40.211803Z", - "shell.execute_reply": "2024-04-22T16:04:40.211242Z" + "iopub.execute_input": "2024-04-23T00:56:56.227811Z", + "iopub.status.busy": "2024-04-23T00:56:56.227437Z", + "iopub.status.idle": "2024-04-23T00:56:56.231708Z", + "shell.execute_reply": "2024-04-23T00:56:56.231100Z" } }, "outputs": [ @@ -181,17 +181,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (des_a(3), des_b(3)): 0-1.25j,\n", + " (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,\n", + " (cre_a(3), des_a(0), cre_b(2)): -1,\n", + " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,\n", " (cre_b(1), des_b(5), cre_a(4)): 12-12j,\n", - " (cre_b(2)): -5,\n", + " (des_a(3), des_b(3)): 0-1.25j,\n", + " (cre_a(0), des_a(3), cre_b(2)): 2,\n", " (cre_a(3), des_a(0)): 0+3j,\n", " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,\n", - " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,\n", - " (cre_a(3), des_a(0), cre_b(2)): -1,\n", - " (cre_a(0), des_a(3), cre_b(2)): 2,\n", - " (cre_a(0), des_a(3)): 0-6j\n", + " (cre_a(0), des_a(3)): 0-6j,\n", + " (cre_b(2)): -5\n", "})" ] }, @@ -220,10 +220,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.214222Z", - "iopub.status.busy": "2024-04-22T16:04:40.213830Z", - "iopub.status.idle": "2024-04-22T16:04:40.217550Z", - "shell.execute_reply": "2024-04-22T16:04:40.217080Z" + "iopub.execute_input": "2024-04-23T00:56:56.233934Z", + "iopub.status.busy": "2024-04-23T00:56:56.233587Z", + "iopub.status.idle": "2024-04-23T00:56:56.237170Z", + "shell.execute_reply": "2024-04-23T00:56:56.236595Z" } }, "outputs": [ @@ -231,15 +231,15 @@ "data": { "text/plain": [ "FermionOperator({\n", + " (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", " (des_b(3), des_a(3)): 0+1.25j,\n", " (cre_b(2), cre_a(3), des_a(0)): -1,\n", - " (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,\n", - " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", " (cre_b(2), cre_a(0), des_a(3)): 2,\n", - " (cre_a(3), des_a(0)): 0+3j,\n", - " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", " (cre_a(0), des_a(3)): 0-6j,\n", - " (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", + " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", + " (cre_a(3), des_a(0)): 0+3j,\n", + " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", + " (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,\n", " (cre_b(2)): -5\n", "})" ] @@ -265,10 +265,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.219944Z", - "iopub.status.busy": "2024-04-22T16:04:40.219576Z", - "iopub.status.idle": "2024-04-22T16:04:40.222851Z", - "shell.execute_reply": "2024-04-22T16:04:40.222276Z" + "iopub.execute_input": "2024-04-23T00:56:56.239586Z", + "iopub.status.busy": "2024-04-23T00:56:56.239241Z", + "iopub.status.idle": "2024-04-23T00:56:56.242414Z", + "shell.execute_reply": "2024-04-23T00:56:56.241943Z" } }, "outputs": [ @@ -298,10 +298,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.225271Z", - "iopub.status.busy": "2024-04-22T16:04:40.224845Z", - "iopub.status.idle": "2024-04-22T16:04:40.228898Z", - "shell.execute_reply": "2024-04-22T16:04:40.228273Z" + "iopub.execute_input": "2024-04-23T00:56:56.244268Z", + "iopub.status.busy": "2024-04-23T00:56:56.244096Z", + "iopub.status.idle": "2024-04-23T00:56:56.248030Z", + "shell.execute_reply": "2024-04-23T00:56:56.247480Z" } }, "outputs": [ @@ -341,10 +341,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.231289Z", - "iopub.status.busy": "2024-04-22T16:04:40.230920Z", - "iopub.status.idle": "2024-04-22T16:04:40.236624Z", - "shell.execute_reply": "2024-04-22T16:04:40.236113Z" + "iopub.execute_input": "2024-04-23T00:56:56.250269Z", + "iopub.status.busy": "2024-04-23T00:56:56.249951Z", + "iopub.status.idle": "2024-04-23T00:56:56.255288Z", + "shell.execute_reply": "2024-04-23T00:56:56.254869Z" } }, "outputs": [ @@ -353,7 +353,7 @@ "text/plain": [ "array([0. +0.j , 0. +0.j ,\n", " 0. +0.j , 0. +0.j ,\n", - " 0.06251429-0.11302447j, 0. +0.j ,\n", + " 0.05141537-0.01882165j, 0. +0.j ,\n", " 0. +0.j , 0. +0.j ,\n", " 0. +0.j ])" ] @@ -380,10 +380,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.238694Z", - "iopub.status.busy": "2024-04-22T16:04:40.238507Z", - "iopub.status.idle": "2024-04-22T16:04:40.249855Z", - "shell.execute_reply": "2024-04-22T16:04:40.249380Z" + "iopub.execute_input": "2024-04-23T00:56:56.257479Z", + "iopub.status.busy": "2024-04-23T00:56:56.257157Z", + "iopub.status.idle": "2024-04-23T00:56:56.268464Z", + "shell.execute_reply": "2024-04-23T00:56:56.268018Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/how-to-guides/lucj.ipynb b/.doctrees/nbsphinx/how-to-guides/lucj.ipynb index 2a0e55901..9c7b76de8 100644 --- a/.doctrees/nbsphinx/how-to-guides/lucj.ipynb +++ b/.doctrees/nbsphinx/how-to-guides/lucj.ipynb @@ -14,10 +14,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:42.069523Z", - "iopub.status.busy": "2024-04-22T16:04:42.069085Z", - "iopub.status.idle": "2024-04-22T16:04:43.032878Z", - "shell.execute_reply": "2024-04-22T16:04:43.032192Z" + "iopub.execute_input": "2024-04-23T00:56:57.903154Z", + "iopub.status.busy": "2024-04-23T00:56:57.902956Z", + "iopub.status.idle": "2024-04-23T00:56:58.842455Z", + "shell.execute_reply": "2024-04-23T00:56:58.841826Z" } }, "outputs": [ @@ -25,14 +25,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "converged SCF energy = -77.4456267643963\n" + "converged SCF energy = -77.4456267643962\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "CASCI E = -77.6290254326717 E(CI) = -3.57322412553862 S^2 = 0.0000000\n" + "CASCI E = -77.6290254326717 E(CI) = -3.57322412553863 S^2 = 0.0000000\n" ] } ], @@ -107,10 +107,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:43.036297Z", - "iopub.status.busy": "2024-04-22T16:04:43.035909Z", - "iopub.status.idle": "2024-04-22T16:04:43.231283Z", - "shell.execute_reply": "2024-04-22T16:04:43.230677Z" + "iopub.execute_input": "2024-04-23T00:56:58.845597Z", + "iopub.status.busy": "2024-04-23T00:56:58.845309Z", + "iopub.status.idle": "2024-04-23T00:56:59.051584Z", + "shell.execute_reply": "2024-04-23T00:56:59.051019Z" } }, "outputs": [ @@ -118,14 +118,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "E(CCSD) = -77.49387212754479 E_corr = -0.04824536314851326\n" + "E(CCSD) = -77.49387212754471 E_corr = -0.04824536314851507\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Energy at initialization: -77.46975600021705\n" + "Energy at initialization: -77.4697560002171\n" ] } ], @@ -170,10 +170,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:43.234632Z", - "iopub.status.busy": "2024-04-22T16:04:43.234242Z", - "iopub.status.idle": "2024-04-22T16:05:28.623702Z", - "shell.execute_reply": "2024-04-22T16:05:28.623095Z" + "iopub.execute_input": "2024-04-23T00:56:59.054301Z", + "iopub.status.busy": "2024-04-23T00:56:59.053813Z", + "iopub.status.idle": "2024-04-23T00:57:43.191892Z", + "shell.execute_reply": "2024-04-23T00:57:43.190955Z" } }, "outputs": [ @@ -185,10 +185,10 @@ " message: STOP: TOTAL NO. of ITERATIONS REACHED LIMIT\n", " success: False\n", " status: 1\n", - " fun: -77.50963529384492\n", - " x: [ 1.376e+00 -5.945e-01 ... 8.749e-02 1.395e-01]\n", + " fun: -77.50959827694798\n", + " x: [ 1.252e+00 6.192e-01 ... 8.729e-02 1.372e-01]\n", " nit: 5\n", - " jac: [-9.237e-05 8.257e-04 ... -4.151e-03 -3.071e-03]\n", + " jac: [ 1.705e-04 -5.599e-04 ... -3.682e-03 -4.751e-03]\n", " nfev: 584\n", " njev: 8\n", " hess_inv: <72x72 LbfgsInvHessProduct with dtype=float64>\n" @@ -243,10 +243,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:05:28.626880Z", - "iopub.status.busy": "2024-04-22T16:05:28.626493Z", - "iopub.status.idle": "2024-04-22T16:06:01.992612Z", - "shell.execute_reply": "2024-04-22T16:06:01.991951Z" + "iopub.execute_input": "2024-04-23T00:57:43.195036Z", + "iopub.status.busy": "2024-04-23T00:57:43.194747Z", + "iopub.status.idle": "2024-04-23T00:58:15.488302Z", + "shell.execute_reply": "2024-04-23T00:58:15.487628Z" } }, "outputs": [ @@ -258,10 +258,10 @@ " message: STOP: TOTAL NO. of ITERATIONS REACHED LIMIT\n", " success: False\n", " status: 1\n", - " fun: -77.45740510866365\n", - " x: [ 1.375e+00 -5.886e-01 ... 1.712e-03 1.162e-02]\n", + " fun: -77.45740443125672\n", + " x: [ 1.251e+00 6.241e-01 ... -1.591e-03 1.410e-02]\n", " nit: 5\n", - " jac: [-2.430e-04 5.912e-04 ... -1.414e-03 -3.257e-03]\n", + " jac: [-3.268e-05 2.174e-04 ... -2.697e-03 -2.490e-03]\n", " nfev: 423\n", " njev: 9\n", " hess_inv: <46x46 LbfgsInvHessProduct with dtype=float64>\n" @@ -311,10 +311,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:01.996583Z", - "iopub.status.busy": "2024-04-22T16:06:01.995550Z", - "iopub.status.idle": "2024-04-22T16:06:20.125615Z", - "shell.execute_reply": "2024-04-22T16:06:20.125036Z" + "iopub.execute_input": "2024-04-23T00:58:15.491747Z", + "iopub.status.busy": "2024-04-23T00:58:15.491458Z", + "iopub.status.idle": "2024-04-23T00:58:34.417424Z", + "shell.execute_reply": "2024-04-23T00:58:34.416852Z" } }, "outputs": [ @@ -325,34 +325,34 @@ "Number of parameters: 46\n", " message: Stop: Total number of iterations reached limit.\n", " success: False\n", - " fun: -77.47684367002446\n", - " x: [ 1.163e+00 -7.617e-01 ... -6.977e-01 3.986e-01]\n", + " fun: -77.46304381555069\n", + " x: [ 1.315e+00 6.827e-01 ... 5.907e-02 -2.824e-01]\n", " nit: 5\n", - " jac: [ 4.503e-03 3.116e-03 ... 2.734e-03 -8.532e-03]\n", - " nfev: 670\n", + " jac: [-3.738e-04 1.900e-04 ... -5.935e-04 -1.575e-03]\n", + " nfev: 688\n", " njev: 5\n", - " nlinop: 440\n", + " nlinop: 458\n", "\n", "Iteration 1\n", - " Energy: -77.45617013226905\n", - " Norm of gradient: 0.020210672926742775\n", - " Regularization hyperparameter: 0.0017434048084190637\n", - " Variation hyperparameter: 0.2387735391222402\n", + " Energy: -77.45027275285392\n", + " Norm of gradient: 0.020361120472525085\n", + " Regularization hyperparameter: 0.95808369045527\n", + " Variation hyperparameter: 0.600860165397011\n", "Iteration 2\n", - " Energy: -77.45816584713774\n", - " Norm of gradient: 0.016071302328387504\n", - " Regularization hyperparameter: 0.0022599409822063963\n", - " Variation hyperparameter: 0.2388058960030377\n", + " Energy: -77.45703680156946\n", + " Norm of gradient: 0.013027205198137163\n", + " Regularization hyperparameter: 0.025361983601779235\n", + " Variation hyperparameter: 0.6549169149218177\n", "Iteration 3\n", - " Energy: -77.45823033449722\n", - " Norm of gradient: 0.015559776204922056\n", - " Regularization hyperparameter: 1.0968108157468643\n", - " Variation hyperparameter: 0.23454611925037366\n", + " Energy: -77.45807318994828\n", + " Norm of gradient: 0.007991855490291645\n", + " Regularization hyperparameter: 0.00041492763384463573\n", + " Variation hyperparameter: 0.6610093656164645\n", "Iteration 4\n", - " Energy: -77.46318401840293\n", - " Norm of gradient: 0.0290502768037025\n", - " Regularization hyperparameter: 0.005367179953686701\n", - " Variation hyperparameter: 0.4953693465095995\n" + " Energy: -77.45809800966964\n", + " Norm of gradient: 0.0077381151085179475\n", + " Regularization hyperparameter: 0.9595021741490675\n", + " Variation hyperparameter: 0.6668397135509168\n" ] } ], diff --git a/.doctrees/nbsphinx/tutorials/double-factorized.ipynb b/.doctrees/nbsphinx/tutorials/double-factorized.ipynb index d7b7f5226..63300ef72 100644 --- a/.doctrees/nbsphinx/tutorials/double-factorized.ipynb +++ b/.doctrees/nbsphinx/tutorials/double-factorized.ipynb @@ -43,10 +43,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:21.920176Z", - "iopub.status.busy": "2024-04-22T16:06:21.919627Z", - "iopub.status.idle": "2024-04-22T16:06:22.718513Z", - "shell.execute_reply": "2024-04-22T16:06:22.717898Z" + "iopub.execute_input": "2024-04-23T00:58:35.924616Z", + "iopub.status.busy": "2024-04-23T00:58:35.924425Z", + "iopub.status.idle": "2024-04-23T00:58:36.716646Z", + "shell.execute_reply": "2024-04-23T00:58:36.716031Z" } }, "outputs": [ @@ -54,7 +54,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "converged SCF energy = -77.4456267643963\n" + "converged SCF energy = -77.4456267643962\n" ] } ], @@ -109,10 +109,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:22.721708Z", - "iopub.status.busy": "2024-04-22T16:06:22.721365Z", - "iopub.status.idle": "2024-04-22T16:06:22.726574Z", - "shell.execute_reply": "2024-04-22T16:06:22.726154Z" + "iopub.execute_input": "2024-04-23T00:58:36.720972Z", + "iopub.status.busy": "2024-04-23T00:58:36.719889Z", + "iopub.status.idle": "2024-04-23T00:58:36.725882Z", + "shell.execute_reply": "2024-04-23T00:58:36.725394Z" } }, "outputs": [ @@ -215,10 +215,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:22.728687Z", - "iopub.status.busy": "2024-04-22T16:06:22.728501Z", - "iopub.status.idle": "2024-04-22T16:06:22.732566Z", - "shell.execute_reply": "2024-04-22T16:06:22.731959Z" + "iopub.execute_input": "2024-04-23T00:58:36.728250Z", + "iopub.status.busy": "2024-04-23T00:58:36.727901Z", + "iopub.status.idle": "2024-04-23T00:58:36.732377Z", + "shell.execute_reply": "2024-04-23T00:58:36.731951Z" } }, "outputs": [], @@ -273,10 +273,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:22.734861Z", - "iopub.status.busy": "2024-04-22T16:06:22.734508Z", - "iopub.status.idle": "2024-04-22T16:06:22.738065Z", - "shell.execute_reply": "2024-04-22T16:06:22.737502Z" + "iopub.execute_input": "2024-04-23T00:58:36.734710Z", + "iopub.status.busy": "2024-04-23T00:58:36.734402Z", + "iopub.status.idle": "2024-04-23T00:58:36.738584Z", + "shell.execute_reply": "2024-04-23T00:58:36.738007Z" } }, "outputs": [], @@ -313,10 +313,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:22.740222Z", - "iopub.status.busy": "2024-04-22T16:06:22.740006Z", - "iopub.status.idle": "2024-04-22T16:06:22.746614Z", - "shell.execute_reply": "2024-04-22T16:06:22.746035Z" + "iopub.execute_input": "2024-04-23T00:58:36.741071Z", + "iopub.status.busy": "2024-04-23T00:58:36.740654Z", + "iopub.status.idle": "2024-04-23T00:58:36.745938Z", + "shell.execute_reply": "2024-04-23T00:58:36.745366Z" } }, "outputs": [ @@ -324,7 +324,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Hartree Fock energy: -77.44562676439625\n" + "Hartree Fock energy: -77.4456267643963\n" ] } ], @@ -352,10 +352,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:22.749511Z", - "iopub.status.busy": "2024-04-22T16:06:22.749290Z", - "iopub.status.idle": "2024-04-22T16:06:23.566643Z", - "shell.execute_reply": "2024-04-22T16:06:23.566074Z" + "iopub.execute_input": "2024-04-23T00:58:36.748871Z", + "iopub.status.busy": "2024-04-23T00:58:36.748354Z", + "iopub.status.idle": "2024-04-23T00:58:37.574111Z", + "shell.execute_reply": "2024-04-23T00:58:37.573520Z" } }, "outputs": [ @@ -363,7 +363,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of evolved state w.r.t. initial state: 0.931506230140005\n" + "Fidelity of evolved state w.r.t. initial state: 0.9315062301400727\n" ] } ], @@ -394,10 +394,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:23.569971Z", - "iopub.status.busy": "2024-04-22T16:06:23.569602Z", - "iopub.status.idle": "2024-04-22T16:06:23.605082Z", - "shell.execute_reply": "2024-04-22T16:06:23.604458Z" + "iopub.execute_input": "2024-04-23T00:58:37.578111Z", + "iopub.status.busy": "2024-04-23T00:58:37.576977Z", + "iopub.status.idle": "2024-04-23T00:58:37.604966Z", + "shell.execute_reply": "2024-04-23T00:58:37.604442Z" } }, "outputs": [ @@ -405,7 +405,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9928527668213382\n" + "Fidelity of Trotter-evolved state with exact state: 0.9928527668214489\n" ] } ], @@ -435,10 +435,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:23.609458Z", - "iopub.status.busy": "2024-04-22T16:06:23.608481Z", - "iopub.status.idle": "2024-04-22T16:06:23.739130Z", - "shell.execute_reply": "2024-04-22T16:06:23.738596Z" + "iopub.execute_input": "2024-04-23T00:58:37.609137Z", + "iopub.status.busy": "2024-04-23T00:58:37.608155Z", + "iopub.status.idle": "2024-04-23T00:58:37.695751Z", + "shell.execute_reply": "2024-04-23T00:58:37.695229Z" } }, "outputs": [ @@ -446,7 +446,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999320851286736\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999320851287997\n" ] } ], @@ -478,10 +478,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:23.742952Z", - "iopub.status.busy": "2024-04-22T16:06:23.741990Z", - "iopub.status.idle": "2024-04-22T16:06:23.854951Z", - "shell.execute_reply": "2024-04-22T16:06:23.854416Z" + "iopub.execute_input": "2024-04-23T00:58:37.699508Z", + "iopub.status.busy": "2024-04-23T00:58:37.698532Z", + "iopub.status.idle": "2024-04-23T00:58:37.778457Z", + "shell.execute_reply": "2024-04-23T00:58:37.777933Z" } }, "outputs": [ @@ -489,7 +489,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999320851286736\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999320851287997\n" ] } ], @@ -520,10 +520,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:23.858820Z", - "iopub.status.busy": "2024-04-22T16:06:23.857855Z", - "iopub.status.idle": "2024-04-22T16:06:23.924473Z", - "shell.execute_reply": "2024-04-22T16:06:23.923910Z" + "iopub.execute_input": "2024-04-23T00:58:37.782247Z", + "iopub.status.busy": "2024-04-23T00:58:37.781262Z", + "iopub.status.idle": "2024-04-23T00:58:37.830616Z", + "shell.execute_reply": "2024-04-23T00:58:37.830092Z" } }, "outputs": [ @@ -531,7 +531,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999913261307617\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999913261308897\n" ] } ], diff --git a/.doctrees/nbsphinx/tutorials/orbital-rotation.ipynb b/.doctrees/nbsphinx/tutorials/orbital-rotation.ipynb index 79ee742b8..b2e4efb33 100644 --- a/.doctrees/nbsphinx/tutorials/orbital-rotation.ipynb +++ b/.doctrees/nbsphinx/tutorials/orbital-rotation.ipynb @@ -43,10 +43,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:25.994961Z", - "iopub.status.busy": "2024-04-22T16:06:25.994766Z", - "iopub.status.idle": "2024-04-22T16:06:26.608599Z", - "shell.execute_reply": "2024-04-22T16:06:26.608046Z" + "iopub.execute_input": "2024-04-23T00:58:39.890716Z", + "iopub.status.busy": "2024-04-23T00:58:39.890353Z", + "iopub.status.idle": "2024-04-23T00:58:40.499648Z", + "shell.execute_reply": "2024-04-23T00:58:40.499130Z" } }, "outputs": [], @@ -107,10 +107,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:26.611351Z", - "iopub.status.busy": "2024-04-22T16:06:26.611063Z", - "iopub.status.idle": "2024-04-22T16:06:26.641853Z", - "shell.execute_reply": "2024-04-22T16:06:26.641302Z" + "iopub.execute_input": "2024-04-23T00:58:40.502474Z", + "iopub.status.busy": "2024-04-23T00:58:40.502020Z", + "iopub.status.idle": "2024-04-23T00:58:40.532793Z", + "shell.execute_reply": "2024-04-23T00:58:40.532232Z" } }, "outputs": [], @@ -155,10 +155,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:26.645236Z", - "iopub.status.busy": "2024-04-22T16:06:26.644078Z", - "iopub.status.idle": "2024-04-22T16:06:26.663067Z", - "shell.execute_reply": "2024-04-22T16:06:26.662522Z" + "iopub.execute_input": "2024-04-23T00:58:40.536577Z", + "iopub.status.busy": "2024-04-23T00:58:40.535433Z", + "iopub.status.idle": "2024-04-23T00:58:40.554218Z", + "shell.execute_reply": "2024-04-23T00:58:40.553640Z" } }, "outputs": [], @@ -198,10 +198,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:06:26.666546Z", - "iopub.status.busy": "2024-04-22T16:06:26.666325Z", - "iopub.status.idle": "2024-04-22T16:06:26.672429Z", - "shell.execute_reply": "2024-04-22T16:06:26.671740Z" + "iopub.execute_input": "2024-04-23T00:58:40.557664Z", + "iopub.status.busy": "2024-04-23T00:58:40.557451Z", + "iopub.status.idle": "2024-04-23T00:58:40.563032Z", + "shell.execute_reply": "2024-04-23T00:58:40.562440Z" } }, "outputs": [], diff --git a/.doctrees/tutorials/double-factorized.doctree b/.doctrees/tutorials/double-factorized.doctree index aa3dfd26b..204253464 100644 Binary files a/.doctrees/tutorials/double-factorized.doctree and b/.doctrees/tutorials/double-factorized.doctree differ diff --git a/_modules/ffsim/molecular_data.html b/_modules/ffsim/molecular_data.html index 50584a304..e8d2f16c9 100644 --- a/_modules/ffsim/molecular_data.html +++ b/_modules/ffsim/molecular_data.html @@ -343,13 +343,13 @@
@property
def mole(self) -> gto.Mole:
- """The pySCF Mole class for this molecular data."""
+ """The PySCF Mole class for this molecular data."""
mol = gto.Mole()
return mol.build(atom=self.atom, basis=self.basis, symmetry=self.symmetry)
@property
def scf(self) -> gto.Mole:
- """The pySCF SCF class for this molecular data."""
+ """The PySCF SCF class for this molecular data."""
hartree_fock = pyscf.scf.RHF(self.mole)
hartree_fock.mo_occ = self.mo_occ
hartree_fock.mo_coeff = self.mo_coeff
@@ -428,12 +428,12 @@ Source code for ffsim.molecular_data
active_space: Iterable[int] | None = None,
scf_func=pyscf.scf.RHF,
) -> "MolecularData":
- """Initialize a MolecularData object from a pySCF molecule.
+ """Initialize a MolecularData object from a PySCF molecule.
Args:
molecule: The molecule.
active_space: An optional list of orbitals to use for the active space.
- scf_func: The pySCF SCF function to use for the Hartree-Fock calculation.
+ scf_func: The PySCF SCF function to use for the Hartree-Fock calculation.
"""
hartree_fock = scf_func(molecule)
hartree_fock.run()
diff --git a/_modules/ffsim/qiskit/util.html b/_modules/ffsim/qiskit/util.html
index 8b4c91979..7ff256108 100644
--- a/_modules/ffsim/qiskit/util.html
+++ b/_modules/ffsim/qiskit/util.html
@@ -260,7 +260,7 @@ Source code for ffsim.qiskit.util
"""Convert an ffsim statevector to a Qiskit statevector.
Args:
- vec: A statevector in ffsim/pySCF format. It should be a one-dimensional vector
+ vec: A statevector in ffsim/PySCF format. It should be a one-dimensional vector
of length ``comb(norb, n_alpha) * comb(norb, n_beta)``.
norb: The number of spatial orbitals.
nelec: The number of alpha and beta electrons.
diff --git a/api/ffsim.html b/api/ffsim.html
index 31d53cea9..dcd8aad11 100644
--- a/api/ffsim.html
+++ b/api/ffsim.html
@@ -721,13 +721,13 @@
-
static from_mole(molecule, active_space=None, scf_func=<function RHF>)[source]¶
-Initialize a MolecularData object from a pySCF molecule.
+Initialize a MolecularData object from a PySCF molecule.
- Parameters:
molecule (Mole
) – The molecule.
active_space (Iterable
[int
] | None
) – An optional list of orbitals to use for the active space.
-scf_func – The pySCF SCF function to use for the Hartree-Fock calculation.
+scf_func – The PySCF SCF function to use for the Hartree-Fock calculation.
- Return type:
@@ -762,7 +762,7 @@
-
property mole: Mole¶
-The pySCF Mole class for this molecular data.
+The PySCF Mole class for this molecular data.
@@ -796,7 +796,7 @@
-
property scf: Mole¶
-The pySCF SCF class for this molecular data.
+The PySCF SCF class for this molecular data.
diff --git a/api/ffsim.qiskit.html b/api/ffsim.qiskit.html
index 22b6e1627..f9187aa46 100644
--- a/api/ffsim.qiskit.html
+++ b/api/ffsim.qiskit.html
@@ -333,7 +333,7 @@
- Parameters:
-vec (ndarray
) – A statevector in ffsim/pySCF format. It should be a one-dimensional vector
+
vec (ndarray
) – A statevector in ffsim/PySCF format. It should be a one-dimensional vector
of length comb(norb, n_alpha) * comb(norb, n_beta)
.
norb (int
) – The number of spatial orbitals.
nelec (tuple
[int
, int
]) – The number of alpha and beta electrons.
diff --git a/explanations/state-vectors-and-gates.ipynb b/explanations/state-vectors-and-gates.ipynb
index ddacaccdc..34082a168 100644
--- a/explanations/state-vectors-and-gates.ipynb
+++ b/explanations/state-vectors-and-gates.ipynb
@@ -26,10 +26,10 @@
"execution_count": 1,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-04-22T16:04:27.034170Z",
- "iopub.status.busy": "2024-04-22T16:04:27.033982Z",
- "iopub.status.idle": "2024-04-22T16:04:27.644213Z",
- "shell.execute_reply": "2024-04-22T16:04:27.643569Z"
+ "iopub.execute_input": "2024-04-23T00:56:43.202469Z",
+ "iopub.status.busy": "2024-04-23T00:56:43.202092Z",
+ "iopub.status.idle": "2024-04-23T00:56:43.809927Z",
+ "shell.execute_reply": "2024-04-23T00:56:43.809149Z"
}
},
"outputs": [
@@ -74,10 +74,10 @@
"execution_count": 2,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-04-22T16:04:27.679076Z",
- "iopub.status.busy": "2024-04-22T16:04:27.678605Z",
- "iopub.status.idle": "2024-04-22T16:04:27.685994Z",
- "shell.execute_reply": "2024-04-22T16:04:27.685515Z"
+ "iopub.execute_input": "2024-04-23T00:56:43.847691Z",
+ "iopub.status.busy": "2024-04-23T00:56:43.847206Z",
+ "iopub.status.idle": "2024-04-23T00:56:43.854665Z",
+ "shell.execute_reply": "2024-04-23T00:56:43.853953Z"
}
},
"outputs": [
@@ -118,10 +118,10 @@
"execution_count": 3,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-04-22T16:04:27.688245Z",
- "iopub.status.busy": "2024-04-22T16:04:27.688026Z",
- "iopub.status.idle": "2024-04-22T16:04:27.692253Z",
- "shell.execute_reply": "2024-04-22T16:04:27.691737Z"
+ "iopub.execute_input": "2024-04-23T00:56:43.857118Z",
+ "iopub.status.busy": "2024-04-23T00:56:43.856763Z",
+ "iopub.status.idle": "2024-04-23T00:56:43.861439Z",
+ "shell.execute_reply": "2024-04-23T00:56:43.860789Z"
}
},
"outputs": [
@@ -155,10 +155,10 @@
"execution_count": 4,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-04-22T16:04:27.694337Z",
- "iopub.status.busy": "2024-04-22T16:04:27.694144Z",
- "iopub.status.idle": "2024-04-22T16:04:27.698059Z",
- "shell.execute_reply": "2024-04-22T16:04:27.697487Z"
+ "iopub.execute_input": "2024-04-23T00:56:43.864235Z",
+ "iopub.status.busy": "2024-04-23T00:56:43.863975Z",
+ "iopub.status.idle": "2024-04-23T00:56:43.869414Z",
+ "shell.execute_reply": "2024-04-23T00:56:43.868838Z"
}
},
"outputs": [
@@ -197,10 +197,10 @@
"execution_count": 5,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-04-22T16:04:27.700411Z",
- "iopub.status.busy": "2024-04-22T16:04:27.700045Z",
- "iopub.status.idle": "2024-04-22T16:04:27.704279Z",
- "shell.execute_reply": "2024-04-22T16:04:27.703790Z"
+ "iopub.execute_input": "2024-04-23T00:56:43.872093Z",
+ "iopub.status.busy": "2024-04-23T00:56:43.871820Z",
+ "iopub.status.idle": "2024-04-23T00:56:43.876892Z",
+ "shell.execute_reply": "2024-04-23T00:56:43.876286Z"
}
},
"outputs": [],
@@ -226,10 +226,10 @@
"execution_count": 6,
"metadata": {
"execution": {
- "iopub.execute_input": "2024-04-22T16:04:27.706624Z",
- "iopub.status.busy": "2024-04-22T16:04:27.706264Z",
- "iopub.status.idle": "2024-04-22T16:04:27.737466Z",
- "shell.execute_reply": "2024-04-22T16:04:27.737023Z"
+ "iopub.execute_input": "2024-04-23T00:56:43.879830Z",
+ "iopub.status.busy": "2024-04-23T00:56:43.879301Z",
+ "iopub.status.idle": "2024-04-23T00:56:43.909737Z",
+ "shell.execute_reply": "2024-04-23T00:56:43.909076Z"
}
},
"outputs": [],
diff --git a/how-to-guides/entanglement-forging.html b/how-to-guides/entanglement-forging.html
index aed8decc9..4557ab898 100644
--- a/how-to-guides/entanglement-forging.html
+++ b/how-to-guides/entanglement-forging.html
@@ -316,7 +316,7 @@ How to simulate entanglement forging
-Energy at initialialization: -74.20656273321643
+Energy at initialialization: -74.20656273321636
@@ -358,10 +358,10 @@ How to simulate entanglement forging\n"
diff --git a/how-to-guides/fermion-operator.html b/how-to-guides/fermion-operator.html
index 6ed35d8fe..fb301dd40 100644
--- a/how-to-guides/fermion-operator.html
+++ b/how-to-guides/fermion-operator.html
@@ -256,8 +256,8 @@ How to use the FermionOperator class
FermionOperator({
- (cre_a(0), des_a(3)): 0.5,
(cre_b(1), des_b(5), cre_a(4)): 1+1j,
+ (cre_a(0), des_a(3)): 0.5,
(cre_a(3), des_a(0)): -0.25
})
@@ -277,7 +277,7 @@ How to use the FermionOperator class
-'FermionOperator({((True, False, 0), (False, False, 3)): 0.5+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 3), (False, False, 0)): -0.25+0j})'
+'FermionOperator({((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 0), (False, False, 3)): 0.5+0j, ((True, False, 3), (False, False, 0)): -0.25+0j})'
FermionOperators support arithmetic operations. Note that when multiplying a FermionOperator by a scalar, the scalar must go on the left, i.e. 2 * op
and not op * 2
.
FermionOperator({
- (des_a(3), des_b(3)): 0.0625,
+ (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,
+ (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,
+ (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,
(cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,
(cre_b(1), des_b(5), cre_a(4)): 2+2j,
- (cre_b(2)): 0-0.25j,
+ (des_a(3), des_b(3)): 0.0625,
+ (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,
(cre_a(3), des_a(0)): -0.5,
(cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,
- (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,
- (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,
- (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,
- (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,
- (cre_a(0), des_a(3)): 1
+ (cre_a(0), des_a(3)): 1,
+ (cre_b(2)): 0-0.25j
})
FermionOperator({
- (des_a(3), des_b(3)): 0-1.25j,
+ (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,
+ (cre_a(3), des_a(0), cre_b(2)): -1,
+ (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,
(cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,
(cre_b(1), des_b(5), cre_a(4)): 12-12j,
- (cre_b(2)): -5,
+ (des_a(3), des_b(3)): 0-1.25j,
+ (cre_a(0), des_a(3), cre_b(2)): 2,
(cre_a(3), des_a(0)): 0+3j,
(cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,
- (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,
- (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,
- (cre_a(3), des_a(0), cre_b(2)): -1,
- (cre_a(0), des_a(3), cre_b(2)): 2,
- (cre_a(0), des_a(3)): 0-6j
+ (cre_a(0), des_a(3)): 0-6j,
+ (cre_b(2)): -5
})
FermionOperator({
+ (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,
(des_b(3), des_a(3)): 0+1.25j,
(cre_b(2), cre_a(3), des_a(0)): -1,
- (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,
- (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,
(cre_b(2), cre_a(0), des_a(3)): 2,
- (cre_a(3), des_a(0)): 0+3j,
- (cre_b(1), cre_a(4), des_b(5)): -12+12j,
(cre_a(0), des_a(3)): 0-6j,
- (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,
+ (cre_b(1), cre_a(4), des_b(5)): -12+12j,
+ (cre_a(3), des_a(0)): 0+3j,
+ (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,
+ (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,
(cre_b(2)): -5
})
array([0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j , - 0.06251429-0.11302447j, 0. +0.j , + 0.05141537-0.01882165j, 0. +0.j , 0. +0.j , 0. +0.j , 0. +0.j ])diff --git a/how-to-guides/fermion-operator.ipynb b/how-to-guides/fermion-operator.ipynb index aac1df88e..6f869a948 100644 --- a/how-to-guides/fermion-operator.ipynb +++ b/how-to-guides/fermion-operator.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:39.573088Z", - "iopub.status.busy": "2024-04-22T16:04:39.572902Z", - "iopub.status.idle": "2024-04-22T16:04:40.192325Z", - "shell.execute_reply": "2024-04-22T16:04:40.191678Z" + "iopub.execute_input": "2024-04-23T00:56:55.603885Z", + "iopub.status.busy": "2024-04-23T00:56:55.603691Z", + "iopub.status.idle": "2024-04-23T00:56:56.212992Z", + "shell.execute_reply": "2024-04-23T00:56:56.212389Z" } }, "outputs": [ @@ -40,8 +40,8 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(0), des_a(3)): 0.5,\n", " (cre_b(1), des_b(5), cre_a(4)): 1+1j,\n", + " (cre_a(0), des_a(3)): 0.5,\n", " (cre_a(3), des_a(0)): -0.25\n", "})" ] @@ -76,17 +76,17 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.195130Z", - "iopub.status.busy": "2024-04-22T16:04:40.194675Z", - "iopub.status.idle": "2024-04-22T16:04:40.198789Z", - "shell.execute_reply": "2024-04-22T16:04:40.198196Z" + "iopub.execute_input": "2024-04-23T00:56:56.215778Z", + "iopub.status.busy": "2024-04-23T00:56:56.215336Z", + "iopub.status.idle": "2024-04-23T00:56:56.219611Z", + "shell.execute_reply": "2024-04-23T00:56:56.219130Z" } }, "outputs": [ { "data": { "text/plain": [ - "'FermionOperator({((True, False, 0), (False, False, 3)): 0.5+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 3), (False, False, 0)): -0.25+0j})'" + "'FermionOperator({((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 0), (False, False, 3)): 0.5+0j, ((True, False, 3), (False, False, 0)): -0.25+0j})'" ] }, "execution_count": 2, @@ -110,10 +110,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.201364Z", - "iopub.status.busy": "2024-04-22T16:04:40.201007Z", - "iopub.status.idle": "2024-04-22T16:04:40.205678Z", - "shell.execute_reply": "2024-04-22T16:04:40.205091Z" + "iopub.execute_input": "2024-04-23T00:56:56.221937Z", + "iopub.status.busy": "2024-04-23T00:56:56.221454Z", + "iopub.status.idle": "2024-04-23T00:56:56.225687Z", + "shell.execute_reply": "2024-04-23T00:56:56.225238Z" } }, "outputs": [ @@ -121,17 +121,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (des_a(3), des_b(3)): 0.0625,\n", + " (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,\n", + " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", + " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,\n", " (cre_b(1), des_b(5), cre_a(4)): 2+2j,\n", - " (cre_b(2)): 0-0.25j,\n", + " (des_a(3), des_b(3)): 0.0625,\n", + " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", " (cre_a(3), des_a(0)): -0.5,\n", " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,\n", - " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,\n", - " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", - " (cre_a(0), des_a(3)): 1\n", + " (cre_a(0), des_a(3)): 1,\n", + " (cre_b(2)): 0-0.25j\n", "})" ] }, @@ -170,10 +170,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.208188Z", - "iopub.status.busy": "2024-04-22T16:04:40.207818Z", - "iopub.status.idle": "2024-04-22T16:04:40.211803Z", - "shell.execute_reply": "2024-04-22T16:04:40.211242Z" + "iopub.execute_input": "2024-04-23T00:56:56.227811Z", + "iopub.status.busy": "2024-04-23T00:56:56.227437Z", + "iopub.status.idle": "2024-04-23T00:56:56.231708Z", + "shell.execute_reply": "2024-04-23T00:56:56.231100Z" } }, "outputs": [ @@ -181,17 +181,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (des_a(3), des_b(3)): 0-1.25j,\n", + " (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,\n", + " (cre_a(3), des_a(0), cre_b(2)): -1,\n", + " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,\n", " (cre_b(1), des_b(5), cre_a(4)): 12-12j,\n", - " (cre_b(2)): -5,\n", + " (des_a(3), des_b(3)): 0-1.25j,\n", + " (cre_a(0), des_a(3), cre_b(2)): 2,\n", " (cre_a(3), des_a(0)): 0+3j,\n", " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,\n", - " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,\n", - " (cre_a(3), des_a(0), cre_b(2)): -1,\n", - " (cre_a(0), des_a(3), cre_b(2)): 2,\n", - " (cre_a(0), des_a(3)): 0-6j\n", + " (cre_a(0), des_a(3)): 0-6j,\n", + " (cre_b(2)): -5\n", "})" ] }, @@ -220,10 +220,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.214222Z", - "iopub.status.busy": "2024-04-22T16:04:40.213830Z", - "iopub.status.idle": "2024-04-22T16:04:40.217550Z", - "shell.execute_reply": "2024-04-22T16:04:40.217080Z" + "iopub.execute_input": "2024-04-23T00:56:56.233934Z", + "iopub.status.busy": "2024-04-23T00:56:56.233587Z", + "iopub.status.idle": "2024-04-23T00:56:56.237170Z", + "shell.execute_reply": "2024-04-23T00:56:56.236595Z" } }, "outputs": [ @@ -231,15 +231,15 @@ "data": { "text/plain": [ "FermionOperator({\n", + " (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", " (des_b(3), des_a(3)): 0+1.25j,\n", " (cre_b(2), cre_a(3), des_a(0)): -1,\n", - " (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,\n", - " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", " (cre_b(2), cre_a(0), des_a(3)): 2,\n", - " (cre_a(3), des_a(0)): 0+3j,\n", - " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", " (cre_a(0), des_a(3)): 0-6j,\n", - " (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", + " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", + " (cre_a(3), des_a(0)): 0+3j,\n", + " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", + " (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,\n", " (cre_b(2)): -5\n", "})" ] @@ -265,10 +265,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.219944Z", - "iopub.status.busy": "2024-04-22T16:04:40.219576Z", - "iopub.status.idle": "2024-04-22T16:04:40.222851Z", - "shell.execute_reply": "2024-04-22T16:04:40.222276Z" + "iopub.execute_input": "2024-04-23T00:56:56.239586Z", + "iopub.status.busy": "2024-04-23T00:56:56.239241Z", + "iopub.status.idle": "2024-04-23T00:56:56.242414Z", + "shell.execute_reply": "2024-04-23T00:56:56.241943Z" } }, "outputs": [ @@ -298,10 +298,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.225271Z", - "iopub.status.busy": "2024-04-22T16:04:40.224845Z", - "iopub.status.idle": "2024-04-22T16:04:40.228898Z", - "shell.execute_reply": "2024-04-22T16:04:40.228273Z" + "iopub.execute_input": "2024-04-23T00:56:56.244268Z", + "iopub.status.busy": "2024-04-23T00:56:56.244096Z", + "iopub.status.idle": "2024-04-23T00:56:56.248030Z", + "shell.execute_reply": "2024-04-23T00:56:56.247480Z" } }, "outputs": [ @@ -341,10 +341,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.231289Z", - "iopub.status.busy": "2024-04-22T16:04:40.230920Z", - "iopub.status.idle": "2024-04-22T16:04:40.236624Z", - "shell.execute_reply": "2024-04-22T16:04:40.236113Z" + "iopub.execute_input": "2024-04-23T00:56:56.250269Z", + "iopub.status.busy": "2024-04-23T00:56:56.249951Z", + "iopub.status.idle": "2024-04-23T00:56:56.255288Z", + "shell.execute_reply": "2024-04-23T00:56:56.254869Z" } }, "outputs": [ @@ -353,7 +353,7 @@ "text/plain": [ "array([0. +0.j , 0. +0.j ,\n", " 0. +0.j , 0. +0.j ,\n", - " 0.06251429-0.11302447j, 0. +0.j ,\n", + " 0.05141537-0.01882165j, 0. +0.j ,\n", " 0. +0.j , 0. +0.j ,\n", " 0. +0.j ])" ] @@ -380,10 +380,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-04-22T16:04:40.238694Z", - "iopub.status.busy": "2024-04-22T16:04:40.238507Z", - "iopub.status.idle": "2024-04-22T16:04:40.249855Z", - "shell.execute_reply": "2024-04-22T16:04:40.249380Z" + "iopub.execute_input": "2024-04-23T00:56:56.257479Z", + "iopub.status.busy": "2024-04-23T00:56:56.257157Z", + "iopub.status.idle": "2024-04-23T00:56:56.268464Z", + "shell.execute_reply": "2024-04-23T00:56:56.268018Z" } }, "outputs": [ diff --git a/how-to-guides/lucj.html b/how-to-guides/lucj.html index 69f6e36f3..ae65ccaa3 100644 --- a/how-to-guides/lucj.html +++ b/how-to-guides/lucj.html @@ -268,7 +268,7 @@
-converged SCF energy = -77.4456267643963
+converged SCF energy = -77.4456267643962
-CASCI E = -77.6290254326717 E(CI) = -3.57322412553862 S^2 = 0.0000000
+CASCI E = -77.6290254326717 E(CI) = -3.57322412553863 S^2 = 0.0000000
-E(CCSD) = -77.49387212754479 E_corr = -0.04824536314851326
+E(CCSD) = -77.49387212754471 E_corr = -0.04824536314851507
-Energy at initialization: -77.46975600021705
+Energy at initialization: -77.4697560002171
To facilitate variational optimization of the ansatz, UCJOperator
implements methods for conversion to and from a vector of real-valued parameters. The precise relation between a parameter vector and the matrices of the UCJ operator is somewhat complicated. In short, the parameter vector stores the entries of the UCJ matrices in a non-redundant way (for the orbital rotations, the parameter vector actually stores the entries of their generators.)
-converged SCF energy = -77.4456267643963
+converged SCF energy = -77.4456267643962
Here, mol_hamiltonian
is an instance of MolecularHamiltonian
, a dataclass that stores the one- and two-body tensors, and df_hamiltonian
is an instance of DoubleFactorizedHamiltonian
, a dataclass that stores the updated one-body-tensor, diagonal Coulomb matrices, and orbital rotations. In the cell below, we print out the shapes of the tensors describing the original and double-factorized representations.
-Hartree Fock energy: -77.44562676439625
+Hartree Fock energy: -77.4456267643963
Now, we set the evolution time and calculate the exact result of time evolution by directly exponentiating the Hamiltonian using SciPy. Later, we will compare the result of our approximate time evolution with this exact result.
@@ -502,7 +502,7 @@
-Fidelity of evolved state w.r.t. initial state: 0.931506230140005
+Fidelity of evolved state w.r.t. initial state: 0.9315062301400727
Now, let’s test our implementation.
@@ -529,7 +529,7 @@
-Fidelity of Trotter-evolved state with exact state: 0.9928527668213382
+Fidelity of Trotter-evolved state with exact state: 0.9928527668214489
The fidelity of the final result can be improved by increasing the number of Trotter steps.
@@ -556,7 +556,7 @@
-Fidelity of Trotter-evolved state with exact state: 0.9999320851286736
+Fidelity of Trotter-evolved state with exact state: 0.9999320851287997
As mentioned above, ffsim already includes functionality for Trotter simulation of double-factorized Hamiltonians. The implementation in ffsim includes higher-order Trotter-Suzuki formulas. The first-order asymmetric formula that we just implemented corresponds to order=0
in ffsim’s implementation. order=1
corresponds to the first-order symmetric (commonly known as the second-order) formula, order=2
corresponds to the second-order symmetric (fourth-order) formula, and so on.
-Fidelity of Trotter-evolved state with exact state: 0.9999320851286736
+Fidelity of Trotter-evolved state with exact state: 0.9999320851287997
A higher order formula achieves a higher fidelity with fewer Trotter steps:
@@ -613,7 +613,7 @@
-Fidelity of Trotter-evolved state with exact state: 0.9999913261307617
+Fidelity of Trotter-evolved state with exact state: 0.9999913261308897