diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index c646286bc..ee0cba34d 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/nbsphinx/tutorials/01-introduction.ipynb b/.doctrees/nbsphinx/tutorials/01-introduction.ipynb index 38472ac7d..b46f68b04 100644 --- a/.doctrees/nbsphinx/tutorials/01-introduction.ipynb +++ b/.doctrees/nbsphinx/tutorials/01-introduction.ipynb @@ -16,10 +16,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:34.339625Z", - "iopub.status.busy": "2023-10-19T02:46:34.339200Z", - "iopub.status.idle": "2023-10-19T02:46:34.631991Z", - "shell.execute_reply": "2023-10-19T02:46:34.631357Z" + "iopub.execute_input": "2023-10-19T14:39:55.333137Z", + "iopub.status.busy": "2023-10-19T14:39:55.332800Z", + "iopub.status.idle": "2023-10-19T14:39:55.620635Z", + "shell.execute_reply": "2023-10-19T14:39:55.620092Z" } }, "outputs": [], @@ -62,10 +62,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:34.635817Z", - "iopub.status.busy": "2023-10-19T02:46:34.635204Z", - "iopub.status.idle": "2023-10-19T02:46:34.639086Z", - "shell.execute_reply": "2023-10-19T02:46:34.638624Z" + "iopub.execute_input": "2023-10-19T14:39:55.625193Z", + "iopub.status.busy": "2023-10-19T14:39:55.624119Z", + "iopub.status.idle": "2023-10-19T14:39:55.629183Z", + "shell.execute_reply": "2023-10-19T14:39:55.628710Z" } }, "outputs": [], @@ -93,10 +93,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:34.642084Z", - "iopub.status.busy": "2023-10-19T02:46:34.641488Z", - "iopub.status.idle": "2023-10-19T02:46:34.644420Z", - "shell.execute_reply": "2023-10-19T02:46:34.643975Z" + "iopub.execute_input": "2023-10-19T14:39:55.633035Z", + "iopub.status.busy": "2023-10-19T14:39:55.632089Z", + "iopub.status.idle": "2023-10-19T14:39:55.636031Z", + "shell.execute_reply": "2023-10-19T14:39:55.635577Z" } }, "outputs": [], diff --git a/.doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb b/.doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb index 3d8e6a9aa..be6e21fe5 100644 --- a/.doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb +++ b/.doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb @@ -43,10 +43,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.167922Z", - "iopub.status.busy": "2023-10-19T02:46:36.167518Z", - "iopub.status.idle": "2023-10-19T02:46:36.461097Z", - "shell.execute_reply": "2023-10-19T02:46:36.460456Z" + "iopub.execute_input": "2023-10-19T14:39:57.127490Z", + "iopub.status.busy": "2023-10-19T14:39:57.127250Z", + "iopub.status.idle": "2023-10-19T14:39:57.415242Z", + "shell.execute_reply": "2023-10-19T14:39:57.414684Z" } }, "outputs": [], @@ -111,10 +111,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.464540Z", - "iopub.status.busy": "2023-10-19T02:46:36.464254Z", - "iopub.status.idle": "2023-10-19T02:46:36.489805Z", - "shell.execute_reply": "2023-10-19T02:46:36.489257Z" + "iopub.execute_input": "2023-10-19T14:39:57.419456Z", + "iopub.status.busy": "2023-10-19T14:39:57.418437Z", + "iopub.status.idle": "2023-10-19T14:39:57.443882Z", + "shell.execute_reply": "2023-10-19T14:39:57.443356Z" } }, "outputs": [], @@ -160,10 +160,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.492991Z", - "iopub.status.busy": "2023-10-19T02:46:36.492785Z", - "iopub.status.idle": "2023-10-19T02:46:36.503612Z", - "shell.execute_reply": "2023-10-19T02:46:36.503068Z" + "iopub.execute_input": "2023-10-19T14:39:57.447969Z", + "iopub.status.busy": "2023-10-19T14:39:57.447021Z", + "iopub.status.idle": "2023-10-19T14:39:57.458057Z", + "shell.execute_reply": "2023-10-19T14:39:57.457553Z" } }, "outputs": [], @@ -203,10 +203,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.506429Z", - "iopub.status.busy": "2023-10-19T02:46:36.506212Z", - "iopub.status.idle": "2023-10-19T02:46:36.511130Z", - "shell.execute_reply": "2023-10-19T02:46:36.510597Z" + "iopub.execute_input": "2023-10-19T14:39:57.462338Z", + "iopub.status.busy": "2023-10-19T14:39:57.461004Z", + "iopub.status.idle": "2023-10-19T14:39:57.467050Z", + "shell.execute_reply": "2023-10-19T14:39:57.466562Z" } }, "outputs": [], diff --git a/.doctrees/nbsphinx/tutorials/03-double-factorized.ipynb b/.doctrees/nbsphinx/tutorials/03-double-factorized.ipynb index c719b9884..2cb8abca1 100644 --- a/.doctrees/nbsphinx/tutorials/03-double-factorized.ipynb +++ b/.doctrees/nbsphinx/tutorials/03-double-factorized.ipynb @@ -43,10 +43,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.188517Z", - "iopub.status.busy": "2023-10-19T02:46:38.188110Z", - "iopub.status.idle": "2023-10-19T02:46:38.578982Z", - "shell.execute_reply": "2023-10-19T02:46:38.578351Z" + "iopub.execute_input": "2023-10-19T14:39:58.908837Z", + "iopub.status.busy": "2023-10-19T14:39:58.908499Z", + "iopub.status.idle": "2023-10-19T14:39:59.292292Z", + "shell.execute_reply": "2023-10-19T14:39:59.291735Z" } }, "outputs": [ @@ -93,10 +93,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.591785Z", - "iopub.status.busy": "2023-10-19T02:46:38.591349Z", - "iopub.status.idle": "2023-10-19T02:46:38.597111Z", - "shell.execute_reply": "2023-10-19T02:46:38.596658Z" + "iopub.execute_input": "2023-10-19T14:39:59.296046Z", + "iopub.status.busy": "2023-10-19T14:39:59.295505Z", + "iopub.status.idle": "2023-10-19T14:39:59.303680Z", + "shell.execute_reply": "2023-10-19T14:39:59.303208Z" } }, "outputs": [ @@ -111,44 +111,44 @@ " [-3.07220771e-16 -6.77238770e-01]]\n", "\n", "Two-body tensor:\n", - "[[[[5.23173938e-01 1.57437591e-16]\n", - " [1.57437591e-16 5.33545754e-01]]\n", + "[[[[5.23173938e-01 1.94289029e-16]\n", + " [1.94289029e-16 5.33545754e-01]]\n", "\n", - " [[2.12704463e-16 2.48240570e-01]\n", - " [2.48240570e-01 1.61492903e-16]]]\n", + " [[1.94289029e-16 2.48240570e-01]\n", + " [2.48240570e-01 8.32667268e-17]]]\n", "\n", "\n", - " [[[2.12704463e-16 2.48240570e-01]\n", - " [2.48240570e-01 1.61492903e-16]]\n", + " [[[1.94289029e-16 2.48240570e-01]\n", + " [2.48240570e-01 8.32667268e-17]]\n", "\n", - " [[5.33545754e-01 1.24884750e-16]\n", - " [1.24884750e-16 5.53132024e-01]]]]\n", + " [[5.33545754e-01 1.11022302e-16]\n", + " [1.11022302e-16 5.53132024e-01]]]]\n", "\n", "Double-factorized representation\n", "--------------------------------\n", "One-body tensor:\n", - "[[-1.21318608e+00 -4.25870402e-16]\n", - " [-4.76015378e-16 -1.07792507e+00]]\n", + "[[-1.21318608e+00 -4.05183033e-16]\n", + " [-4.59876437e-16 -1.07792507e+00]]\n", "\n", "Diagonal Coulomb matrices:\n", - "[[[ 5.14653029e-01 5.33545754e-01]\n", - " [ 5.33545754e-01 5.53132024e-01]]\n", + "[[[ 5.14653029e-001 5.33545754e-001]\n", + " [ 5.33545754e-001 5.53132024e-001]]\n", "\n", - " [[ 2.48240570e-01 -2.48240570e-01]\n", - " [-2.48240570e-01 2.48240570e-01]]\n", + " [[ 2.48240570e-001 -2.48240570e-001]\n", + " [-2.48240570e-001 2.48240570e-001]]\n", "\n", - " [[ 1.50800163e-59 -3.58462611e-31]\n", - " [-3.58462611e-31 8.52090881e-03]]]\n", + " [[ 5.96958401e-121 -7.13206008e-062]\n", + " [-7.13206008e-062 8.52090881e-003]]]\n", "\n", "Orbital rotations:\n", - "[[[-1.00000000e+00 8.24520980e-15]\n", - " [ 8.24520980e-15 1.00000000e+00]]\n", + "[[[-1.00000000e+00 4.25128053e-15]\n", + " [ 4.25128053e-15 1.00000000e+00]]\n", "\n", - " [[-7.07106781e-01 -7.07106781e-01]\n", - " [ 7.07106781e-01 -7.07106781e-01]]\n", + " [[ 7.07106781e-01 -7.07106781e-01]\n", + " [-7.07106781e-01 -7.07106781e-01]]\n", "\n", - " [[ 6.48603030e-15 -1.00000000e+00]\n", - " [-1.00000000e+00 -6.48603030e-15]]]\n" + " [[ 2.89310728e-30 -1.00000000e+00]\n", + " [-1.00000000e+00 -2.89310728e-30]]]\n" ] } ], @@ -227,10 +227,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.599710Z", - "iopub.status.busy": "2023-10-19T02:46:38.599404Z", - "iopub.status.idle": "2023-10-19T02:46:38.603693Z", - "shell.execute_reply": "2023-10-19T02:46:38.603246Z" + "iopub.execute_input": "2023-10-19T14:39:59.307553Z", + "iopub.status.busy": "2023-10-19T14:39:59.306455Z", + "iopub.status.idle": "2023-10-19T14:39:59.312345Z", + "shell.execute_reply": "2023-10-19T14:39:59.311867Z" } }, "outputs": [], @@ -285,10 +285,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.606133Z", - "iopub.status.busy": "2023-10-19T02:46:38.605839Z", - "iopub.status.idle": "2023-10-19T02:46:38.609316Z", - "shell.execute_reply": "2023-10-19T02:46:38.608866Z" + "iopub.execute_input": "2023-10-19T14:39:59.315343Z", + "iopub.status.busy": "2023-10-19T14:39:59.315133Z", + "iopub.status.idle": "2023-10-19T14:39:59.319932Z", + "shell.execute_reply": "2023-10-19T14:39:59.319386Z" } }, "outputs": [], @@ -325,10 +325,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.611974Z", - "iopub.status.busy": "2023-10-19T02:46:38.611674Z", - "iopub.status.idle": "2023-10-19T02:46:38.615968Z", - "shell.execute_reply": "2023-10-19T02:46:38.615522Z" + "iopub.execute_input": "2023-10-19T14:39:59.322653Z", + "iopub.status.busy": "2023-10-19T14:39:59.322251Z", + "iopub.status.idle": "2023-10-19T14:39:59.327160Z", + "shell.execute_reply": "2023-10-19T14:39:59.326695Z" } }, "outputs": [ @@ -336,7 +336,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Hartree Fock energy: -0.8377963825937088\n" + "Hartree Fock energy: -0.837796382593709\n" ] } ], @@ -367,10 +367,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.618277Z", - "iopub.status.busy": "2023-10-19T02:46:38.617987Z", - "iopub.status.idle": "2023-10-19T02:46:38.629673Z", - "shell.execute_reply": "2023-10-19T02:46:38.629147Z" + "iopub.execute_input": "2023-10-19T14:39:59.329875Z", + "iopub.status.busy": "2023-10-19T14:39:59.329325Z", + "iopub.status.idle": "2023-10-19T14:39:59.339042Z", + "shell.execute_reply": "2023-10-19T14:39:59.338412Z" } }, "outputs": [ @@ -409,10 +409,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.632236Z", - "iopub.status.busy": "2023-10-19T02:46:38.631901Z", - "iopub.status.idle": "2023-10-19T02:46:38.639569Z", - "shell.execute_reply": "2023-10-19T02:46:38.639118Z" + "iopub.execute_input": "2023-10-19T14:39:59.341671Z", + "iopub.status.busy": "2023-10-19T14:39:59.341479Z", + "iopub.status.idle": "2023-10-19T14:39:59.349853Z", + "shell.execute_reply": "2023-10-19T14:39:59.349232Z" } }, "outputs": [ @@ -420,7 +420,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.999027574408349\n" + "Fidelity of Trotter-evolved state with exact state: 0.9990275744083491\n" ] } ], @@ -450,10 +450,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.641776Z", - "iopub.status.busy": "2023-10-19T02:46:38.641588Z", - "iopub.status.idle": "2023-10-19T02:46:38.677756Z", - "shell.execute_reply": "2023-10-19T02:46:38.677308Z" + "iopub.execute_input": "2023-10-19T14:39:59.353772Z", + "iopub.status.busy": "2023-10-19T14:39:59.353568Z", + "iopub.status.idle": "2023-10-19T14:39:59.390939Z", + "shell.execute_reply": "2023-10-19T14:39:59.389931Z" } }, "outputs": [ @@ -461,7 +461,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999906233109657\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999906233109653\n" ] } ], @@ -493,10 +493,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.680483Z", - "iopub.status.busy": "2023-10-19T02:46:38.680136Z", - "iopub.status.idle": "2023-10-19T02:46:38.707617Z", - "shell.execute_reply": "2023-10-19T02:46:38.707180Z" + "iopub.execute_input": "2023-10-19T14:39:59.393689Z", + "iopub.status.busy": "2023-10-19T14:39:59.393490Z", + "iopub.status.idle": "2023-10-19T14:39:59.425221Z", + "shell.execute_reply": "2023-10-19T14:39:59.424460Z" } }, "outputs": [ @@ -504,7 +504,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999906233109657\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999906233109653\n" ] } ], @@ -535,10 +535,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.710858Z", - "iopub.status.busy": "2023-10-19T02:46:38.710516Z", - "iopub.status.idle": "2023-10-19T02:46:38.722585Z", - "shell.execute_reply": "2023-10-19T02:46:38.722134Z" + "iopub.execute_input": "2023-10-19T14:39:59.427658Z", + "iopub.status.busy": "2023-10-19T14:39:59.427469Z", + "iopub.status.idle": "2023-10-19T14:39:59.443022Z", + "shell.execute_reply": "2023-10-19T14:39:59.442331Z" } }, "outputs": [ @@ -546,7 +546,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999999336740057\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999999336740059\n" ] } ], diff --git a/.doctrees/nbsphinx/tutorials/04-lucj.ipynb b/.doctrees/nbsphinx/tutorials/04-lucj.ipynb index e3808175b..1d8185999 100644 --- a/.doctrees/nbsphinx/tutorials/04-lucj.ipynb +++ b/.doctrees/nbsphinx/tutorials/04-lucj.ipynb @@ -14,10 +14,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:40.679599Z", - "iopub.status.busy": "2023-10-19T02:46:40.679036Z", - "iopub.status.idle": "2023-10-19T02:46:41.408329Z", - "shell.execute_reply": "2023-10-19T02:46:41.407784Z" + "iopub.execute_input": "2023-10-19T14:40:01.376785Z", + "iopub.status.busy": "2023-10-19T14:40:01.376450Z", + "iopub.status.idle": "2023-10-19T14:40:01.984780Z", + "shell.execute_reply": "2023-10-19T14:40:01.984205Z" } }, "outputs": [ @@ -25,14 +25,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "converged SCF energy = -77.4456267643962\n" + "converged SCF energy = -77.4456267643961\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" ] } ], @@ -109,10 +109,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:41.411504Z", - "iopub.status.busy": "2023-10-19T02:46:41.411022Z", - "iopub.status.idle": "2023-10-19T02:46:41.957143Z", - "shell.execute_reply": "2023-10-19T02:46:41.956639Z" + "iopub.execute_input": "2023-10-19T14:40:01.990201Z", + "iopub.status.busy": "2023-10-19T14:40:01.988624Z", + "iopub.status.idle": "2023-10-19T14:40:02.504800Z", + "shell.execute_reply": "2023-10-19T14:40:02.504249Z" } }, "outputs": [ @@ -120,14 +120,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "E(CCSD) = -77.49387212754471 E_corr = -0.04824536314851378\n" + "E(CCSD) = -77.49387212754462 E_corr = -0.04824536314851573\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Energy at initialialization: -77.46975600021688\n" + "Energy at initialialization: -77.46975600021692\n" ] } ], @@ -177,10 +177,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:41.959995Z", - "iopub.status.busy": "2023-10-19T02:46:41.959612Z", - "iopub.status.idle": "2023-10-19T02:47:41.568598Z", - "shell.execute_reply": "2023-10-19T02:47:41.568053Z" + "iopub.execute_input": "2023-10-19T14:40:02.507719Z", + "iopub.status.busy": "2023-10-19T14:40:02.507477Z", + "iopub.status.idle": "2023-10-19T14:41:13.658634Z", + "shell.execute_reply": "2023-10-19T14:41:13.658109Z" } }, "outputs": [ @@ -192,12 +192,12 @@ " message: CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH\n", " success: True\n", " status: 0\n", - " fun: -77.62901282341039\n", - " x: [-2.372e-02 1.027e+00 ... 1.257e-01 2.370e-01]\n", - " nit: 265\n", - " jac: [ 2.842e-06 2.842e-05 ... 2.274e-05 -8.527e-06]\n", - " nfev: 20878\n", - " njev: 286\n", + " fun: -77.62873343946598\n", + " x: [-2.541e-01 -8.978e-02 ... 2.239e-01 -5.438e-01]\n", + " nit: 329\n", + " jac: [ 6.537e-05 3.098e-04 ... 2.956e-04 -1.734e-04]\n", + " nfev: 25696\n", + " njev: 352\n", " hess_inv: <72x72 LbfgsInvHessProduct with dtype=float64>\n" ] } @@ -252,10 +252,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:47:41.571164Z", - "iopub.status.busy": "2023-10-19T02:47:41.570955Z", - "iopub.status.idle": "2023-10-19T02:48:45.937231Z", - "shell.execute_reply": "2023-10-19T02:48:45.936737Z" + "iopub.execute_input": "2023-10-19T14:41:13.662631Z", + "iopub.status.busy": "2023-10-19T14:41:13.661664Z", + "iopub.status.idle": "2023-10-19T14:42:35.356542Z", + "shell.execute_reply": "2023-10-19T14:42:35.356016Z" } }, "outputs": [ @@ -267,12 +267,12 @@ " message: CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH\n", " success: True\n", " status: 0\n", - " fun: -77.62857380046123\n", - " x: [-9.474e-01 -7.735e-01 ... -1.104e+00 -6.212e-01]\n", - " nit: 456\n", - " jac: [-3.311e-04 5.016e-04 ... 1.791e-04 -4.462e-04]\n", - " nfev: 22748\n", - " njev: 484\n", + " fun: -77.62881470757267\n", + " x: [-3.795e+00 -1.386e+00 ... -4.020e-01 1.230e-01]\n", + " nit: 585\n", + " jac: [ 4.434e-04 -1.933e-04 ... 4.007e-04 -1.450e-04]\n", + " nfev: 29422\n", + " njev: 626\n", " hess_inv: <46x46 LbfgsInvHessProduct with dtype=float64>\n" ] } diff --git a/.doctrees/nbsphinx/tutorials/05-fermion-operator.ipynb b/.doctrees/nbsphinx/tutorials/05-fermion-operator.ipynb index 1ae89228e..fa09bcb38 100644 --- a/.doctrees/nbsphinx/tutorials/05-fermion-operator.ipynb +++ b/.doctrees/nbsphinx/tutorials/05-fermion-operator.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:47.720976Z", - "iopub.status.busy": "2023-10-19T02:48:47.720625Z", - "iopub.status.idle": "2023-10-19T02:48:48.011002Z", - "shell.execute_reply": "2023-10-19T02:48:48.010479Z" + "iopub.execute_input": "2023-10-19T14:42:37.077633Z", + "iopub.status.busy": "2023-10-19T14:42:37.077306Z", + "iopub.status.idle": "2023-10-19T14:42:37.362479Z", + "shell.execute_reply": "2023-10-19T14:42:37.361769Z" } }, "outputs": [ @@ -76,10 +76,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.013922Z", - "iopub.status.busy": "2023-10-19T02:48:48.013514Z", - "iopub.status.idle": "2023-10-19T02:48:48.017207Z", - "shell.execute_reply": "2023-10-19T02:48:48.016749Z" + "iopub.execute_input": "2023-10-19T14:42:37.367296Z", + "iopub.status.busy": "2023-10-19T14:42:37.366261Z", + "iopub.status.idle": "2023-10-19T14:42:37.372138Z", + "shell.execute_reply": "2023-10-19T14:42:37.371678Z" } }, "outputs": [ @@ -110,10 +110,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.019690Z", - "iopub.status.busy": "2023-10-19T02:48:48.019374Z", - "iopub.status.idle": "2023-10-19T02:48:48.023718Z", - "shell.execute_reply": "2023-10-19T02:48:48.023278Z" + "iopub.execute_input": "2023-10-19T14:42:37.375800Z", + "iopub.status.busy": "2023-10-19T14:42:37.374921Z", + "iopub.status.idle": "2023-10-19T14:42:37.381567Z", + "shell.execute_reply": "2023-10-19T14:42:37.381116Z" } }, "outputs": [ @@ -121,17 +121,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(3), des_a(0)): -0.5,\n", - " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,\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_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,\n", + " (cre_a(3), des_a(0)): -0.5,\n", + " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", - " (cre_b(2)): 0-0.25j,\n", + " (cre_a(0), des_a(3)): 1,\n", " (cre_b(1), des_b(5), cre_a(4)): 2+2j,\n", + " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,\n", " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", - " (cre_a(0), des_a(3)): 1,\n", - " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j\n", + " (cre_b(2)): 0-0.25j\n", "})" ] }, @@ -169,10 +169,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.027444Z", - "iopub.status.busy": "2023-10-19T02:48:48.026559Z", - "iopub.status.idle": "2023-10-19T02:48:48.032272Z", - "shell.execute_reply": "2023-10-19T02:48:48.031808Z" + "iopub.execute_input": "2023-10-19T14:42:37.385304Z", + "iopub.status.busy": "2023-10-19T14:42:37.384396Z", + "iopub.status.idle": "2023-10-19T14:42:37.390385Z", + "shell.execute_reply": "2023-10-19T14:42:37.389901Z" } }, "outputs": [ @@ -180,17 +180,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(3), des_a(0)): 0+3j,\n", - " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,\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_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,\n", + " (cre_a(3), des_a(0)): 0+3j,\n", + " (cre_a(0), des_a(3), cre_b(2)): 2,\n", " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", - " (cre_b(2)): -5,\n", + " (cre_a(0), des_a(3)): 0-6j,\n", " (cre_b(1), des_b(5), cre_a(4)): 12-12j,\n", + " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,\n", " (cre_a(3), des_a(0), cre_b(2)): -1,\n", - " (cre_a(0), des_a(3)): 0-6j,\n", - " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 2\n", + " (cre_b(2)): -5\n", "})" ] }, @@ -219,10 +219,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.036387Z", - "iopub.status.busy": "2023-10-19T02:48:48.035466Z", - "iopub.status.idle": "2023-10-19T02:48:48.040999Z", - "shell.execute_reply": "2023-10-19T02:48:48.040538Z" + "iopub.execute_input": "2023-10-19T14:42:37.394709Z", + "iopub.status.busy": "2023-10-19T14:42:37.393740Z", + "iopub.status.idle": "2023-10-19T14:42:37.399514Z", + "shell.execute_reply": "2023-10-19T14:42:37.399055Z" } }, "outputs": [ @@ -230,16 +230,16 @@ "data": { "text/plain": [ "FermionOperator({\n", + " (cre_a(3), des_a(0)): 0+3j,\n", + " (cre_b(2)): -5,\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_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", - " (cre_b(2), cre_a(3), des_a(0)): -1,\n", - " (cre_b(2), cre_a(0), des_a(3)): 2,\n", " (cre_a(0), des_a(3)): 0-6j,\n", - " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", + " (cre_b(2), cre_a(0), des_a(3)): 2,\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)): -5,\n", - " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", - " (cre_a(3), des_a(0)): 0+3j\n", + " (cre_b(2), cre_a(3), des_a(0)): -1,\n", + " (cre_b(1), cre_a(4), des_b(5)): -12+12j\n", "})" ] }, @@ -264,10 +264,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.043752Z", - "iopub.status.busy": "2023-10-19T02:48:48.043401Z", - "iopub.status.idle": "2023-10-19T02:48:48.048074Z", - "shell.execute_reply": "2023-10-19T02:48:48.047596Z" + "iopub.execute_input": "2023-10-19T14:42:37.403183Z", + "iopub.status.busy": "2023-10-19T14:42:37.402262Z", + "iopub.status.idle": "2023-10-19T14:42:37.407487Z", + "shell.execute_reply": "2023-10-19T14:42:37.407040Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.050711Z", - "iopub.status.busy": "2023-10-19T02:48:48.050309Z", - "iopub.status.idle": "2023-10-19T02:48:48.056567Z", - "shell.execute_reply": "2023-10-19T02:48:48.056091Z" + "iopub.execute_input": "2023-10-19T14:42:37.411097Z", + "iopub.status.busy": "2023-10-19T14:42:37.410179Z", + "iopub.status.idle": "2023-10-19T14:42:37.416471Z", + "shell.execute_reply": "2023-10-19T14:42:37.416023Z" } }, "outputs": [ @@ -340,21 +340,21 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.059325Z", - "iopub.status.busy": "2023-10-19T02:48:48.058968Z", - "iopub.status.idle": "2023-10-19T02:48:48.066273Z", - "shell.execute_reply": "2023-10-19T02:48:48.065819Z" + "iopub.execute_input": "2023-10-19T14:42:37.420049Z", + "iopub.status.busy": "2023-10-19T14:42:37.419152Z", + "iopub.status.idle": "2023-10-19T14:42:37.426669Z", + "shell.execute_reply": "2023-10-19T14:42:37.426204Z" } }, "outputs": [ { "data": { "text/plain": [ - "array([0. +0.j , 0. +0.j ,\n", - " 0. +0.j , 0. +0.j ,\n", - " 0.0035998+0.01708495j, 0. +0.j ,\n", - " 0. +0.j , 0. +0.j ,\n", - " 0. +0.j ])" + "array([0. +0.j , 0. +0.j ,\n", + " 0. +0.j , 0. +0.j ,\n", + " 0.11889056-0.13114645j, 0. +0.j ,\n", + " 0. +0.j , 0. +0.j ,\n", + " 0. +0.j ])" ] }, "execution_count": 8, @@ -379,10 +379,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.069821Z", - "iopub.status.busy": "2023-10-19T02:48:48.068935Z", - "iopub.status.idle": "2023-10-19T02:48:48.080969Z", - "shell.execute_reply": "2023-10-19T02:48:48.080523Z" + "iopub.execute_input": "2023-10-19T14:42:37.430250Z", + "iopub.status.busy": "2023-10-19T14:42:37.429345Z", + "iopub.status.idle": "2023-10-19T14:42:37.441262Z", + "shell.execute_reply": "2023-10-19T14:42:37.440811Z" } }, "outputs": [ diff --git a/.doctrees/tutorials/03-double-factorized.doctree b/.doctrees/tutorials/03-double-factorized.doctree index 09a268958..f54f0264c 100644 Binary files a/.doctrees/tutorials/03-double-factorized.doctree and b/.doctrees/tutorials/03-double-factorized.doctree differ diff --git a/.doctrees/tutorials/04-lucj.doctree b/.doctrees/tutorials/04-lucj.doctree index 0d816da2a..58be5e64f 100644 Binary files a/.doctrees/tutorials/04-lucj.doctree and b/.doctrees/tutorials/04-lucj.doctree differ diff --git a/.doctrees/tutorials/05-fermion-operator.doctree b/.doctrees/tutorials/05-fermion-operator.doctree index 88213ce5c..d0a4efb32 100644 Binary files a/.doctrees/tutorials/05-fermion-operator.doctree and b/.doctrees/tutorials/05-fermion-operator.doctree differ diff --git a/searchindex.js b/searchindex.js index a3f2df57d..70940076b 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api/generated/ffsim", "api/generated/ffsim.contract", "api/generated/ffsim.gates", "api/generated/ffsim.hamiltonians", "api/generated/ffsim.linalg", "api/generated/ffsim.protocols", "api/generated/ffsim.trotter", "api/generated/ffsim.variational", "api/generated/modules", "api/index", "index", "tutorials/01-introduction", "tutorials/02-orbital-rotation", "tutorials/03-double-factorized", "tutorials/04-lucj", "tutorials/05-fermion-operator", "tutorials/index"], "filenames": ["api/generated/ffsim.rst", "api/generated/ffsim.contract.rst", "api/generated/ffsim.gates.rst", "api/generated/ffsim.hamiltonians.rst", "api/generated/ffsim.linalg.rst", "api/generated/ffsim.protocols.rst", "api/generated/ffsim.trotter.rst", "api/generated/ffsim.variational.rst", "api/generated/modules.rst", "api/index.rst", "index.rst", "tutorials/01-introduction.ipynb", "tutorials/02-orbital-rotation.ipynb", "tutorials/03-double-factorized.ipynb", "tutorials/04-lucj.ipynb", "tutorials/05-fermion-operator.ipynb", "tutorials/index.rst"], "titles": ["ffsim package", "ffsim.contract package", "ffsim.gates package", "ffsim.hamiltonians package", "ffsim.linalg package", "ffsim.protocols package", "ffsim.trotter package", "ffsim.variational package", "ffsim", "API reference", "ffsim documentation", "Introduction to ffsim", "Orbital rotations and quadratic Hamiltonians", "Diagonal Coulomb operators and double-factorized Trotter simulation", "The local unitary cluster Jastrow (LUCJ) ansatz", "The FermionOperator class", "Tutorials"], "terms": {"contract": [0, 8, 9, 12], "diag_coulomb": [0, 8], "contract_diag_coulomb": [0, 1], "diag_coulomb_linop": [0, 1], "hamiltonian": [0, 6, 8, 9, 14, 16], "hamiltonian_linop": [0, 1, 12], "hamiltonian_trac": [0, 1], "num_op_sum": [0, 8], "contract_num_op_sum": [0, 1], "num_op_sum_linop": [0, 1], "gate": [0, 8, 9, 14], "basic_g": [0, 8], "apply_fsim_g": [0, 2], "apply_givens_rot": [0, 2], "apply_hop_g": [0, 2], "apply_num_interact": [0, 2], "apply_num_num_interact": [0, 2], "apply_num_op_prod_interact": [0, 2], "apply_tunneling_interact": [0, 2], "apply_diag_coulomb_evolut": [0, 2, 13], "apply_num_op_sum_evolut": [0, 2, 12, 13], "orbital_rot": [0, 1, 3, 4, 6, 7, 8, 11, 12, 13], "apply_orbital_rot": [0, 2, 11, 12], "gen_orbital_rotation_index": [0, 2], "double_factorized_hamiltonian": [0, 8, 13], "doublefactorizedhamiltonian": [0, 3, 6, 13], "one_body_tensor": [0, 1, 3, 6, 12, 13], "diag_coulomb_mat": [0, 3, 6, 13], "constant": [0, 1, 3, 13, 14], "z_represent": [0, 1, 2, 3, 6], "norb": [0, 1, 2, 3, 5, 6, 7, 11, 12, 13, 14, 15], "to_number_represent": [0, 3], "to_z_represent": [0, 3], "molecular_hamiltonian": [0, 8], "molecularhamiltonian": [0, 3], "two_body_tensor": [0, 1, 3, 4, 13], "linalg": [0, 8, 9, 12, 13, 15], "double_factor": [0, 8], "double_factorized_t2": [0, 4], "modified_choleski": [0, 4], "optimal_diag_coulomb_mat": [0, 4], "given": [0, 1, 2, 6, 8, 12, 13], "apply_matrix_to_slic": [0, 4], "givens_decomposit": [0, 4], "zrotg": [0, 4], "expm_multiply_taylor": [0, 4], "lup": [0, 4], "predic": [0, 8], "is_antihermitian": [0, 4], "is_hermitian": [0, 4], "is_orthogon": [0, 4], "is_real_symmetr": [0, 4], "is_special_orthogon": [0, 4], "is_unitari": [0, 4], "protocol": [0, 8, 9], "approximate_equ": [0, 8], "supportsapproximateequ": [0, 5], "approx_eq": [0, 5], "linear_oper": [0, 8, 13, 14, 15], "supportslinearoper": [0, 5], "trace": [0, 1, 8, 13], "supportstrac": [0, 5], "trotter": [0, 8, 9, 16], "qdrift": [0, 8], "expectation_squared_diag_coulomb": [0, 6], "one_body_square_decomposit": [0, 6], "qdrift_prob": [0, 6], "simulate_qdrift_double_factor": [0, 6], "spectral_norm_diag_coulomb": [0, 6], "spectral_norm_one_body_tensor": [0, 6], "variance_diag_coulomb": [0, 6], "variance_one_body_tensor": [0, 6], "simulate_trotter_double_factor": [0, 6, 13], "variat": [0, 8, 9, 14], "lucj": [0, 8, 16], "ucjoper": [0, 7, 14], "diag_coulomb_mats_alpha_alpha": [0, 7], "diag_coulomb_mats_alpha_beta": [0, 7], "final_orbital_rot": [0, 7], "from_paramet": [0, 7, 14], "from_t_amplitud": [0, 7, 14], "n_rep": [0, 7, 14], "to_paramet": [0, 7, 14], "to_t_amplitud": [0, 7], "apply_ucj_oper": [0, 7, 14], "The": [0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 16], "fermionact": [0, 8, 9], "namedtupl": 0, "construct": [0, 1, 13, 14, 15], "function": [0, 1, 2, 3, 4, 6, 7, 11, 12, 13, 14, 15], "class": [0, 3, 5, 7, 11, 14, 16], "action": [0, 1, 8, 12, 15], "bool": [0, 1, 2, 3, 4, 5, 6, 7], "spin": [0, 1, 2, 7, 8, 11, 12, 14, 15], "orb": [0, 8, 15], "int": [0, 1, 2, 3, 4, 5, 6, 7, 13], "sourc": [0, 1, 2, 3, 4, 5, 6, 7], "base": [0, 3, 4, 5, 7, 14], "A": [0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 14, 15], "fermion": [0, 2, 10, 11, 12, 14, 15], "creat": [0, 2, 11, 12, 13, 14, 15], "new": [0, 12, 15], "instanc": [0, 12], "alia": 0, "field": 0, "number": [0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15], "0": [0, 1, 2, 3, 6, 12, 13, 14, 15], "2": [0, 1, 2, 3, 4, 11, 12, 13, 14, 15], "1": [0, 2, 3, 4, 6, 7, 11, 12, 13, 14, 15], "cre": [0, 8, 9], "paramet": [0, 1, 2, 3, 4, 5, 6, 7, 14], "orbit": [0, 1, 2, 3, 4, 5, 6, 7, 11, 13, 14, 15, 16], "fals": [0, 1, 2, 3, 4, 5, 6, 7, 15], "alpha": [0, 1, 2, 5, 6, 7, 11, 14, 15], "true": [0, 2, 3, 4, 5, 6, 7, 11, 14, 15], "beta": [0, 1, 2, 5, 6, 7, 11, 14, 15], "index": [0, 2, 10, 11, 14, 15], "act": [0, 3, 15], "return": [0, 1, 2, 3, 4, 5, 6, 7, 13, 14, 15], "type": [0, 1, 2, 3, 4, 5, 6, 7, 13], "cre_a": [0, 8, 9, 15], "cre_b": [0, 8, 9, 15], "de": [0, 8, 9], "destroi": [0, 15], "des_a": [0, 8, 9, 15], "des_b": [0, 8, 9, 15], "moleculardata": [0, 8, 9, 13, 14], "nelec": [0, 1, 2, 5, 6, 7, 11, 12, 13, 14, 15], "core_energi": 0, "dipole_integr": 0, "none": [0, 1, 2, 3, 4, 6, 7], "orbital_symmetri": 0, "object": [0, 3, 4, 5, 7, 13, 14, 15], "random_antihermitian": [0, 8, 9], "dim": [0, 6, 8, 9, 11, 15], "seed": [0, 6, 11, 12], "dtype": [0, 14], "complex": [0, 4], "anti": [0, 4], "hermitian": [0, 4, 12], "matrix": [0, 1, 2, 3, 4, 6, 11, 12, 13, 14, 15], "width": 0, "height": 0, "rank": [0, 3, 4], "If": [0, 1, 2, 3, 4, 6, 7, 15], "maximum": [0, 3, 4], "i": [0, 1, 2, 3, 4, 6, 7, 11, 12, 13, 14, 15], "us": [0, 1, 2, 3, 4, 6, 11, 12, 13, 14, 15], "initi": [0, 6, 7, 13, 14], "pseudorandom": [0, 6], "gener": [0, 2, 6, 11, 12, 13, 14], "should": [0, 6, 12, 13], "valid": [0, 6], "input": [0, 1, 6, 14], "np": [0, 2, 5, 6, 12, 13, 14], "default_rng": [0, 6], "dype": 0, "data": [0, 2, 6, 7, 13, 14, 15], "result": [0, 1, 4, 7, 12, 13, 14], "ndarrai": [0, 1, 2, 3, 4, 6, 7, 13], "sampl": [0, 6], "random_hermitian": [0, 8, 9, 12], "random_orthogon": [0, 8, 9], "float": [0, 1, 2, 3, 4, 5, 6, 13], "orthogon": [0, 4], "distribut": 0, "haar": 0, "measur": 0, "an": [0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15], "els": [0, 6], "refer": [0, 3, 4, 10, 14], "arxiv": [0, 3, 4], "math": 0, "ph": 0, "0609050": 0, "random_real_symmetric_matrix": [0, 8, 9], "real": [0, 1, 2, 3, 4, 7, 12, 13, 14], "symmetr": [0, 1, 2, 3, 4, 6, 13, 14], "option": [0, 1, 2, 3, 4, 6, 7, 14], "random_special_orthogon": [0, 8, 9], "special": [0, 4, 11], "random_statevector": [0, 8, 9, 15], "vector": [0, 1, 2, 4, 6, 7, 11, 12, 14, 15], "from": [0, 7, 11, 12, 14, 15], "uniform": [0, 6], "dimens": [0, 6, 11], "random_t2_amplitud": [0, 8, 9], "nocc": [0, 2, 7], "t2": [0, 4, 7, 14], "amplitud": [0, 4, 7, 14], "tensor": [0, 1, 3, 4, 6, 13, 14], "ar": [0, 1, 2, 3, 4, 5, 6, 11, 12, 13, 14, 15], "occupi": [0, 1, 2, 13], "electron": [0, 1, 2, 5, 6, 7, 11, 13], "random_two_body_tensor_r": [0, 8, 9], "two": [0, 1, 2, 3, 4, 5, 6, 7, 13, 14], "bodi": [0, 1, 3, 4, 6, 13, 14], "valu": [0, 3, 4, 6, 7, 13, 14], "shape": [0, 4, 6, 11, 14], "default": [0, 3, 4], "behavior": [0, 3, 4], "which": [0, 2, 3, 4, 11, 12, 13, 14, 15], "random_unitari": [0, 8, 9, 11, 12], "unitari": [0, 1, 2, 3, 4, 7, 12, 13, 16], "get": [0, 1, 12, 13, 14], "fci": [0, 1, 11, 14], "space": [0, 14], "spatial": [0, 1, 2, 3, 5, 7, 11, 13, 14, 15], "tupl": [0, 1, 2, 4, 5, 6, 7, 13, 15], "pair": [0, 2], "integ": [0, 2], "dim_a": [0, 11], "dim_b": [0, 11], "repres": [0, 3, 5, 6, 11, 14, 15], "one_hot": [0, 8, 9], "arrai": [0, 2, 4, 6, 11, 15], "all": [0, 2, 14, 15], "zero": [0, 4], "except": 0, "one": [0, 1, 2, 3, 4, 6, 11, 13, 14], "specifi": [0, 2, 3, 4, 5, 6, 14], "desir": 0, "place": [0, 1, 2, 6, 7, 14, 15], "hot": 0, "slater_determin": [0, 8, 9, 11, 12, 13, 14], "occupied_orbit": [0, 11, 12, 13, 14], "slater": [0, 6, 11, 12, 13], "determin": [0, 4, 6, 11, 12, 13], "sequenc": [0, 2], "list": [0, 1, 2, 4, 6, 14], "first": [0, 2, 4, 5, 6, 12, 13, 14], "second": [0, 2, 4, 13], "rotat": [0, 1, 2, 3, 4, 6, 7, 11, 13, 14, 16], "appli": [0, 1, 2, 4, 7, 11, 12, 13, 14], "configur": [0, 11], "In": [0, 7, 12, 13, 14, 15], "other": [0, 5, 14], "word": [0, 14], "thi": [0, 2, 3, 4, 6, 7, 11, 12, 13, 14], "describ": [0, 1, 2, 7, 11, 12, 13, 14, 15], "slater_determinant_one_rdm": [0, 8, 9], "particl": [0, 6, 11, 12, 15], "reduc": [0, 6], "densiti": [0, 6], "contain": [0, 2, 4, 7, 14, 15], "indic": [0, 3, 4, 14, 15], "similarli": [0, 13], "util": [0, 4], "random_nelec": [0, 8, 9], "n_alpha": [0, 11, 12, 13, 14], "n_beta": [0, 11, 12, 13, 14], "random_occupied_orbit": [0, 8, 9], "occ_a": 0, "occ_b": 0, "expectation_pow": [0, 8, 9], "one_rdm": [0, 6], "power": 0, "expect": [0, 6, 12], "oper": [0, 1, 2, 3, 5, 6, 7, 12, 14, 15, 16], "w": [0, 12, 13], "r": [0, 1, 3, 4, 13], "t": [0, 2, 3, 4, 12, 13], "o": 0, "ha": [0, 1, 2, 4, 7, 11, 12, 13, 14], "form": [0, 1, 2, 3, 4, 7, 12, 13, 14, 15], "sum_": [0, 1, 2, 3, 4, 7, 12, 13, 14], "pq": [0, 1, 3, 4, 13], "m_": 0, "a_p": 0, "dagger": [0, 1, 2, 4, 7, 12, 13, 14, 15], "a_q": 0, "take": [0, 3, 11, 14], "m": [0, 4, 12], "its": [0, 2, 3, 4, 6, 7, 12, 13, 15], "argument": [0, 3, 4, 6, 12], "let": [0, 13, 15], "lvert": [0, 14], "psi": [0, 14], "rangl": [0, 14], "Then": 0, "quantiti": 0, "langl": 0, "rvert": 0, "k": [0, 4, 7, 12, 13, 14, 15], "expectation_product": [0, 8, 9], "product": [0, 2, 13, 15], "matric": [0, 1, 3, 4, 7, 12, 13, 14], "o_1": 0, "o_2": 0, "dot": 0, "o_k": 0, "softwar": [0, 11], "librari": [0, 11], "fast": 0, "simul": [0, 6, 10, 11, 12, 14, 16], "quantum": [0, 2, 3, 10, 11, 13, 14], "circuit": [0, 3, 10, 11], "diagon": [1, 2, 3, 4, 6, 7, 12, 14, 16], "coulomb": [1, 2, 3, 4, 6, 7, 14, 16], "vec": [1, 2, 4, 6, 7, 11, 12, 13, 15], "mat": [1, 2, 4], "mat_alpha_beta": [1, 2], "occupations_a": [1, 2], "occupations_b": [1, 2], "strings_a": [1, 2], "strings_b": [1, 2], "j": [1, 2, 3, 7, 12, 13, 14, 15], "sigma": [1, 2, 3, 7, 12, 13, 14], "tau": [1, 2, 3, 7, 13, 14], "z_": [1, 2], "ij": [1, 2, 3, 7, 12, 13, 14], "n_": [1, 2, 7, 11, 12, 13, 14], "where": [1, 2, 3, 4, 6, 7, 12, 13, 14], "denot": [1, 2, 3, 12], "z": [1, 2, 3, 4, 6, 11, 15], "also": [1, 2, 6, 7, 12, 15], "term": [1, 2, 3, 4, 6, 7, 13, 14, 15], "sum": [1, 2, 6, 13], "differ": [1, 2, 3, 4, 7, 14], "neq": [1, 2, 3], "state": [1, 2, 6, 7, 8, 9, 12, 13, 14], "transform": [1, 2, 3, 7, 11, 12], "coeffici": [1, 2, 3, 4, 7, 12, 14, 15], "interact": [1, 2, 11], "between": [1, 2, 3, 4, 14], "whether": [1, 2, 3, 4, 5, 6, 7, 15], "represent": [1, 3, 4, 6, 11, 15], "string": [1, 2, 6, 11, 15], "convert": [1, 5, 7, 11, 12, 13, 15], "linear": [1, 2, 4, 5, 12, 15], "mathcal": [1, 2, 7, 12, 13, 14], "u": [1, 2, 3, 4], "linearoper": [1, 5, 12, 13, 15], "implement": [1, 4, 11, 12, 14], "molecular": [1, 3, 14], "h": [1, 3, 13, 14], "h_": [1, 3, 4, 13], "dagger_": [1, 2, 3, 12, 13], "p": [1, 2, 3, 4, 13, 14], "a_": [1, 2, 3, 12, 13, 15], "q": [1, 3, 13], "frac12": [1, 3, 7, 13, 14], "pqr": [1, 3, 4, 13], "": [1, 3, 4, 9, 11, 13, 14, 15], "here": [1, 3, 4, 11, 12, 13], "call": [1, 3, 11, 12, 13, 15], "basi": [1, 3, 7, 12, 13, 14], "combin": [1, 2, 12, 15], "coeff": [1, 2], "lambda_i": [1, 2, 12], "basic": [2, 13], "comput": [2, 4, 5, 6, 12, 14], "theta": 2, "phi": 2, "target_orb": 2, "copi": [2, 6, 7, 15], "fsim": 2, "consist": 2, "tunnel": 2, "follow": [2, 6, 11, 12, 13, 14, 15], "note": [2, 3, 4, 14, 15], "neg": 2, "sign": 2, "convent": 2, "angl": 2, "text": [2, 3, 13], "nn": 2, "exp": [2, 12], "left": [2, 6, 7, 12, 15], "dagger_i": 2, "a_i": 2, "dagger_j": 2, "a_j": 2, "right": [2, 12, 15], "under": [2, 3], "jordan": [2, 3], "wigner": [2, 3], "when": [2, 13, 14, 15], "neighbor": 2, "qubit": [2, 14], "begin": [2, 12, 14], "pmatrix": 2, "co": 2, "sin": 2, "e": [2, 6, 7, 13, 14, 15], "end": [2, 7, 12, 14], "befor": [2, 6, 7, 14, 15], "alwai": [2, 4, 6, 7, 12], "newli": [2, 6, 7], "alloc": [2, 6, 7], "origin": [2, 3, 4, 6, 7, 13], "untouch": [2, 6, 7], "mai": [2, 4, 6, 7, 14], "still": [2, 6, 7, 14], "have": [2, 3, 4, 6, 7, 11, 12, 14, 15], "overwritten": [2, 6, 7], "It": [2, 3, 4, 6, 7, 11, 13, 15], "possibl": [2, 3, 4, 6, 7], "modifi": [2, 3, 4, 6, 7], "g": [2, 6, 14], "hop": 2, "pi": [2, 3], "n": [2, 3, 4, 11, 12, 13, 14], "prod": 2, "give": [2, 12], "time": [2, 3, 4, 6, 11, 13], "evolut": [2, 6, 13], "orbital_rotation_index_a": 2, "orbital_rotation_index_b": 2, "evolv": [2, 6, 13], "rais": 2, "valueerror": 2, "must": [2, 4, 15], "dimension": [2, 4, 6, 11], "length": [2, 11, 13, 14], "allow_row_permut": 2, "allow_col_permut": 2, "map": [2, 12, 15], "creation": [2, 12, 15], "mapsto": [2, 12], "u_": 2, "ji": [2, 12], "equival": 2, "log": 2, "_": [2, 3, 4, 7, 12, 13, 14], "allow": [2, 3, 4, 14], "permut": [2, 4], "row": [2, 11], "column": [2, 4, 11, 12], "wa": 2, "well": 2, "actual": [2, 12, 14], "effect": 2, "both": [2, 3, 4], "set": [2, 3, 4, 7, 11, 12, 13, 14], "onli": [2, 3, 4, 11, 12, 14], "linkstr_index": 2, "perform": [2, 3, 4, 7, 12, 13], "diag_str": 2, "off_diag_str": 2, "off_diag_index": 2, "three": [2, 15], "numpi": [2, 4, 6, 11, 12, 13, 14], "x": [2, 14], "binom": 2, "th": [2, 12], "unoccupi": 2, "3": [2, 11, 12, 13, 14, 15], "ax": 2, "correspond": [2, 3, 4, 6, 12, 13], "For": [2, 11, 12, 14, 15], "fix": [2, 4, 11], "choic": [2, 11], "str0": 2, "last": 2, "each": [2, 3, 4, 6, 7, 11, 13, 14, 15], "str1": 2, "annihil": [2, 15], "pariti": 2, "doubl": [3, 4, 6, 14, 16], "factor": [3, 4, 6, 14, 16], "low": [3, 4, 11], "decomposit": [3, 4, 6], "kappa_": 3, "sum_t": 3, "qi": 3, "altern": [3, 13], "sometim": 3, "yield": [3, 4, 13, 14], "simpler": 3, "frac": 3, "pauli": 3, "obtain": [3, 12, 13, 14], "rewrit": 3, "part": [3, 4], "updat": [3, 13], "appropri": 3, "kappa": 3, "frac18": 3, "asterisk": 3, "summat": 3, "over": 3, "rather": [3, 4, 11], "than": [3, 4, 6, 11, 14], "properti": [3, 7, 12], "tol": [3, 4, 7], "1e": [3, 4, 5, 6, 7], "08": [3, 4, 5, 7], "max_vec": [3, 4], "optim": [3, 4, 6, 7, 14], "method": [3, 4, 6, 14], "l": [3, 4, 7, 13, 14], "bfg": [3, 4, 14], "b": [3, 4, 12, 14], "diag_coulomb_mask": [3, 4], "choleski": [3, 4], "decompos": [3, 4, 6, 13], "output": [3, 13, 14], "guarante": 3, "so": [3, 4, 12, 13, 14, 15], "depend": [3, 4, 6, 11], "error": [3, 4], "threshold": [3, 4], "larger": [3, 4, 15], "lead": 3, "smaller": [3, 4, 13, 15], "furthermor": [3, 4], "max_rank": 3, "upper": [3, 4, 6, 14], "bound": [3, 4, 6], "routin": [3, 4, 11, 15], "straightforward": [3, 4], "exact": [3, 4, 11, 13], "nest": [3, 4], "eigenvalu": [3, 4, 6, 12], "addition": [3, 4], "can": [3, 4, 5, 7, 11, 12, 13, 14, 15], "choos": [3, 4, 11, 14], "store": [3, 4, 6, 13, 14], "achiev": [3, 4, 13], "compress": [3, 4], "enabl": [3, 4], "attempt": [3, 4], "minim": [3, 4, 14], "least": [3, 4], "squar": [3, 4, 6, 14], "quantifi": [3, 4], "scipi": [3, 4, 5, 11, 12, 13, 14, 15], "pass": [3, 4, 12, 15], "gradient": [3, 4], "core": [3, 4], "constrain": [3, 4], "certain": [3, 4], "element": [3, 4], "nonzero": [3, 4, 14], "boolean": [3, 4], "triangular": [3, 4], "becaus": [3, 4, 11, 13, 14, 15], "current": 3, "support": [3, 6, 7, 15], "toler": [3, 4, 5, 14], "defin": [3, 4, 14], "absolut": [3, 4, 5, 6], "reconstruct": [3, 4], "limit": [3, 4, 14], "keep": [3, 4], "overrid": [3, 4], "str": [3, 4, 6], "see": [3, 4, 5], "document": [3, 4, 5], "callback": [3, 4], "usag": [3, 4, 15], "dict": [3, 4, 14], "mask": [3, 4], "full": [3, 4, 11], "instead": [3, 4], "much": [3, 4, 11], "more": [3, 4, 11, 14], "expens": [3, 4], "ignor": [3, 4, 13], "1808": [3, 4], "02625": [3, 4], "2104": [3, 4], "08957": [3, 4], "ell": 4, "pk": 4, "qk": 4, "respect": 4, "too": 4, "small": 4, "exce": 4, "collect": 4, "t2_amplitud": [4, 7], "t_": 4, "ijab": 4, "ap": 4, "ip": 4, "bq": 4, "jq": 4, "v_i": 4, "posit": 4, "definit": 4, "No": 4, "check": [4, 12, 13], "verifi": 4, "1711": 4, "02242": 4, "includ": [4, 7, 11, 12, 13], "assembl": 4, "whose": [4, 5, 11], "target": 4, "slice": 4, "out": [4, 13], "12": [4, 6, 15], "safe": 4, "version": 4, "bla": 4, "nan": 4, "either": [4, 14], "veri": 4, "close": 4, "detect": 4, "up": [4, 5, 12], "case": 4, "behav": 4, "were": 4, "exactli": 4, "contrast": 4, "c": [4, 14], "algebra": [4, 15], "expm": 4, "taylor": 4, "seri": 4, "expans": 4, "pivot": 4, "lu": 4, "rtype": 4, "lower": 4, "unit": 4, "rtol": [4, 5], "05": [4, 5, 14], "atol": [4, 5], "approxim": [4, 5, 13], "rel": [4, 5], "numer": [4, 5, 15], "within": [4, 15], "union": 4, "bool_": 4, "equal": 5, "arg": 5, "kwarg": 5, "compar": [5, 13], "obj": 5, "isclos": 5, "interpret": 5, "ani": [5, 12, 14], "otherwis": [5, 6], "diag": 6, "op": [6, 15], "truncation_threshold": 6, "less": [6, 14], "truncat": [6, 14], "sampling_method": 6, "probabl": 6, "rest": [6, 13], "same": [6, 7, 11, 14], "order": [6, 7, 11, 13, 14, 15], "thei": [6, 12, 14, 15], "norm": 6, "proport": [6, 12], "spectral": 6, "requir": [6, 14], "incoher": 6, "channel": 6, "n_particl": 6, "total": [6, 7, 13, 14], "n_step": [6, 13], "n_sampl": 6, "via": [6, 13], "step": [6, 12, 13], "explicit": 6, "whenev": 6, "complet": 6, "character": 6, "trajectori": 6, "random": [6, 8, 9, 11, 12, 15], "final": [6, 7, 13, 14], "just": [6, 13, 14], "statevector": [6, 11, 12], "largest": 6, "singular": 6, "varianc": 6, "rdm": 6, "suzuki": 6, "formula": 6, "local": [7, 16], "cluster": [7, 16], "jastrow": [7, 16], "ansatz": [7, 16], "ucj": 7, "prod_": [7, 14], "w_k": [7, 14], "_k": [7, 13, 14], "mathbf": [7, 12, 13, 14], "commut": [7, 13, 14], "we": [7, 12, 13, 14, 15], "enforc": [7, 14], "As": [7, 11, 12, 13, 14], "involv": [7, 14], "To": [7, 11, 12, 13, 14], "static": 7, "param": 7, "alpha_alpha_indic": [7, 14], "alpha_beta_indic": [7, 14], "with_final_orbital_rot": 7, "t1_amplitud": 7, "t1": [7, 14], "repetit": [7, 14], "possibli": 7, "packag": [8, 9], "subpackag": [8, 9], "submodul": [8, 9], "modul": [8, 9, 10, 11], "content": [8, 9], "fermion_act": [8, 9], "molecular_data": [8, 9], "test": [8, 9, 12, 13], "wick": [8, 9], "ffsim": [9, 12, 13, 14, 15, 16], "faster": 10, "tutori": [10, 12, 13, 14], "api": 10, "search": 10, "page": 10, "conserv": [11, 15], "compon": [11, 15], "By": 11, "advantag": 11, "symmetri": [11, 12], "effici": [11, 15], "level": [11, 13], "doe": [11, 15], "primari": 11, "wai": [11, 12, 14], "directli": [11, 13], "exampl": [11, 12, 14, 15], "code": [11, 13, 14, 15], "show": [11, 12, 13, 14, 15], "how": [11, 12, 13, 14, 15], "import": [11, 12, 13, 14, 15], "occup": [11, 12, 13], "6": [11, 12, 13, 14, 15], "rang": [11, 12, 13, 14], "1234": [11, 12], "rotated_vec": [11, 12], "plain": 11, "Its": 11, "system": [11, 12], "conveni": 11, "calcul": [11, 13, 14], "comb": 11, "assert": 11, "standard": 11, "often": [11, 14], "simpli": [11, 12], "reshap": 11, "reshaped_vec": 11, "pyscf": [11, 13, 14], "fundament": 12, "mode": 12, "sum_j": 12, "That": [12, 15], "satisfi": [12, 15], "anticommut": 12, "relat": [12, 14], "align": [12, 14], "_1": 12, "_2": 12, "section": 12, "ll": [12, 13, 14], "demonstr": [12, 13, 14], "task": 12, "consid": [12, 14], "rewritten": 12, "introduc": [12, 14], "eigendecomposit": 12, "sum_k": [12, 13], "lambda_k": 12, "ik": 12, "jk": 12, "our": [12, 13, 14], "ground": [12, 14], "pick": 12, "phase": 12, "energi": [12, 13, 14], "spars": [12, 13, 15], "lowest": [12, 13], "eigenvector": 12, "eig": [12, 15], "eigsh": 12, "la": 12, "fact": 12, "you": 12, "illustr": 12, "purpos": 12, "explicitli": 12, "eigh": [12, 13], "evolved_vec": 12, "conj": 12, "undo": 12, "expected_phas": 12, "1j": [12, 13, 15], "assert_allclos": 12, "mention": [12, 13], "abov": [12, 13, 15], "below": [12, 13, 14], "better": [12, 13], "4": [12, 13, 14, 15], "evolved_vec_alt": 12, "daunt": 13, "scale": 13, "cell": [13, 14], "hydrogen": 13, "molecul": [13, 14], "stretch": [13, 14], "bond": [13, 14], "build": [13, 14], "h2": 13, "mol": [13, 14], "gto": [13, 14], "mole": [13, 14], "atom": [13, 14], "8": [13, 14, 15], "sto": [13, 14], "6g": [13, 14], "hartree_fock": [13, 14], "scf": [13, 14], "rhf": [13, 14], "kernel": [13, 14], "mol_data": [13, 14], "from_hartree_fock": [13, 14], "mol_hamiltonian": [13, 14], "df_hamiltonian": 13, "converg": [13, 14], "837796382593709": 13, "dataclass": [13, 14], "print": [13, 14, 15], "some": [13, 15], "inform": [13, 15], "One": 13, "27478830e": 13, "01": [13, 14], "66405155e": 13, "16": 13, "07220771e": 13, "77238770e": 13, "5": [13, 14, 15], "23173938e": 13, "57437591e": 13, "33545754e": 13, "12704463e": 13, "48240570e": 13, "61492903e": 13, "24884750e": 13, "53132024e": 13, "21318608e": 13, "00": [13, 14], "25870402e": 13, "76015378e": 13, "07792507e": 13, "14653029e": 13, "50800163e": 13, "59": 13, "58462611e": 13, "31": 13, "52090881e": 13, "03": 13, "00000000e": 13, "24520980e": 13, "15": 13, "7": [13, 14, 15], "07106781e": 13, "48603030e": 13, "although": 13, "alreadi": 13, "built": 13, "manual": 13, "asymmetr": 13, "h_k": 13, "divid": 13, "singl": 13, "exponenti": 13, "individu": [13, 15], "do": [13, 15], "approx": 13, "prod_k": 13, "higher": 13, "deriv": 13, "write": 13, "recal": 13, "addit": [13, 15], "think": 13, "compos": 13, "quadrat": [13, 16], "def": [13, 14], "simulate_trotter_step_double_factor": 13, "one_body_energi": 13, "one_body_basis_chang": 13, "zip": 13, "finish": 13, "handl": 13, "split": 13, "multipl": [13, 15], "wrote": 13, "step_tim": 13, "hartre": [13, 14], "fock": [13, 14], "match": 13, "initial_st": 13, "\u03c8": [13, 14], "hf_energi": 13, "vdot": [13, 14], "f": [13, 14], "8377963825937088": 13, "now": 13, "later": 13, "exact_st": 13, "expm_multipli": 13, "tracea": 13, "fidel": 13, "ab": 13, "9696296369955066": 13, "final_st": [13, 14], "999027574408349": 13, "improv": 13, "increas": 13, "10": 13, "9999906233109657": 13, "commonli": 13, "known": 13, "fourth": 13, "reproduc": 13, "9": [13, 14, 15], "fewer": 13, "9999999336740057": 13, "ethen": 14, "mcscf": 14, "bond_dist": 14, "678": 14, "5626": 14, "9289": 14, "activ": 14, "active_spac": 14, "nelectron": 14, "ca": 14, "casci": 14, "nca": 14, "neleca": 14, "mo": 14, "sort_mo": 14, "energy_fci": 14, "77": 14, "4456267643962": 14, "6290254326717": 14, "ci": 14, "57322412553862": 14, "0000000": 14, "phi_0": 14, "taken": 14, "express": 14, "previou": 14, "constructor": 14, "provid": 14, "ccsd": 14, "mp2": 14, "run": 14, "cc": 14, "frozen": 14, "mo_coeff": 14, "reference_st": 14, "ansatz_st": 14, "initiali": 14, "49387212754471": 14, "e_corr": 14, "04824536314851378": 14, "46975600021688": 14, "facilit": 14, "convers": 14, "precis": 14, "somewhat": 14, "complic": 14, "short": 14, "entri": 14, "non": 14, "redund": 14, "associ": [14, 15], "fun": 14, "x0": 14, "maxfun": 14, "50000": 14, "len": 14, "72": 14, "messag": 14, "rel_reduction_of_f_": 14, "lt": 14, "_factr": 14, "epsmch": 14, "success": 14, "statu": 14, "62901282341039": 14, "372e": 14, "02": 14, "027e": 14, "257e": 14, "370e": 14, "nit": 14, "265": 14, "jac": 14, "842e": 14, "06": 14, "274e": 14, "527e": 14, "nfev": 14, "20878": 14, "njev": 14, "286": 14, "hess_inv": 14, "72x72": 14, "lbfgsinvhessproduct": 14, "float64": 14, "gt": 14, "connect": 14, "swap": 14, "network": 14, "make": 14, "challeng": 14, "noisi": 14, "pre": 14, "fault": 14, "processor": 14, "idea": 14, "impos": 14, "sparsiti": 14, "constraint": 14, "them": 14, "depth": 14, "topologi": 14, "triangl": 14, "sinc": 14, "need": 14, "lattic": 14, "parallel": 14, "line": 14, "rung": 14, "ladder": 14, "With": 14, "setup": 14, "while": 14, "share": 14, "ldot": 14, "without": 14, "Of": 14, "cours": 14, "notic": 14, "decreas": 14, "46": 14, "62857380046123": 14, "474e": 14, "735e": 14, "104e": 14, "212e": 14, "456": 14, "311e": 14, "04": 14, "016e": 14, "791e": 14, "462e": 14, "22748": 14, "484": 14, "46x46": 14, "25": 15, "Such": 15, "programmat": 15, "dictionari": 15, "hash": 15, "tabl": 15, "piec": 15, "being": 15, "upon": 15, "intern": 15, "itself": 15, "recommend": 15, "helper": 15, "shown": 15, "op1": 15, "repr": 15, "view": 15, "displai": 15, "39": 15, "0j": 15, "arithmet": 15, "multipli": 15, "scalar": 15, "go": 15, "op2": 15, "op3": 15, "0625": 15, "125": 15, "25j": 15, "2j": 15, "5j": 15, "good": 15, "awar": 15, "especi": 15, "avoid": 15, "These": 15, "subtract": 15, "divis": 15, "3j": 15, "4j": 15, "12j": 15, "6j": 15, "normal": 15, "normal_ord": 15, "compris": 15, "appear": 15, "descend": 15, "lexicograph": 15, "preserv": 15, "far": 15, "criteria": 15, "conserves_particle_numb": 15, "conserves_spin_z": 15, "subspac": 15, "op4": 15, "linop": 15, "onto": 15, "0035998": 15, "01708495j": 15, "most": 15, "lm": 15, "21984743e": 15, "18j": 15, "introduct": 16, "fermionoper": 16}, "objects": {"": [[0, 0, 0, "-", "ffsim"]], "ffsim": [[1, 0, 0, "-", "contract"], [0, 0, 0, "-", "fermion_action"], [2, 0, 0, "-", "gates"], [3, 0, 0, "-", "hamiltonians"], [4, 0, 0, "-", "linalg"], [0, 0, 0, "-", "molecular_data"], [5, 0, 0, "-", "protocols"], [0, 0, 0, "-", "random"], [0, 0, 0, "-", "states"], [0, 0, 0, "-", "testing"], [6, 0, 0, "-", "trotter"], [7, 0, 0, "-", "variational"], [0, 0, 0, "-", "wick"]], "ffsim.contract": [[1, 0, 0, "-", "diag_coulomb"], [1, 0, 0, "-", "hamiltonian"], [1, 0, 0, "-", "num_op_sum"]], "ffsim.contract.diag_coulomb": [[1, 1, 1, "", "contract_diag_coulomb"], [1, 1, 1, "", "diag_coulomb_linop"]], "ffsim.contract.hamiltonian": [[1, 1, 1, "", "hamiltonian_linop"], [1, 1, 1, "", "hamiltonian_trace"]], "ffsim.contract.num_op_sum": [[1, 1, 1, "", "contract_num_op_sum"], [1, 1, 1, "", "num_op_sum_linop"]], "ffsim.fermion_action": [[0, 2, 1, "", "FermionAction"], [0, 1, 1, "", "cre"], [0, 1, 1, "", "cre_a"], [0, 1, 1, "", "cre_b"], [0, 1, 1, "", "des"], [0, 1, 1, "", "des_a"], [0, 1, 1, "", "des_b"]], "ffsim.fermion_action.FermionAction": [[0, 3, 1, "", "action"], [0, 3, 1, "", "orb"], [0, 3, 1, "", "spin"]], "ffsim.gates": [[2, 0, 0, "-", "basic_gates"], [2, 0, 0, "-", "diag_coulomb"], [2, 0, 0, "-", "num_op_sum"], [2, 0, 0, "-", "orbital_rotation"]], "ffsim.gates.basic_gates": [[2, 1, 1, "", "apply_fsim_gate"], [2, 1, 1, "", "apply_givens_rotation"], [2, 1, 1, "", "apply_hop_gate"], [2, 1, 1, "", "apply_num_interaction"], [2, 1, 1, "", "apply_num_num_interaction"], [2, 1, 1, "", "apply_num_op_prod_interaction"], [2, 1, 1, "", "apply_tunneling_interaction"]], "ffsim.gates.diag_coulomb": [[2, 1, 1, "", "apply_diag_coulomb_evolution"]], "ffsim.gates.num_op_sum": [[2, 1, 1, "", "apply_num_op_sum_evolution"]], "ffsim.gates.orbital_rotation": [[2, 1, 1, "", "apply_orbital_rotation"], [2, 1, 1, "", "gen_orbital_rotation_index"]], "ffsim.hamiltonians": [[3, 0, 0, "-", "double_factorized_hamiltonian"], [3, 0, 0, "-", "molecular_hamiltonian"]], "ffsim.hamiltonians.double_factorized_hamiltonian": [[3, 2, 1, "", "DoubleFactorizedHamiltonian"], [3, 1, 1, "", "double_factorized_hamiltonian"]], "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian": [[3, 3, 1, "", "constant"], [3, 3, 1, "", "diag_coulomb_mats"], [3, 4, 1, "", "norb"], [3, 3, 1, "", "one_body_tensor"], [3, 3, 1, "", "orbital_rotations"], [3, 5, 1, "", "to_number_representation"], [3, 5, 1, "", "to_z_representation"], [3, 3, 1, "", "z_representation"]], "ffsim.hamiltonians.molecular_hamiltonian": [[3, 2, 1, "", "MolecularHamiltonian"]], "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian": [[3, 3, 1, "", "constant"], [3, 4, 1, "", "norb"], [3, 3, 1, "", "one_body_tensor"], [3, 3, 1, "", "two_body_tensor"]], "ffsim.linalg": [[4, 0, 0, "-", "double_factorized"], [4, 0, 0, "-", "givens"], [4, 0, 0, "-", "linalg"], [4, 0, 0, "-", "predicates"]], "ffsim.linalg.double_factorized": [[4, 1, 1, "", "double_factorized"], [4, 1, 1, "", "double_factorized_t2"], [4, 1, 1, "", "modified_cholesky"], [4, 1, 1, "", "optimal_diag_coulomb_mats"]], "ffsim.linalg.givens": [[4, 1, 1, "", "apply_matrix_to_slices"], [4, 1, 1, "", "givens_decomposition"], [4, 1, 1, "", "zrotg"]], "ffsim.linalg.linalg": [[4, 1, 1, "", "expm_multiply_taylor"], [4, 1, 1, "", "lup"]], "ffsim.linalg.predicates": [[4, 1, 1, "", "is_antihermitian"], [4, 1, 1, "", "is_hermitian"], [4, 1, 1, "", "is_orthogonal"], [4, 1, 1, "", "is_real_symmetric"], [4, 1, 1, "", "is_special_orthogonal"], [4, 1, 1, "", "is_unitary"]], "ffsim.molecular_data": [[0, 2, 1, "", "MolecularData"]], "ffsim.protocols": [[5, 0, 0, "-", "approximate_equality"], [5, 0, 0, "-", "linear_operator"], [5, 0, 0, "-", "trace"]], "ffsim.protocols.approximate_equality": [[5, 2, 1, "", "SupportsApproximateEquality"], [5, 1, 1, "", "approx_eq"]], "ffsim.protocols.linear_operator": [[5, 2, 1, "", "SupportsLinearOperator"], [5, 1, 1, "", "linear_operator"]], "ffsim.protocols.trace": [[5, 2, 1, "", "SupportsTrace"], [5, 1, 1, "", "trace"]], "ffsim.random": [[0, 1, 1, "", "random_antihermitian"], [0, 1, 1, "", "random_hermitian"], [0, 1, 1, "", "random_orthogonal"], [0, 1, 1, "", "random_real_symmetric_matrix"], [0, 1, 1, "", "random_special_orthogonal"], [0, 1, 1, "", "random_statevector"], [0, 1, 1, "", "random_t2_amplitudes"], [0, 1, 1, "", "random_two_body_tensor_real"], [0, 1, 1, "", "random_unitary"]], "ffsim.states": [[0, 1, 1, "", "dim"], [0, 1, 1, "", "dims"], [0, 1, 1, "", "one_hot"], [0, 1, 1, "", "slater_determinant"], [0, 1, 1, "", "slater_determinant_one_rdm"]], "ffsim.testing": [[0, 1, 1, "", "random_nelec"], [0, 1, 1, "", "random_occupied_orbitals"]], "ffsim.trotter": [[6, 0, 0, "-", "qdrift"], [6, 0, 0, "-", "trotter"]], "ffsim.trotter.qdrift": [[6, 1, 1, "", "expectation_squared_diag_coulomb"], [6, 1, 1, "", "one_body_square_decomposition"], [6, 1, 1, "", "qdrift_probabilities"], [6, 1, 1, "", "simulate_qdrift_double_factorized"], [6, 1, 1, "", "spectral_norm_diag_coulomb"], [6, 1, 1, "", "spectral_norm_one_body_tensor"], [6, 1, 1, "", "variance_diag_coulomb"], [6, 1, 1, "", "variance_one_body_tensor"]], "ffsim.trotter.trotter": [[6, 1, 1, "", "simulate_trotter_double_factorized"]], "ffsim.variational": [[7, 0, 0, "-", "lucj"]], "ffsim.variational.lucj": [[7, 2, 1, "", "UCJOperator"], [7, 1, 1, "", "apply_ucj_operator"]], "ffsim.variational.lucj.UCJOperator": [[7, 3, 1, "", "diag_coulomb_mats_alpha_alpha"], [7, 3, 1, "", "diag_coulomb_mats_alpha_beta"], [7, 3, 1, "", "final_orbital_rotation"], [7, 5, 1, "", "from_parameters"], [7, 5, 1, "", "from_t_amplitudes"], [7, 4, 1, "", "n_reps"], [7, 4, 1, "", "norb"], [7, 3, 1, "", "orbital_rotations"], [7, 5, 1, "", "to_parameters"], [7, 5, 1, "", "to_t_amplitudes"]], "ffsim.wick": [[0, 1, 1, "", "expectation_power"], [0, 1, 1, "", "expectation_product"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:attribute", "4": "py:property", "5": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "property", "Python property"], "5": ["py", "method", "Python method"]}, "titleterms": {"ffsim": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11], "packag": [0, 1, 2, 3, 4, 5, 6, 7], "subpackag": 0, "submodul": [0, 1, 2, 3, 4, 5, 6, 7], "fermion_act": 0, "modul": [0, 1, 2, 3, 4, 5, 6, 7], "molecular_data": 0, "random": 0, "state": 0, "test": 0, "wick": 0, "content": [0, 1, 2, 3, 4, 5, 6, 7, 10, 16], "contract": 1, "diag_coulomb": [1, 2], "hamiltonian": [1, 3, 12, 13], "num_op_sum": [1, 2], "gate": 2, "basic_g": 2, "orbital_rot": 2, "double_factorized_hamiltonian": 3, "molecular_hamiltonian": 3, "linalg": 4, "double_factor": 4, "given": 4, "predic": 4, "protocol": 5, "approximate_equ": 5, "linear_oper": 5, "trace": 5, "trotter": [6, 13], "qdrift": 6, "variat": 7, "lucj": [7, 14], "api": 9, "refer": 9, "document": 10, "indic": 10, "tabl": 10, "introduct": 11, "orbit": 12, "rotat": 12, "quadrat": 12, "time": 12, "evolut": 12, "diagon": 13, "coulomb": 13, "oper": 13, "doubl": 13, "factor": 13, "simul": 13, "represent": 13, "molecular": 13, "brief": 13, "background": 13, "suzuki": 13, "formula": 13, "implement": 13, "The": [14, 15], "local": 14, "unitari": 14, "cluster": 14, "jastrow": 14, "ansatz": 14, "ucj": 14, "fermionoper": 15, "class": 15, "tutori": 16}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "nbsphinx": 4, "sphinx": 60}, "alltitles": {"ffsim package": [[0, "ffsim-package"]], "Subpackages": [[0, "subpackages"]], "Submodules": [[0, "submodules"], [1, "submodules"], [2, "submodules"], [3, "submodules"], [4, "submodules"], [5, "submodules"], [6, "submodules"], [7, "submodules"]], "ffsim.fermion_action module": [[0, "module-ffsim.fermion_action"]], "ffsim.molecular_data module": [[0, "module-ffsim.molecular_data"]], "ffsim.random module": [[0, "module-ffsim.random"]], "ffsim.states module": [[0, "module-ffsim.states"]], "ffsim.testing module": [[0, "module-ffsim.testing"]], "ffsim.wick module": [[0, "module-ffsim.wick"]], "Module contents": [[0, "module-ffsim"], [1, "module-ffsim.contract"], [2, "module-ffsim.gates"], [3, "module-ffsim.hamiltonians"], [4, "module-ffsim.linalg"], [5, "module-ffsim.protocols"], [6, "module-ffsim.trotter"], [7, "module-ffsim.variational"]], "ffsim.contract package": [[1, "ffsim-contract-package"]], "ffsim.contract.diag_coulomb module": [[1, "module-ffsim.contract.diag_coulomb"]], "ffsim.contract.hamiltonian module": [[1, "module-ffsim.contract.hamiltonian"]], "ffsim.contract.num_op_sum module": [[1, "module-ffsim.contract.num_op_sum"]], "ffsim.gates package": [[2, "ffsim-gates-package"]], "ffsim.gates.basic_gates module": [[2, "module-ffsim.gates.basic_gates"]], "ffsim.gates.diag_coulomb module": [[2, "module-ffsim.gates.diag_coulomb"]], "ffsim.gates.num_op_sum module": [[2, "module-ffsim.gates.num_op_sum"]], "ffsim.gates.orbital_rotation module": [[2, "module-ffsim.gates.orbital_rotation"]], "ffsim.hamiltonians package": [[3, "ffsim-hamiltonians-package"]], "ffsim.hamiltonians.double_factorized_hamiltonian module": [[3, "module-ffsim.hamiltonians.double_factorized_hamiltonian"]], "ffsim.hamiltonians.molecular_hamiltonian module": [[3, "module-ffsim.hamiltonians.molecular_hamiltonian"]], "ffsim.linalg package": [[4, "ffsim-linalg-package"]], "ffsim.linalg.double_factorized module": [[4, "module-ffsim.linalg.double_factorized"]], "ffsim.linalg.givens module": [[4, "module-ffsim.linalg.givens"]], "ffsim.linalg.linalg module": [[4, "module-ffsim.linalg.linalg"]], "ffsim.linalg.predicates module": [[4, "module-ffsim.linalg.predicates"]], "ffsim.protocols package": [[5, "ffsim-protocols-package"]], "ffsim.protocols.approximate_equality module": [[5, "module-ffsim.protocols.approximate_equality"]], "ffsim.protocols.linear_operator module": [[5, "module-ffsim.protocols.linear_operator"]], "ffsim.protocols.trace module": [[5, "module-ffsim.protocols.trace"]], "ffsim.trotter package": [[6, "ffsim-trotter-package"]], "ffsim.trotter.qdrift module": [[6, "module-ffsim.trotter.qdrift"]], "ffsim.trotter.trotter module": [[6, "module-ffsim.trotter.trotter"]], "ffsim.variational package": [[7, "ffsim-variational-package"]], "ffsim.variational.lucj module": [[7, "module-ffsim.variational.lucj"]], "ffsim": [[8, "ffsim"]], "API reference": [[9, "api-reference"]], "ffsim documentation": [[10, "ffsim-documentation"]], "Contents:": [[10, null], [16, null]], "Indices and tables": [[10, "indices-and-tables"]], "Introduction to ffsim": [[11, "Introduction-to-ffsim"]], "Orbital rotations and quadratic Hamiltonians": [[12, "Orbital-rotations-and-quadratic-Hamiltonians"]], "Orbital rotations": [[12, "Orbital-rotations"]], "Time evolution by a quadratic Hamiltonian": [[12, "Time-evolution-by-a-quadratic-Hamiltonian"]], "Diagonal Coulomb operators and double-factorized Trotter simulation": [[13, "Diagonal-Coulomb-operators-and-double-factorized-Trotter-simulation"]], "Double-factorized representation of the molecular Hamiltonian": [[13, "Double-factorized-representation-of-the-molecular-Hamiltonian"]], "Trotter simulation of the double-factorized Hamiltonian": [[13, "Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "Brief background on Trotter-Suzuki formulas": [[13, "Brief-background-on-Trotter-Suzuki-formulas"]], "Implementing Trotter simulation of the double-factorized Hamiltonian": [[13, "Implementing-Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "The local unitary cluster Jastrow (LUCJ) ansatz": [[14, "The-local-unitary-cluster-Jastrow-(LUCJ)-ansatz"], [14, "id1"]], "The unitary cluster Jastrow (UCJ) ansatz": [[14, "The-unitary-cluster-Jastrow-(UCJ)-ansatz"]], "The FermionOperator class": [[15, "The-FermionOperator-class"]], "Tutorials": [[16, "tutorials"]]}, "indexentries": {"fermionaction (class in ffsim.fermion_action)": [[0, "ffsim.fermion_action.FermionAction"]], "moleculardata (class in ffsim.molecular_data)": [[0, "ffsim.molecular_data.MolecularData"]], "action (ffsim.fermion_action.fermionaction attribute)": [[0, "ffsim.fermion_action.FermionAction.action"]], "cre() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.cre"]], "cre_a() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.cre_a"]], "cre_b() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.cre_b"]], "des() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.des"]], "des_a() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.des_a"]], "des_b() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.des_b"]], "dim() (in module ffsim.states)": [[0, "ffsim.states.dim"]], "dims() (in module ffsim.states)": [[0, "ffsim.states.dims"]], "expectation_power() (in module ffsim.wick)": [[0, "ffsim.wick.expectation_power"]], "expectation_product() (in module ffsim.wick)": [[0, "ffsim.wick.expectation_product"]], "ffsim": [[0, "module-ffsim"]], "ffsim.fermion_action": [[0, "module-ffsim.fermion_action"]], "ffsim.molecular_data": [[0, "module-ffsim.molecular_data"]], "ffsim.random": [[0, "module-ffsim.random"]], "ffsim.states": [[0, "module-ffsim.states"]], "ffsim.testing": [[0, "module-ffsim.testing"]], "ffsim.wick": [[0, "module-ffsim.wick"]], "module": [[0, "module-ffsim"], [0, "module-ffsim.fermion_action"], [0, "module-ffsim.molecular_data"], [0, "module-ffsim.random"], [0, "module-ffsim.states"], [0, "module-ffsim.testing"], [0, "module-ffsim.wick"], [1, "module-ffsim.contract"], [1, "module-ffsim.contract.diag_coulomb"], [1, "module-ffsim.contract.hamiltonian"], [1, "module-ffsim.contract.num_op_sum"], [2, "module-ffsim.gates"], [2, "module-ffsim.gates.basic_gates"], [2, "module-ffsim.gates.diag_coulomb"], [2, "module-ffsim.gates.num_op_sum"], [2, "module-ffsim.gates.orbital_rotation"], [3, "module-ffsim.hamiltonians"], [3, "module-ffsim.hamiltonians.double_factorized_hamiltonian"], [3, "module-ffsim.hamiltonians.molecular_hamiltonian"], [4, "module-ffsim.linalg"], [4, "module-ffsim.linalg.double_factorized"], [4, "module-ffsim.linalg.givens"], [4, "module-ffsim.linalg.linalg"], [4, "module-ffsim.linalg.predicates"], [5, "module-ffsim.protocols"], [5, "module-ffsim.protocols.approximate_equality"], [5, "module-ffsim.protocols.linear_operator"], [5, "module-ffsim.protocols.trace"], [6, "module-ffsim.trotter"], [6, "module-ffsim.trotter.qdrift"], [6, "module-ffsim.trotter.trotter"], [7, "module-ffsim.variational"], [7, "module-ffsim.variational.lucj"]], "one_hot() (in module ffsim.states)": [[0, "ffsim.states.one_hot"]], "orb (ffsim.fermion_action.fermionaction attribute)": [[0, "ffsim.fermion_action.FermionAction.orb"]], "random_antihermitian() (in module ffsim.random)": [[0, "ffsim.random.random_antihermitian"]], "random_hermitian() (in module ffsim.random)": [[0, "ffsim.random.random_hermitian"]], "random_nelec() (in module ffsim.testing)": [[0, "ffsim.testing.random_nelec"]], "random_occupied_orbitals() (in module ffsim.testing)": [[0, "ffsim.testing.random_occupied_orbitals"]], "random_orthogonal() (in module ffsim.random)": [[0, "ffsim.random.random_orthogonal"]], "random_real_symmetric_matrix() (in module ffsim.random)": [[0, "ffsim.random.random_real_symmetric_matrix"]], "random_special_orthogonal() (in module ffsim.random)": [[0, "ffsim.random.random_special_orthogonal"]], "random_statevector() (in module ffsim.random)": [[0, "ffsim.random.random_statevector"]], "random_t2_amplitudes() (in module ffsim.random)": [[0, "ffsim.random.random_t2_amplitudes"]], "random_two_body_tensor_real() (in module ffsim.random)": [[0, "ffsim.random.random_two_body_tensor_real"]], "random_unitary() (in module ffsim.random)": [[0, "ffsim.random.random_unitary"]], "slater_determinant() (in module ffsim.states)": [[0, "ffsim.states.slater_determinant"]], "slater_determinant_one_rdm() (in module ffsim.states)": [[0, "ffsim.states.slater_determinant_one_rdm"]], "spin (ffsim.fermion_action.fermionaction attribute)": [[0, "ffsim.fermion_action.FermionAction.spin"]], "contract_diag_coulomb() (in module ffsim.contract.diag_coulomb)": [[1, "ffsim.contract.diag_coulomb.contract_diag_coulomb"]], "contract_num_op_sum() (in module ffsim.contract.num_op_sum)": [[1, "ffsim.contract.num_op_sum.contract_num_op_sum"]], "diag_coulomb_linop() (in module ffsim.contract.diag_coulomb)": [[1, "ffsim.contract.diag_coulomb.diag_coulomb_linop"]], "ffsim.contract": [[1, "module-ffsim.contract"]], "ffsim.contract.diag_coulomb": [[1, "module-ffsim.contract.diag_coulomb"]], "ffsim.contract.hamiltonian": [[1, "module-ffsim.contract.hamiltonian"]], "ffsim.contract.num_op_sum": [[1, "module-ffsim.contract.num_op_sum"]], "hamiltonian_linop() (in module ffsim.contract.hamiltonian)": [[1, "ffsim.contract.hamiltonian.hamiltonian_linop"]], "hamiltonian_trace() (in module ffsim.contract.hamiltonian)": [[1, "ffsim.contract.hamiltonian.hamiltonian_trace"]], "num_op_sum_linop() (in module ffsim.contract.num_op_sum)": [[1, "ffsim.contract.num_op_sum.num_op_sum_linop"]], "apply_diag_coulomb_evolution() (in module ffsim.gates.diag_coulomb)": [[2, "ffsim.gates.diag_coulomb.apply_diag_coulomb_evolution"]], "apply_fsim_gate() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_fsim_gate"]], "apply_givens_rotation() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_givens_rotation"]], "apply_hop_gate() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_hop_gate"]], "apply_num_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_num_interaction"]], "apply_num_num_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_num_num_interaction"]], "apply_num_op_prod_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_num_op_prod_interaction"]], "apply_num_op_sum_evolution() (in module ffsim.gates.num_op_sum)": [[2, "ffsim.gates.num_op_sum.apply_num_op_sum_evolution"]], "apply_orbital_rotation() (in module ffsim.gates.orbital_rotation)": [[2, "ffsim.gates.orbital_rotation.apply_orbital_rotation"]], "apply_tunneling_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_tunneling_interaction"]], "ffsim.gates": [[2, "module-ffsim.gates"]], "ffsim.gates.basic_gates": [[2, "module-ffsim.gates.basic_gates"]], "ffsim.gates.diag_coulomb": [[2, "module-ffsim.gates.diag_coulomb"]], "ffsim.gates.num_op_sum": [[2, "module-ffsim.gates.num_op_sum"]], "ffsim.gates.orbital_rotation": [[2, "module-ffsim.gates.orbital_rotation"]], "gen_orbital_rotation_index() (in module ffsim.gates.orbital_rotation)": [[2, "ffsim.gates.orbital_rotation.gen_orbital_rotation_index"]], "doublefactorizedhamiltonian (class in ffsim.hamiltonians.double_factorized_hamiltonian)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian"]], "molecularhamiltonian (class in ffsim.hamiltonians.molecular_hamiltonian)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian"]], "constant (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.constant"]], "constant (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian attribute)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.constant"]], "diag_coulomb_mats (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.diag_coulomb_mats"]], "double_factorized_hamiltonian() (in module ffsim.hamiltonians.double_factorized_hamiltonian)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.double_factorized_hamiltonian"]], "ffsim.hamiltonians": [[3, "module-ffsim.hamiltonians"]], "ffsim.hamiltonians.double_factorized_hamiltonian": [[3, "module-ffsim.hamiltonians.double_factorized_hamiltonian"]], "ffsim.hamiltonians.molecular_hamiltonian": [[3, "module-ffsim.hamiltonians.molecular_hamiltonian"]], "norb (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian property)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.norb"]], "norb (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian property)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.norb"]], "one_body_tensor (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.one_body_tensor"]], "one_body_tensor (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian attribute)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.one_body_tensor"]], "orbital_rotations (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.orbital_rotations"]], "to_number_representation() (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian method)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.to_number_representation"]], "to_z_representation() (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian method)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.to_z_representation"]], "two_body_tensor (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian attribute)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.two_body_tensor"]], "z_representation (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.z_representation"]], "apply_matrix_to_slices() (in module ffsim.linalg.givens)": [[4, "ffsim.linalg.givens.apply_matrix_to_slices"]], "double_factorized() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.double_factorized"]], "double_factorized_t2() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.double_factorized_t2"]], "expm_multiply_taylor() (in module ffsim.linalg.linalg)": [[4, "ffsim.linalg.linalg.expm_multiply_taylor"]], "ffsim.linalg": [[4, "module-ffsim.linalg"]], "ffsim.linalg.double_factorized": [[4, "module-ffsim.linalg.double_factorized"]], "ffsim.linalg.givens": [[4, "module-ffsim.linalg.givens"]], "ffsim.linalg.linalg": [[4, "module-ffsim.linalg.linalg"]], "ffsim.linalg.predicates": [[4, "module-ffsim.linalg.predicates"]], "givens_decomposition() (in module ffsim.linalg.givens)": [[4, "ffsim.linalg.givens.givens_decomposition"]], "is_antihermitian() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_antihermitian"]], "is_hermitian() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_hermitian"]], "is_orthogonal() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_orthogonal"]], "is_real_symmetric() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_real_symmetric"]], "is_special_orthogonal() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_special_orthogonal"]], "is_unitary() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_unitary"]], "lup() (in module ffsim.linalg.linalg)": [[4, "ffsim.linalg.linalg.lup"]], "modified_cholesky() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.modified_cholesky"]], "optimal_diag_coulomb_mats() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.optimal_diag_coulomb_mats"]], "zrotg() (in module ffsim.linalg.givens)": [[4, "ffsim.linalg.givens.zrotg"]], "supportsapproximateequality (class in ffsim.protocols.approximate_equality)": [[5, "ffsim.protocols.approximate_equality.SupportsApproximateEquality"]], "supportslinearoperator (class in ffsim.protocols.linear_operator)": [[5, "ffsim.protocols.linear_operator.SupportsLinearOperator"]], "supportstrace (class in ffsim.protocols.trace)": [[5, "ffsim.protocols.trace.SupportsTrace"]], "approx_eq() (in module ffsim.protocols.approximate_equality)": [[5, "ffsim.protocols.approximate_equality.approx_eq"]], "ffsim.protocols": [[5, "module-ffsim.protocols"]], "ffsim.protocols.approximate_equality": [[5, "module-ffsim.protocols.approximate_equality"]], "ffsim.protocols.linear_operator": [[5, "module-ffsim.protocols.linear_operator"]], "ffsim.protocols.trace": [[5, "module-ffsim.protocols.trace"]], "linear_operator() (in module ffsim.protocols.linear_operator)": [[5, "ffsim.protocols.linear_operator.linear_operator"]], "trace() (in module ffsim.protocols.trace)": [[5, "ffsim.protocols.trace.trace"]], "expectation_squared_diag_coulomb() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.expectation_squared_diag_coulomb"]], "ffsim.trotter": [[6, "module-ffsim.trotter"]], "ffsim.trotter.qdrift": [[6, "module-ffsim.trotter.qdrift"]], "ffsim.trotter.trotter": [[6, "module-ffsim.trotter.trotter"]], "one_body_square_decomposition() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.one_body_square_decomposition"]], "qdrift_probabilities() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.qdrift_probabilities"]], "simulate_qdrift_double_factorized() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.simulate_qdrift_double_factorized"]], "simulate_trotter_double_factorized() (in module ffsim.trotter.trotter)": [[6, "ffsim.trotter.trotter.simulate_trotter_double_factorized"]], "spectral_norm_diag_coulomb() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.spectral_norm_diag_coulomb"]], "spectral_norm_one_body_tensor() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.spectral_norm_one_body_tensor"]], "variance_diag_coulomb() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.variance_diag_coulomb"]], "variance_one_body_tensor() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.variance_one_body_tensor"]], "ucjoperator (class in ffsim.variational.lucj)": [[7, "ffsim.variational.lucj.UCJOperator"]], "apply_ucj_operator() (in module ffsim.variational.lucj)": [[7, "ffsim.variational.lucj.apply_ucj_operator"]], "diag_coulomb_mats_alpha_alpha (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.diag_coulomb_mats_alpha_alpha"]], "diag_coulomb_mats_alpha_beta (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.diag_coulomb_mats_alpha_beta"]], "ffsim.variational": [[7, "module-ffsim.variational"]], "ffsim.variational.lucj": [[7, "module-ffsim.variational.lucj"]], "final_orbital_rotation (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.final_orbital_rotation"]], "from_parameters() (ffsim.variational.lucj.ucjoperator static method)": [[7, "ffsim.variational.lucj.UCJOperator.from_parameters"]], "from_t_amplitudes() (ffsim.variational.lucj.ucjoperator static method)": [[7, "ffsim.variational.lucj.UCJOperator.from_t_amplitudes"]], "n_reps (ffsim.variational.lucj.ucjoperator property)": [[7, "ffsim.variational.lucj.UCJOperator.n_reps"]], "norb (ffsim.variational.lucj.ucjoperator property)": [[7, "ffsim.variational.lucj.UCJOperator.norb"]], "orbital_rotations (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.orbital_rotations"]], "to_parameters() (ffsim.variational.lucj.ucjoperator method)": [[7, "ffsim.variational.lucj.UCJOperator.to_parameters"]], "to_t_amplitudes() (ffsim.variational.lucj.ucjoperator method)": [[7, "ffsim.variational.lucj.UCJOperator.to_t_amplitudes"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["api/generated/ffsim", "api/generated/ffsim.contract", "api/generated/ffsim.gates", "api/generated/ffsim.hamiltonians", "api/generated/ffsim.linalg", "api/generated/ffsim.protocols", "api/generated/ffsim.trotter", "api/generated/ffsim.variational", "api/generated/modules", "api/index", "index", "tutorials/01-introduction", "tutorials/02-orbital-rotation", "tutorials/03-double-factorized", "tutorials/04-lucj", "tutorials/05-fermion-operator", "tutorials/index"], "filenames": ["api/generated/ffsim.rst", "api/generated/ffsim.contract.rst", "api/generated/ffsim.gates.rst", "api/generated/ffsim.hamiltonians.rst", "api/generated/ffsim.linalg.rst", "api/generated/ffsim.protocols.rst", "api/generated/ffsim.trotter.rst", "api/generated/ffsim.variational.rst", "api/generated/modules.rst", "api/index.rst", "index.rst", "tutorials/01-introduction.ipynb", "tutorials/02-orbital-rotation.ipynb", "tutorials/03-double-factorized.ipynb", "tutorials/04-lucj.ipynb", "tutorials/05-fermion-operator.ipynb", "tutorials/index.rst"], "titles": ["ffsim package", "ffsim.contract package", "ffsim.gates package", "ffsim.hamiltonians package", "ffsim.linalg package", "ffsim.protocols package", "ffsim.trotter package", "ffsim.variational package", "ffsim", "API reference", "ffsim documentation", "Introduction to ffsim", "Orbital rotations and quadratic Hamiltonians", "Diagonal Coulomb operators and double-factorized Trotter simulation", "The local unitary cluster Jastrow (LUCJ) ansatz", "The FermionOperator class", "Tutorials"], "terms": {"contract": [0, 8, 9, 12], "diag_coulomb": [0, 8], "contract_diag_coulomb": [0, 1], "diag_coulomb_linop": [0, 1], "hamiltonian": [0, 6, 8, 9, 14, 16], "hamiltonian_linop": [0, 1, 12], "hamiltonian_trac": [0, 1], "num_op_sum": [0, 8], "contract_num_op_sum": [0, 1], "num_op_sum_linop": [0, 1], "gate": [0, 8, 9, 14], "basic_g": [0, 8], "apply_fsim_g": [0, 2], "apply_givens_rot": [0, 2], "apply_hop_g": [0, 2], "apply_num_interact": [0, 2], "apply_num_num_interact": [0, 2], "apply_num_op_prod_interact": [0, 2], "apply_tunneling_interact": [0, 2], "apply_diag_coulomb_evolut": [0, 2, 13], "apply_num_op_sum_evolut": [0, 2, 12, 13], "orbital_rot": [0, 1, 3, 4, 6, 7, 8, 11, 12, 13], "apply_orbital_rot": [0, 2, 11, 12], "gen_orbital_rotation_index": [0, 2], "double_factorized_hamiltonian": [0, 8, 13], "doublefactorizedhamiltonian": [0, 3, 6, 13], "one_body_tensor": [0, 1, 3, 6, 12, 13], "diag_coulomb_mat": [0, 3, 6, 13], "constant": [0, 1, 3, 13, 14], "z_represent": [0, 1, 2, 3, 6], "norb": [0, 1, 2, 3, 5, 6, 7, 11, 12, 13, 14, 15], "to_number_represent": [0, 3], "to_z_represent": [0, 3], "molecular_hamiltonian": [0, 8], "molecularhamiltonian": [0, 3], "two_body_tensor": [0, 1, 3, 4, 13], "linalg": [0, 8, 9, 12, 13, 15], "double_factor": [0, 8], "double_factorized_t2": [0, 4], "modified_choleski": [0, 4], "optimal_diag_coulomb_mat": [0, 4], "given": [0, 1, 2, 6, 8, 12, 13], "apply_matrix_to_slic": [0, 4], "givens_decomposit": [0, 4], "zrotg": [0, 4], "expm_multiply_taylor": [0, 4], "lup": [0, 4], "predic": [0, 8], "is_antihermitian": [0, 4], "is_hermitian": [0, 4], "is_orthogon": [0, 4], "is_real_symmetr": [0, 4], "is_special_orthogon": [0, 4], "is_unitari": [0, 4], "protocol": [0, 8, 9], "approximate_equ": [0, 8], "supportsapproximateequ": [0, 5], "approx_eq": [0, 5], "linear_oper": [0, 8, 13, 14, 15], "supportslinearoper": [0, 5], "trace": [0, 1, 8, 13], "supportstrac": [0, 5], "trotter": [0, 8, 9, 16], "qdrift": [0, 8], "expectation_squared_diag_coulomb": [0, 6], "one_body_square_decomposit": [0, 6], "qdrift_prob": [0, 6], "simulate_qdrift_double_factor": [0, 6], "spectral_norm_diag_coulomb": [0, 6], "spectral_norm_one_body_tensor": [0, 6], "variance_diag_coulomb": [0, 6], "variance_one_body_tensor": [0, 6], "simulate_trotter_double_factor": [0, 6, 13], "variat": [0, 8, 9, 14], "lucj": [0, 8, 16], "ucjoper": [0, 7, 14], "diag_coulomb_mats_alpha_alpha": [0, 7], "diag_coulomb_mats_alpha_beta": [0, 7], "final_orbital_rot": [0, 7], "from_paramet": [0, 7, 14], "from_t_amplitud": [0, 7, 14], "n_rep": [0, 7, 14], "to_paramet": [0, 7, 14], "to_t_amplitud": [0, 7], "apply_ucj_oper": [0, 7, 14], "The": [0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 16], "fermionact": [0, 8, 9], "namedtupl": 0, "construct": [0, 1, 13, 14, 15], "function": [0, 1, 2, 3, 4, 6, 7, 11, 12, 13, 14, 15], "class": [0, 3, 5, 7, 11, 14, 16], "action": [0, 1, 8, 12, 15], "bool": [0, 1, 2, 3, 4, 5, 6, 7], "spin": [0, 1, 2, 7, 8, 11, 12, 14, 15], "orb": [0, 8, 15], "int": [0, 1, 2, 3, 4, 5, 6, 7, 13], "sourc": [0, 1, 2, 3, 4, 5, 6, 7], "base": [0, 3, 4, 5, 7, 14], "A": [0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 14, 15], "fermion": [0, 2, 10, 11, 12, 14, 15], "creat": [0, 2, 11, 12, 13, 14, 15], "new": [0, 12, 15], "instanc": [0, 12], "alia": 0, "field": 0, "number": [0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15], "0": [0, 1, 2, 3, 6, 12, 13, 14, 15], "2": [0, 1, 2, 3, 4, 11, 12, 13, 14, 15], "1": [0, 2, 3, 4, 6, 7, 11, 12, 13, 14, 15], "cre": [0, 8, 9], "paramet": [0, 1, 2, 3, 4, 5, 6, 7, 14], "orbit": [0, 1, 2, 3, 4, 5, 6, 7, 11, 13, 14, 15, 16], "fals": [0, 1, 2, 3, 4, 5, 6, 7, 15], "alpha": [0, 1, 2, 5, 6, 7, 11, 14, 15], "true": [0, 2, 3, 4, 5, 6, 7, 11, 14, 15], "beta": [0, 1, 2, 5, 6, 7, 11, 14, 15], "index": [0, 2, 10, 11, 14, 15], "act": [0, 3, 15], "return": [0, 1, 2, 3, 4, 5, 6, 7, 13, 14, 15], "type": [0, 1, 2, 3, 4, 5, 6, 7, 13], "cre_a": [0, 8, 9, 15], "cre_b": [0, 8, 9, 15], "de": [0, 8, 9], "destroi": [0, 15], "des_a": [0, 8, 9, 15], "des_b": [0, 8, 9, 15], "moleculardata": [0, 8, 9, 13, 14], "nelec": [0, 1, 2, 5, 6, 7, 11, 12, 13, 14, 15], "core_energi": 0, "dipole_integr": 0, "none": [0, 1, 2, 3, 4, 6, 7], "orbital_symmetri": 0, "object": [0, 3, 4, 5, 7, 13, 14, 15], "random_antihermitian": [0, 8, 9], "dim": [0, 6, 8, 9, 11, 15], "seed": [0, 6, 11, 12], "dtype": [0, 14], "complex": [0, 4], "anti": [0, 4], "hermitian": [0, 4, 12], "matrix": [0, 1, 2, 3, 4, 6, 11, 12, 13, 14, 15], "width": 0, "height": 0, "rank": [0, 3, 4], "If": [0, 1, 2, 3, 4, 6, 7, 15], "maximum": [0, 3, 4], "i": [0, 1, 2, 3, 4, 6, 7, 11, 12, 13, 14, 15], "us": [0, 1, 2, 3, 4, 6, 11, 12, 13, 14, 15], "initi": [0, 6, 7, 13, 14], "pseudorandom": [0, 6], "gener": [0, 2, 6, 11, 12, 13, 14], "should": [0, 6, 12, 13], "valid": [0, 6], "input": [0, 1, 6, 14], "np": [0, 2, 5, 6, 12, 13, 14], "default_rng": [0, 6], "dype": 0, "data": [0, 2, 6, 7, 13, 14, 15], "result": [0, 1, 4, 7, 12, 13, 14], "ndarrai": [0, 1, 2, 3, 4, 6, 7, 13], "sampl": [0, 6], "random_hermitian": [0, 8, 9, 12], "random_orthogon": [0, 8, 9], "float": [0, 1, 2, 3, 4, 5, 6, 13], "orthogon": [0, 4], "distribut": 0, "haar": 0, "measur": 0, "an": [0, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 14, 15], "els": [0, 6], "refer": [0, 3, 4, 10, 14], "arxiv": [0, 3, 4], "math": 0, "ph": 0, "0609050": 0, "random_real_symmetric_matrix": [0, 8, 9], "real": [0, 1, 2, 3, 4, 7, 12, 13, 14], "symmetr": [0, 1, 2, 3, 4, 6, 13, 14], "option": [0, 1, 2, 3, 4, 6, 7, 14], "random_special_orthogon": [0, 8, 9], "special": [0, 4, 11], "random_statevector": [0, 8, 9, 15], "vector": [0, 1, 2, 4, 6, 7, 11, 12, 14, 15], "from": [0, 7, 11, 12, 14, 15], "uniform": [0, 6], "dimens": [0, 6, 11], "random_t2_amplitud": [0, 8, 9], "nocc": [0, 2, 7], "t2": [0, 4, 7, 14], "amplitud": [0, 4, 7, 14], "tensor": [0, 1, 3, 4, 6, 13, 14], "ar": [0, 1, 2, 3, 4, 5, 6, 11, 12, 13, 14, 15], "occupi": [0, 1, 2, 13], "electron": [0, 1, 2, 5, 6, 7, 11, 13], "random_two_body_tensor_r": [0, 8, 9], "two": [0, 1, 2, 3, 4, 5, 6, 7, 13, 14], "bodi": [0, 1, 3, 4, 6, 13, 14], "valu": [0, 3, 4, 6, 7, 13, 14], "shape": [0, 4, 6, 11, 14], "default": [0, 3, 4], "behavior": [0, 3, 4], "which": [0, 2, 3, 4, 11, 12, 13, 14, 15], "random_unitari": [0, 8, 9, 11, 12], "unitari": [0, 1, 2, 3, 4, 7, 12, 13, 16], "get": [0, 1, 12, 13, 14], "fci": [0, 1, 11, 14], "space": [0, 14], "spatial": [0, 1, 2, 3, 5, 7, 11, 13, 14, 15], "tupl": [0, 1, 2, 4, 5, 6, 7, 13, 15], "pair": [0, 2], "integ": [0, 2], "dim_a": [0, 11], "dim_b": [0, 11], "repres": [0, 3, 5, 6, 11, 14, 15], "one_hot": [0, 8, 9], "arrai": [0, 2, 4, 6, 11, 15], "all": [0, 2, 14, 15], "zero": [0, 4], "except": 0, "one": [0, 1, 2, 3, 4, 6, 11, 13, 14], "specifi": [0, 2, 3, 4, 5, 6, 14], "desir": 0, "place": [0, 1, 2, 6, 7, 14, 15], "hot": 0, "slater_determin": [0, 8, 9, 11, 12, 13, 14], "occupied_orbit": [0, 11, 12, 13, 14], "slater": [0, 6, 11, 12, 13], "determin": [0, 4, 6, 11, 12, 13], "sequenc": [0, 2], "list": [0, 1, 2, 4, 6, 14], "first": [0, 2, 4, 5, 6, 12, 13, 14], "second": [0, 2, 4, 13], "rotat": [0, 1, 2, 3, 4, 6, 7, 11, 13, 14, 16], "appli": [0, 1, 2, 4, 7, 11, 12, 13, 14], "configur": [0, 11], "In": [0, 7, 12, 13, 14, 15], "other": [0, 5, 14], "word": [0, 14], "thi": [0, 2, 3, 4, 6, 7, 11, 12, 13, 14], "describ": [0, 1, 2, 7, 11, 12, 13, 14, 15], "slater_determinant_one_rdm": [0, 8, 9], "particl": [0, 6, 11, 12, 15], "reduc": [0, 6], "densiti": [0, 6], "contain": [0, 2, 4, 7, 14, 15], "indic": [0, 3, 4, 14, 15], "similarli": [0, 13], "util": [0, 4], "random_nelec": [0, 8, 9], "n_alpha": [0, 11, 12, 13, 14], "n_beta": [0, 11, 12, 13, 14], "random_occupied_orbit": [0, 8, 9], "occ_a": 0, "occ_b": 0, "expectation_pow": [0, 8, 9], "one_rdm": [0, 6], "power": 0, "expect": [0, 6, 12], "oper": [0, 1, 2, 3, 5, 6, 7, 12, 14, 15, 16], "w": [0, 12, 13], "r": [0, 1, 3, 4, 13], "t": [0, 2, 3, 4, 12, 13], "o": 0, "ha": [0, 1, 2, 4, 7, 11, 12, 13, 14], "form": [0, 1, 2, 3, 4, 7, 12, 13, 14, 15], "sum_": [0, 1, 2, 3, 4, 7, 12, 13, 14], "pq": [0, 1, 3, 4, 13], "m_": 0, "a_p": 0, "dagger": [0, 1, 2, 4, 7, 12, 13, 14, 15], "a_q": 0, "take": [0, 3, 11, 14], "m": [0, 4, 12], "its": [0, 2, 3, 4, 6, 7, 12, 13, 15], "argument": [0, 3, 4, 6, 12], "let": [0, 13, 15], "lvert": [0, 14], "psi": [0, 14], "rangl": [0, 14], "Then": 0, "quantiti": 0, "langl": 0, "rvert": 0, "k": [0, 4, 7, 12, 13, 14, 15], "expectation_product": [0, 8, 9], "product": [0, 2, 13, 15], "matric": [0, 1, 3, 4, 7, 12, 13, 14], "o_1": 0, "o_2": 0, "dot": 0, "o_k": 0, "softwar": [0, 11], "librari": [0, 11], "fast": 0, "simul": [0, 6, 10, 11, 12, 14, 16], "quantum": [0, 2, 3, 10, 11, 13, 14], "circuit": [0, 3, 10, 11], "diagon": [1, 2, 3, 4, 6, 7, 12, 14, 16], "coulomb": [1, 2, 3, 4, 6, 7, 14, 16], "vec": [1, 2, 4, 6, 7, 11, 12, 13, 15], "mat": [1, 2, 4], "mat_alpha_beta": [1, 2], "occupations_a": [1, 2], "occupations_b": [1, 2], "strings_a": [1, 2], "strings_b": [1, 2], "j": [1, 2, 3, 7, 12, 13, 14, 15], "sigma": [1, 2, 3, 7, 12, 13, 14], "tau": [1, 2, 3, 7, 13, 14], "z_": [1, 2], "ij": [1, 2, 3, 7, 12, 13, 14], "n_": [1, 2, 7, 11, 12, 13, 14], "where": [1, 2, 3, 4, 6, 7, 12, 13, 14], "denot": [1, 2, 3, 12], "z": [1, 2, 3, 4, 6, 11, 15], "also": [1, 2, 6, 7, 12, 15], "term": [1, 2, 3, 4, 6, 7, 13, 14, 15], "sum": [1, 2, 6, 13], "differ": [1, 2, 3, 4, 7, 14], "neq": [1, 2, 3], "state": [1, 2, 6, 7, 8, 9, 12, 13, 14], "transform": [1, 2, 3, 7, 11, 12], "coeffici": [1, 2, 3, 4, 7, 12, 14, 15], "interact": [1, 2, 11], "between": [1, 2, 3, 4, 14], "whether": [1, 2, 3, 4, 5, 6, 7, 15], "represent": [1, 3, 4, 6, 11, 15], "string": [1, 2, 6, 11, 15], "convert": [1, 5, 7, 11, 12, 13, 15], "linear": [1, 2, 4, 5, 12, 15], "mathcal": [1, 2, 7, 12, 13, 14], "u": [1, 2, 3, 4], "linearoper": [1, 5, 12, 13, 15], "implement": [1, 4, 11, 12, 14], "molecular": [1, 3, 14], "h": [1, 3, 13, 14], "h_": [1, 3, 4, 13], "dagger_": [1, 2, 3, 12, 13], "p": [1, 2, 3, 4, 13, 14], "a_": [1, 2, 3, 12, 13, 15], "q": [1, 3, 13], "frac12": [1, 3, 7, 13, 14], "pqr": [1, 3, 4, 13], "": [1, 3, 4, 9, 11, 13, 14, 15], "here": [1, 3, 4, 11, 12, 13], "call": [1, 3, 11, 12, 13, 15], "basi": [1, 3, 7, 12, 13, 14], "combin": [1, 2, 12, 15], "coeff": [1, 2], "lambda_i": [1, 2, 12], "basic": [2, 13], "comput": [2, 4, 5, 6, 12, 14], "theta": 2, "phi": 2, "target_orb": 2, "copi": [2, 6, 7, 15], "fsim": 2, "consist": 2, "tunnel": 2, "follow": [2, 6, 11, 12, 13, 14, 15], "note": [2, 3, 4, 14, 15], "neg": 2, "sign": 2, "convent": 2, "angl": 2, "text": [2, 3, 13], "nn": 2, "exp": [2, 12], "left": [2, 6, 7, 12, 15], "dagger_i": 2, "a_i": 2, "dagger_j": 2, "a_j": 2, "right": [2, 12, 15], "under": [2, 3], "jordan": [2, 3], "wigner": [2, 3], "when": [2, 13, 14, 15], "neighbor": 2, "qubit": [2, 14], "begin": [2, 12, 14], "pmatrix": 2, "co": 2, "sin": 2, "e": [2, 6, 7, 13, 14, 15], "end": [2, 7, 12, 14], "befor": [2, 6, 7, 14, 15], "alwai": [2, 4, 6, 7, 12], "newli": [2, 6, 7], "alloc": [2, 6, 7], "origin": [2, 3, 4, 6, 7, 13], "untouch": [2, 6, 7], "mai": [2, 4, 6, 7, 14], "still": [2, 6, 7, 14], "have": [2, 3, 4, 6, 7, 11, 12, 14, 15], "overwritten": [2, 6, 7], "It": [2, 3, 4, 6, 7, 11, 13, 15], "possibl": [2, 3, 4, 6, 7], "modifi": [2, 3, 4, 6, 7], "g": [2, 6, 14], "hop": 2, "pi": [2, 3], "n": [2, 3, 4, 11, 12, 13, 14], "prod": 2, "give": [2, 12], "time": [2, 3, 4, 6, 11, 13], "evolut": [2, 6, 13], "orbital_rotation_index_a": 2, "orbital_rotation_index_b": 2, "evolv": [2, 6, 13], "rais": 2, "valueerror": 2, "must": [2, 4, 15], "dimension": [2, 4, 6, 11], "length": [2, 11, 13, 14], "allow_row_permut": 2, "allow_col_permut": 2, "map": [2, 12, 15], "creation": [2, 12, 15], "mapsto": [2, 12], "u_": 2, "ji": [2, 12], "equival": 2, "log": 2, "_": [2, 3, 4, 7, 12, 13, 14], "allow": [2, 3, 4, 14], "permut": [2, 4], "row": [2, 11], "column": [2, 4, 11, 12], "wa": 2, "well": 2, "actual": [2, 12, 14], "effect": 2, "both": [2, 3, 4], "set": [2, 3, 4, 7, 11, 12, 13, 14], "onli": [2, 3, 4, 11, 12, 14], "linkstr_index": 2, "perform": [2, 3, 4, 7, 12, 13], "diag_str": 2, "off_diag_str": 2, "off_diag_index": 2, "three": [2, 15], "numpi": [2, 4, 6, 11, 12, 13, 14], "x": [2, 14], "binom": 2, "th": [2, 12], "unoccupi": 2, "3": [2, 11, 12, 13, 14, 15], "ax": 2, "correspond": [2, 3, 4, 6, 12, 13], "For": [2, 11, 12, 14, 15], "fix": [2, 4, 11], "choic": [2, 11], "str0": 2, "last": 2, "each": [2, 3, 4, 6, 7, 11, 13, 14, 15], "str1": 2, "annihil": [2, 15], "pariti": 2, "doubl": [3, 4, 6, 14, 16], "factor": [3, 4, 6, 14, 16], "low": [3, 4, 11], "decomposit": [3, 4, 6], "kappa_": 3, "sum_t": 3, "qi": 3, "altern": [3, 13], "sometim": 3, "yield": [3, 4, 13, 14], "simpler": 3, "frac": 3, "pauli": 3, "obtain": [3, 12, 13, 14], "rewrit": 3, "part": [3, 4], "updat": [3, 13], "appropri": 3, "kappa": 3, "frac18": 3, "asterisk": 3, "summat": 3, "over": 3, "rather": [3, 4, 11], "than": [3, 4, 6, 11, 14], "properti": [3, 7, 12], "tol": [3, 4, 7], "1e": [3, 4, 5, 6, 7], "08": [3, 4, 5, 7], "max_vec": [3, 4], "optim": [3, 4, 6, 7, 14], "method": [3, 4, 6, 14], "l": [3, 4, 7, 13, 14], "bfg": [3, 4, 14], "b": [3, 4, 12, 14], "diag_coulomb_mask": [3, 4], "choleski": [3, 4], "decompos": [3, 4, 6, 13], "output": [3, 13, 14], "guarante": 3, "so": [3, 4, 12, 13, 14, 15], "depend": [3, 4, 6, 11], "error": [3, 4], "threshold": [3, 4], "larger": [3, 4, 15], "lead": 3, "smaller": [3, 4, 13, 15], "furthermor": [3, 4], "max_rank": 3, "upper": [3, 4, 6, 14], "bound": [3, 4, 6], "routin": [3, 4, 11, 15], "straightforward": [3, 4], "exact": [3, 4, 11, 13], "nest": [3, 4], "eigenvalu": [3, 4, 6, 12], "addition": [3, 4], "can": [3, 4, 5, 7, 11, 12, 13, 14, 15], "choos": [3, 4, 11, 14], "store": [3, 4, 6, 13, 14], "achiev": [3, 4, 13], "compress": [3, 4], "enabl": [3, 4], "attempt": [3, 4], "minim": [3, 4, 14], "least": [3, 4], "squar": [3, 4, 6, 14], "quantifi": [3, 4], "scipi": [3, 4, 5, 11, 12, 13, 14, 15], "pass": [3, 4, 12, 15], "gradient": [3, 4], "core": [3, 4], "constrain": [3, 4], "certain": [3, 4], "element": [3, 4], "nonzero": [3, 4, 14], "boolean": [3, 4], "triangular": [3, 4], "becaus": [3, 4, 11, 13, 14, 15], "current": 3, "support": [3, 6, 7, 15], "toler": [3, 4, 5, 14], "defin": [3, 4, 14], "absolut": [3, 4, 5, 6], "reconstruct": [3, 4], "limit": [3, 4, 14], "keep": [3, 4], "overrid": [3, 4], "str": [3, 4, 6], "see": [3, 4, 5], "document": [3, 4, 5], "callback": [3, 4], "usag": [3, 4, 15], "dict": [3, 4, 14], "mask": [3, 4], "full": [3, 4, 11], "instead": [3, 4], "much": [3, 4, 11], "more": [3, 4, 11, 14], "expens": [3, 4], "ignor": [3, 4, 13], "1808": [3, 4], "02625": [3, 4], "2104": [3, 4], "08957": [3, 4], "ell": 4, "pk": 4, "qk": 4, "respect": 4, "too": 4, "small": 4, "exce": 4, "collect": 4, "t2_amplitud": [4, 7], "t_": 4, "ijab": 4, "ap": 4, "ip": 4, "bq": 4, "jq": 4, "v_i": 4, "posit": 4, "definit": 4, "No": 4, "check": [4, 12, 13], "verifi": 4, "1711": 4, "02242": 4, "includ": [4, 7, 11, 12, 13], "assembl": 4, "whose": [4, 5, 11], "target": 4, "slice": 4, "out": [4, 13], "12": [4, 6, 15], "safe": 4, "version": 4, "bla": 4, "nan": 4, "either": [4, 14], "veri": 4, "close": 4, "detect": 4, "up": [4, 5, 12], "case": 4, "behav": 4, "were": 4, "exactli": 4, "contrast": 4, "c": [4, 14], "algebra": [4, 15], "expm": 4, "taylor": 4, "seri": 4, "expans": 4, "pivot": 4, "lu": 4, "rtype": 4, "lower": 4, "unit": 4, "rtol": [4, 5], "05": [4, 5, 14], "atol": [4, 5], "approxim": [4, 5, 13], "rel": [4, 5], "numer": [4, 5, 15], "within": [4, 15], "union": 4, "bool_": 4, "equal": 5, "arg": 5, "kwarg": 5, "compar": [5, 13], "obj": 5, "isclos": 5, "interpret": 5, "ani": [5, 12, 14], "otherwis": [5, 6], "diag": 6, "op": [6, 15], "truncation_threshold": 6, "less": [6, 14], "truncat": [6, 14], "sampling_method": 6, "probabl": 6, "rest": [6, 13], "same": [6, 7, 11, 14], "order": [6, 7, 11, 13, 14, 15], "thei": [6, 12, 14, 15], "norm": 6, "proport": [6, 12], "spectral": 6, "requir": [6, 14], "incoher": 6, "channel": 6, "n_particl": 6, "total": [6, 7, 13, 14], "n_step": [6, 13], "n_sampl": 6, "via": [6, 13], "step": [6, 12, 13], "explicit": 6, "whenev": 6, "complet": 6, "character": 6, "trajectori": 6, "random": [6, 8, 9, 11, 12, 15], "final": [6, 7, 13, 14], "just": [6, 13, 14], "statevector": [6, 11, 12], "largest": 6, "singular": 6, "varianc": 6, "rdm": 6, "suzuki": 6, "formula": 6, "local": [7, 16], "cluster": [7, 16], "jastrow": [7, 16], "ansatz": [7, 16], "ucj": 7, "prod_": [7, 14], "w_k": [7, 14], "_k": [7, 13, 14], "mathbf": [7, 12, 13, 14], "commut": [7, 13, 14], "we": [7, 12, 13, 14, 15], "enforc": [7, 14], "As": [7, 11, 12, 13, 14], "involv": [7, 14], "To": [7, 11, 12, 13, 14], "static": 7, "param": 7, "alpha_alpha_indic": [7, 14], "alpha_beta_indic": [7, 14], "with_final_orbital_rot": 7, "t1_amplitud": 7, "t1": [7, 14], "repetit": [7, 14], "possibli": 7, "packag": [8, 9], "subpackag": [8, 9], "submodul": [8, 9], "modul": [8, 9, 10, 11], "content": [8, 9], "fermion_act": [8, 9], "molecular_data": [8, 9], "test": [8, 9, 12, 13], "wick": [8, 9], "ffsim": [9, 12, 13, 14, 15, 16], "faster": 10, "tutori": [10, 12, 13, 14], "api": 10, "search": 10, "page": 10, "conserv": [11, 15], "compon": [11, 15], "By": 11, "advantag": 11, "symmetri": [11, 12], "effici": [11, 15], "level": [11, 13], "doe": [11, 15], "primari": 11, "wai": [11, 12, 14], "directli": [11, 13], "exampl": [11, 12, 14, 15], "code": [11, 13, 14, 15], "show": [11, 12, 13, 14, 15], "how": [11, 12, 13, 14, 15], "import": [11, 12, 13, 14, 15], "occup": [11, 12, 13], "6": [11, 12, 13, 14, 15], "rang": [11, 12, 13, 14], "1234": [11, 12], "rotated_vec": [11, 12], "plain": 11, "Its": 11, "system": [11, 12], "conveni": 11, "calcul": [11, 13, 14], "comb": 11, "assert": 11, "standard": 11, "often": [11, 14], "simpli": [11, 12], "reshap": 11, "reshaped_vec": 11, "pyscf": [11, 13, 14], "fundament": 12, "mode": 12, "sum_j": 12, "That": [12, 15], "satisfi": [12, 15], "anticommut": 12, "relat": [12, 14], "align": [12, 14], "_1": 12, "_2": 12, "section": 12, "ll": [12, 13, 14], "demonstr": [12, 13, 14], "task": 12, "consid": [12, 14], "rewritten": 12, "introduc": [12, 14], "eigendecomposit": 12, "sum_k": [12, 13], "lambda_k": 12, "ik": 12, "jk": 12, "our": [12, 13, 14], "ground": [12, 14], "pick": 12, "phase": 12, "energi": [12, 13, 14], "spars": [12, 13, 15], "lowest": [12, 13], "eigenvector": 12, "eig": [12, 15], "eigsh": 12, "la": 12, "fact": 12, "you": 12, "illustr": 12, "purpos": 12, "explicitli": 12, "eigh": [12, 13], "evolved_vec": 12, "conj": 12, "undo": 12, "expected_phas": 12, "1j": [12, 13, 15], "assert_allclos": 12, "mention": [12, 13], "abov": [12, 13, 15], "below": [12, 13, 14], "better": [12, 13], "4": [12, 13, 14, 15], "evolved_vec_alt": 12, "daunt": 13, "scale": 13, "cell": [13, 14], "hydrogen": 13, "molecul": [13, 14], "stretch": [13, 14], "bond": [13, 14], "build": [13, 14], "h2": 13, "mol": [13, 14], "gto": [13, 14], "mole": [13, 14], "atom": [13, 14], "8": [13, 14, 15], "sto": [13, 14], "6g": [13, 14], "hartree_fock": [13, 14], "scf": [13, 14], "rhf": [13, 14], "kernel": [13, 14], "mol_data": [13, 14], "from_hartree_fock": [13, 14], "mol_hamiltonian": [13, 14], "df_hamiltonian": 13, "converg": [13, 14], "837796382593709": 13, "dataclass": [13, 14], "print": [13, 14, 15], "some": [13, 15], "inform": [13, 15], "One": 13, "27478830e": 13, "01": [13, 14], "66405155e": 13, "16": 13, "07220771e": 13, "77238770e": 13, "5": [13, 14, 15], "23173938e": 13, "94289029e": 13, "33545754e": 13, "48240570e": 13, "32667268e": 13, "17": 13, "11022302e": 13, "53132024e": 13, "21318608e": 13, "00": [13, 14], "05183033e": 13, "59876437e": 13, "07792507e": 13, "14653029e": 13, "001": 13, "96958401e": 13, "121": 13, "7": [13, 15], "13206008e": 13, "062": 13, "52090881e": 13, "003": 13, "00000000e": 13, "25128053e": 13, "15": 13, "07106781e": 13, "89310728e": 13, "30": 13, "although": 13, "alreadi": 13, "built": 13, "manual": 13, "asymmetr": 13, "h_k": 13, "divid": 13, "singl": 13, "exponenti": 13, "individu": [13, 15], "do": [13, 15], "approx": 13, "prod_k": 13, "higher": 13, "deriv": 13, "write": 13, "recal": 13, "addit": [13, 15], "think": 13, "compos": 13, "quadrat": [13, 16], "def": [13, 14], "simulate_trotter_step_double_factor": 13, "one_body_energi": 13, "one_body_basis_chang": 13, "zip": 13, "finish": 13, "handl": 13, "split": 13, "multipl": [13, 15], "wrote": 13, "step_tim": 13, "hartre": [13, 14], "fock": [13, 14], "match": 13, "initial_st": 13, "\u03c8": [13, 14], "hf_energi": 13, "vdot": [13, 14], "f": [13, 14], "now": 13, "later": 13, "exact_st": 13, "expm_multipli": 13, "tracea": 13, "fidel": 13, "ab": 13, "9696296369955066": 13, "final_st": [13, 14], "9990275744083491": 13, "improv": 13, "increas": 13, "10": 13, "9999906233109653": 13, "commonli": 13, "known": 13, "fourth": 13, "reproduc": 13, "9": [13, 15], "fewer": 13, "9999999336740059": 13, "ethen": 14, "mcscf": 14, "bond_dist": 14, "678": 14, "5626": 14, "9289": 14, "activ": 14, "active_spac": 14, "nelectron": 14, "ca": 14, "casci": 14, "nca": 14, "neleca": 14, "mo": 14, "sort_mo": 14, "energy_fci": 14, "77": 14, "4456267643961": 14, "6290254326717": 14, "ci": 14, "57322412553863": 14, "0000000": 14, "phi_0": 14, "taken": 14, "express": 14, "previou": 14, "constructor": 14, "provid": 14, "ccsd": 14, "mp2": 14, "run": 14, "cc": 14, "frozen": 14, "mo_coeff": 14, "reference_st": 14, "ansatz_st": 14, "initiali": 14, "49387212754462": 14, "e_corr": 14, "04824536314851573": 14, "46975600021692": 14, "facilit": 14, "convers": 14, "precis": 14, "somewhat": 14, "complic": 14, "short": 14, "entri": 14, "non": 14, "redund": 14, "associ": [14, 15], "fun": 14, "x0": 14, "maxfun": 14, "50000": 14, "len": 14, "72": 14, "messag": 14, "rel_reduction_of_f_": 14, "lt": 14, "_factr": 14, "epsmch": 14, "success": 14, "statu": 14, "62873343946598": 14, "541e": 14, "978e": 14, "02": 14, "239e": 14, "438e": 14, "nit": 14, "329": 14, "jac": 14, "537e": 14, "098e": 14, "04": 14, "956e": 14, "734e": 14, "nfev": 14, "25696": 14, "njev": 14, "352": 14, "hess_inv": 14, "72x72": 14, "lbfgsinvhessproduct": 14, "float64": 14, "gt": 14, "connect": 14, "swap": 14, "network": 14, "make": 14, "challeng": 14, "noisi": 14, "pre": 14, "fault": 14, "processor": 14, "idea": 14, "impos": 14, "sparsiti": 14, "constraint": 14, "them": 14, "depth": 14, "topologi": 14, "triangl": 14, "sinc": 14, "need": 14, "lattic": 14, "parallel": 14, "line": 14, "rung": 14, "ladder": 14, "With": 14, "setup": 14, "while": 14, "share": 14, "ldot": 14, "without": 14, "Of": 14, "cours": 14, "notic": 14, "decreas": 14, "46": 14, "62881470757267": 14, "795e": 14, "386e": 14, "020e": 14, "230e": 14, "585": 14, "434e": 14, "933e": 14, "007e": 14, "450e": 14, "29422": 14, "626": 14, "46x46": 14, "25": 15, "Such": 15, "programmat": 15, "dictionari": 15, "hash": 15, "tabl": 15, "piec": 15, "being": 15, "upon": 15, "intern": 15, "itself": 15, "recommend": 15, "helper": 15, "shown": 15, "op1": 15, "repr": 15, "view": 15, "displai": 15, "39": 15, "0j": 15, "arithmet": 15, "multipli": 15, "scalar": 15, "go": 15, "op2": 15, "op3": 15, "0625": 15, "125": 15, "25j": 15, "5j": 15, "2j": 15, "good": 15, "awar": 15, "especi": 15, "avoid": 15, "These": 15, "subtract": 15, "divis": 15, "3j": 15, "4j": 15, "6j": 15, "12j": 15, "normal": 15, "normal_ord": 15, "compris": 15, "appear": 15, "descend": 15, "lexicograph": 15, "preserv": 15, "far": 15, "criteria": 15, "conserves_particle_numb": 15, "conserves_spin_z": 15, "subspac": 15, "op4": 15, "linop": 15, "onto": 15, "11889056": 15, "13114645j": 15, "most": 15, "lm": 15, "21984743e": 15, "18j": 15, "introduct": 16, "fermionoper": 16}, "objects": {"": [[0, 0, 0, "-", "ffsim"]], "ffsim": [[1, 0, 0, "-", "contract"], [0, 0, 0, "-", "fermion_action"], [2, 0, 0, "-", "gates"], [3, 0, 0, "-", "hamiltonians"], [4, 0, 0, "-", "linalg"], [0, 0, 0, "-", "molecular_data"], [5, 0, 0, "-", "protocols"], [0, 0, 0, "-", "random"], [0, 0, 0, "-", "states"], [0, 0, 0, "-", "testing"], [6, 0, 0, "-", "trotter"], [7, 0, 0, "-", "variational"], [0, 0, 0, "-", "wick"]], "ffsim.contract": [[1, 0, 0, "-", "diag_coulomb"], [1, 0, 0, "-", "hamiltonian"], [1, 0, 0, "-", "num_op_sum"]], "ffsim.contract.diag_coulomb": [[1, 1, 1, "", "contract_diag_coulomb"], [1, 1, 1, "", "diag_coulomb_linop"]], "ffsim.contract.hamiltonian": [[1, 1, 1, "", "hamiltonian_linop"], [1, 1, 1, "", "hamiltonian_trace"]], "ffsim.contract.num_op_sum": [[1, 1, 1, "", "contract_num_op_sum"], [1, 1, 1, "", "num_op_sum_linop"]], "ffsim.fermion_action": [[0, 2, 1, "", "FermionAction"], [0, 1, 1, "", "cre"], [0, 1, 1, "", "cre_a"], [0, 1, 1, "", "cre_b"], [0, 1, 1, "", "des"], [0, 1, 1, "", "des_a"], [0, 1, 1, "", "des_b"]], "ffsim.fermion_action.FermionAction": [[0, 3, 1, "", "action"], [0, 3, 1, "", "orb"], [0, 3, 1, "", "spin"]], "ffsim.gates": [[2, 0, 0, "-", "basic_gates"], [2, 0, 0, "-", "diag_coulomb"], [2, 0, 0, "-", "num_op_sum"], [2, 0, 0, "-", "orbital_rotation"]], "ffsim.gates.basic_gates": [[2, 1, 1, "", "apply_fsim_gate"], [2, 1, 1, "", "apply_givens_rotation"], [2, 1, 1, "", "apply_hop_gate"], [2, 1, 1, "", "apply_num_interaction"], [2, 1, 1, "", "apply_num_num_interaction"], [2, 1, 1, "", "apply_num_op_prod_interaction"], [2, 1, 1, "", "apply_tunneling_interaction"]], "ffsim.gates.diag_coulomb": [[2, 1, 1, "", "apply_diag_coulomb_evolution"]], "ffsim.gates.num_op_sum": [[2, 1, 1, "", "apply_num_op_sum_evolution"]], "ffsim.gates.orbital_rotation": [[2, 1, 1, "", "apply_orbital_rotation"], [2, 1, 1, "", "gen_orbital_rotation_index"]], "ffsim.hamiltonians": [[3, 0, 0, "-", "double_factorized_hamiltonian"], [3, 0, 0, "-", "molecular_hamiltonian"]], "ffsim.hamiltonians.double_factorized_hamiltonian": [[3, 2, 1, "", "DoubleFactorizedHamiltonian"], [3, 1, 1, "", "double_factorized_hamiltonian"]], "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian": [[3, 3, 1, "", "constant"], [3, 3, 1, "", "diag_coulomb_mats"], [3, 4, 1, "", "norb"], [3, 3, 1, "", "one_body_tensor"], [3, 3, 1, "", "orbital_rotations"], [3, 5, 1, "", "to_number_representation"], [3, 5, 1, "", "to_z_representation"], [3, 3, 1, "", "z_representation"]], "ffsim.hamiltonians.molecular_hamiltonian": [[3, 2, 1, "", "MolecularHamiltonian"]], "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian": [[3, 3, 1, "", "constant"], [3, 4, 1, "", "norb"], [3, 3, 1, "", "one_body_tensor"], [3, 3, 1, "", "two_body_tensor"]], "ffsim.linalg": [[4, 0, 0, "-", "double_factorized"], [4, 0, 0, "-", "givens"], [4, 0, 0, "-", "linalg"], [4, 0, 0, "-", "predicates"]], "ffsim.linalg.double_factorized": [[4, 1, 1, "", "double_factorized"], [4, 1, 1, "", "double_factorized_t2"], [4, 1, 1, "", "modified_cholesky"], [4, 1, 1, "", "optimal_diag_coulomb_mats"]], "ffsim.linalg.givens": [[4, 1, 1, "", "apply_matrix_to_slices"], [4, 1, 1, "", "givens_decomposition"], [4, 1, 1, "", "zrotg"]], "ffsim.linalg.linalg": [[4, 1, 1, "", "expm_multiply_taylor"], [4, 1, 1, "", "lup"]], "ffsim.linalg.predicates": [[4, 1, 1, "", "is_antihermitian"], [4, 1, 1, "", "is_hermitian"], [4, 1, 1, "", "is_orthogonal"], [4, 1, 1, "", "is_real_symmetric"], [4, 1, 1, "", "is_special_orthogonal"], [4, 1, 1, "", "is_unitary"]], "ffsim.molecular_data": [[0, 2, 1, "", "MolecularData"]], "ffsim.protocols": [[5, 0, 0, "-", "approximate_equality"], [5, 0, 0, "-", "linear_operator"], [5, 0, 0, "-", "trace"]], "ffsim.protocols.approximate_equality": [[5, 2, 1, "", "SupportsApproximateEquality"], [5, 1, 1, "", "approx_eq"]], "ffsim.protocols.linear_operator": [[5, 2, 1, "", "SupportsLinearOperator"], [5, 1, 1, "", "linear_operator"]], "ffsim.protocols.trace": [[5, 2, 1, "", "SupportsTrace"], [5, 1, 1, "", "trace"]], "ffsim.random": [[0, 1, 1, "", "random_antihermitian"], [0, 1, 1, "", "random_hermitian"], [0, 1, 1, "", "random_orthogonal"], [0, 1, 1, "", "random_real_symmetric_matrix"], [0, 1, 1, "", "random_special_orthogonal"], [0, 1, 1, "", "random_statevector"], [0, 1, 1, "", "random_t2_amplitudes"], [0, 1, 1, "", "random_two_body_tensor_real"], [0, 1, 1, "", "random_unitary"]], "ffsim.states": [[0, 1, 1, "", "dim"], [0, 1, 1, "", "dims"], [0, 1, 1, "", "one_hot"], [0, 1, 1, "", "slater_determinant"], [0, 1, 1, "", "slater_determinant_one_rdm"]], "ffsim.testing": [[0, 1, 1, "", "random_nelec"], [0, 1, 1, "", "random_occupied_orbitals"]], "ffsim.trotter": [[6, 0, 0, "-", "qdrift"], [6, 0, 0, "-", "trotter"]], "ffsim.trotter.qdrift": [[6, 1, 1, "", "expectation_squared_diag_coulomb"], [6, 1, 1, "", "one_body_square_decomposition"], [6, 1, 1, "", "qdrift_probabilities"], [6, 1, 1, "", "simulate_qdrift_double_factorized"], [6, 1, 1, "", "spectral_norm_diag_coulomb"], [6, 1, 1, "", "spectral_norm_one_body_tensor"], [6, 1, 1, "", "variance_diag_coulomb"], [6, 1, 1, "", "variance_one_body_tensor"]], "ffsim.trotter.trotter": [[6, 1, 1, "", "simulate_trotter_double_factorized"]], "ffsim.variational": [[7, 0, 0, "-", "lucj"]], "ffsim.variational.lucj": [[7, 2, 1, "", "UCJOperator"], [7, 1, 1, "", "apply_ucj_operator"]], "ffsim.variational.lucj.UCJOperator": [[7, 3, 1, "", "diag_coulomb_mats_alpha_alpha"], [7, 3, 1, "", "diag_coulomb_mats_alpha_beta"], [7, 3, 1, "", "final_orbital_rotation"], [7, 5, 1, "", "from_parameters"], [7, 5, 1, "", "from_t_amplitudes"], [7, 4, 1, "", "n_reps"], [7, 4, 1, "", "norb"], [7, 3, 1, "", "orbital_rotations"], [7, 5, 1, "", "to_parameters"], [7, 5, 1, "", "to_t_amplitudes"]], "ffsim.wick": [[0, 1, 1, "", "expectation_power"], [0, 1, 1, "", "expectation_product"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:attribute", "4": "py:property", "5": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "property", "Python property"], "5": ["py", "method", "Python method"]}, "titleterms": {"ffsim": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11], "packag": [0, 1, 2, 3, 4, 5, 6, 7], "subpackag": 0, "submodul": [0, 1, 2, 3, 4, 5, 6, 7], "fermion_act": 0, "modul": [0, 1, 2, 3, 4, 5, 6, 7], "molecular_data": 0, "random": 0, "state": 0, "test": 0, "wick": 0, "content": [0, 1, 2, 3, 4, 5, 6, 7, 10, 16], "contract": 1, "diag_coulomb": [1, 2], "hamiltonian": [1, 3, 12, 13], "num_op_sum": [1, 2], "gate": 2, "basic_g": 2, "orbital_rot": 2, "double_factorized_hamiltonian": 3, "molecular_hamiltonian": 3, "linalg": 4, "double_factor": 4, "given": 4, "predic": 4, "protocol": 5, "approximate_equ": 5, "linear_oper": 5, "trace": 5, "trotter": [6, 13], "qdrift": 6, "variat": 7, "lucj": [7, 14], "api": 9, "refer": 9, "document": 10, "indic": 10, "tabl": 10, "introduct": 11, "orbit": 12, "rotat": 12, "quadrat": 12, "time": 12, "evolut": 12, "diagon": 13, "coulomb": 13, "oper": 13, "doubl": 13, "factor": 13, "simul": 13, "represent": 13, "molecular": 13, "brief": 13, "background": 13, "suzuki": 13, "formula": 13, "implement": 13, "The": [14, 15], "local": 14, "unitari": 14, "cluster": 14, "jastrow": 14, "ansatz": 14, "ucj": 14, "fermionoper": 15, "class": 15, "tutori": 16}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "nbsphinx": 4, "sphinx": 60}, "alltitles": {"ffsim package": [[0, "ffsim-package"]], "Subpackages": [[0, "subpackages"]], "Submodules": [[0, "submodules"], [1, "submodules"], [2, "submodules"], [3, "submodules"], [4, "submodules"], [5, "submodules"], [6, "submodules"], [7, "submodules"]], "ffsim.fermion_action module": [[0, "module-ffsim.fermion_action"]], "ffsim.molecular_data module": [[0, "module-ffsim.molecular_data"]], "ffsim.random module": [[0, "module-ffsim.random"]], "ffsim.states module": [[0, "module-ffsim.states"]], "ffsim.testing module": [[0, "module-ffsim.testing"]], "ffsim.wick module": [[0, "module-ffsim.wick"]], "Module contents": [[0, "module-ffsim"], [1, "module-ffsim.contract"], [2, "module-ffsim.gates"], [3, "module-ffsim.hamiltonians"], [4, "module-ffsim.linalg"], [5, "module-ffsim.protocols"], [6, "module-ffsim.trotter"], [7, "module-ffsim.variational"]], "ffsim.contract package": [[1, "ffsim-contract-package"]], "ffsim.contract.diag_coulomb module": [[1, "module-ffsim.contract.diag_coulomb"]], "ffsim.contract.hamiltonian module": [[1, "module-ffsim.contract.hamiltonian"]], "ffsim.contract.num_op_sum module": [[1, "module-ffsim.contract.num_op_sum"]], "ffsim.gates package": [[2, "ffsim-gates-package"]], "ffsim.gates.basic_gates module": [[2, "module-ffsim.gates.basic_gates"]], "ffsim.gates.diag_coulomb module": [[2, "module-ffsim.gates.diag_coulomb"]], "ffsim.gates.num_op_sum module": [[2, "module-ffsim.gates.num_op_sum"]], "ffsim.gates.orbital_rotation module": [[2, "module-ffsim.gates.orbital_rotation"]], "ffsim.hamiltonians package": [[3, "ffsim-hamiltonians-package"]], "ffsim.hamiltonians.double_factorized_hamiltonian module": [[3, "module-ffsim.hamiltonians.double_factorized_hamiltonian"]], "ffsim.hamiltonians.molecular_hamiltonian module": [[3, "module-ffsim.hamiltonians.molecular_hamiltonian"]], "ffsim.linalg package": [[4, "ffsim-linalg-package"]], "ffsim.linalg.double_factorized module": [[4, "module-ffsim.linalg.double_factorized"]], "ffsim.linalg.givens module": [[4, "module-ffsim.linalg.givens"]], "ffsim.linalg.linalg module": [[4, "module-ffsim.linalg.linalg"]], "ffsim.linalg.predicates module": [[4, "module-ffsim.linalg.predicates"]], "ffsim.protocols package": [[5, "ffsim-protocols-package"]], "ffsim.protocols.approximate_equality module": [[5, "module-ffsim.protocols.approximate_equality"]], "ffsim.protocols.linear_operator module": [[5, "module-ffsim.protocols.linear_operator"]], "ffsim.protocols.trace module": [[5, "module-ffsim.protocols.trace"]], "ffsim.trotter package": [[6, "ffsim-trotter-package"]], "ffsim.trotter.qdrift module": [[6, "module-ffsim.trotter.qdrift"]], "ffsim.trotter.trotter module": [[6, "module-ffsim.trotter.trotter"]], "ffsim.variational package": [[7, "ffsim-variational-package"]], "ffsim.variational.lucj module": [[7, "module-ffsim.variational.lucj"]], "ffsim": [[8, "ffsim"]], "API reference": [[9, "api-reference"]], "ffsim documentation": [[10, "ffsim-documentation"]], "Contents:": [[10, null], [16, null]], "Indices and tables": [[10, "indices-and-tables"]], "Introduction to ffsim": [[11, "Introduction-to-ffsim"]], "Orbital rotations and quadratic Hamiltonians": [[12, "Orbital-rotations-and-quadratic-Hamiltonians"]], "Orbital rotations": [[12, "Orbital-rotations"]], "Time evolution by a quadratic Hamiltonian": [[12, "Time-evolution-by-a-quadratic-Hamiltonian"]], "Diagonal Coulomb operators and double-factorized Trotter simulation": [[13, "Diagonal-Coulomb-operators-and-double-factorized-Trotter-simulation"]], "Double-factorized representation of the molecular Hamiltonian": [[13, "Double-factorized-representation-of-the-molecular-Hamiltonian"]], "Trotter simulation of the double-factorized Hamiltonian": [[13, "Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "Brief background on Trotter-Suzuki formulas": [[13, "Brief-background-on-Trotter-Suzuki-formulas"]], "Implementing Trotter simulation of the double-factorized Hamiltonian": [[13, "Implementing-Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "The local unitary cluster Jastrow (LUCJ) ansatz": [[14, "The-local-unitary-cluster-Jastrow-(LUCJ)-ansatz"], [14, "id1"]], "The unitary cluster Jastrow (UCJ) ansatz": [[14, "The-unitary-cluster-Jastrow-(UCJ)-ansatz"]], "The FermionOperator class": [[15, "The-FermionOperator-class"]], "Tutorials": [[16, "tutorials"]]}, "indexentries": {"fermionaction (class in ffsim.fermion_action)": [[0, "ffsim.fermion_action.FermionAction"]], "moleculardata (class in ffsim.molecular_data)": [[0, "ffsim.molecular_data.MolecularData"]], "action (ffsim.fermion_action.fermionaction attribute)": [[0, "ffsim.fermion_action.FermionAction.action"]], "cre() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.cre"]], "cre_a() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.cre_a"]], "cre_b() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.cre_b"]], "des() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.des"]], "des_a() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.des_a"]], "des_b() (in module ffsim.fermion_action)": [[0, "ffsim.fermion_action.des_b"]], "dim() (in module ffsim.states)": [[0, "ffsim.states.dim"]], "dims() (in module ffsim.states)": [[0, "ffsim.states.dims"]], "expectation_power() (in module ffsim.wick)": [[0, "ffsim.wick.expectation_power"]], "expectation_product() (in module ffsim.wick)": [[0, "ffsim.wick.expectation_product"]], "ffsim": [[0, "module-ffsim"]], "ffsim.fermion_action": [[0, "module-ffsim.fermion_action"]], "ffsim.molecular_data": [[0, "module-ffsim.molecular_data"]], "ffsim.random": [[0, "module-ffsim.random"]], "ffsim.states": [[0, "module-ffsim.states"]], "ffsim.testing": [[0, "module-ffsim.testing"]], "ffsim.wick": [[0, "module-ffsim.wick"]], "module": [[0, "module-ffsim"], [0, "module-ffsim.fermion_action"], [0, "module-ffsim.molecular_data"], [0, "module-ffsim.random"], [0, "module-ffsim.states"], [0, "module-ffsim.testing"], [0, "module-ffsim.wick"], [1, "module-ffsim.contract"], [1, "module-ffsim.contract.diag_coulomb"], [1, "module-ffsim.contract.hamiltonian"], [1, "module-ffsim.contract.num_op_sum"], [2, "module-ffsim.gates"], [2, "module-ffsim.gates.basic_gates"], [2, "module-ffsim.gates.diag_coulomb"], [2, "module-ffsim.gates.num_op_sum"], [2, "module-ffsim.gates.orbital_rotation"], [3, "module-ffsim.hamiltonians"], [3, "module-ffsim.hamiltonians.double_factorized_hamiltonian"], [3, "module-ffsim.hamiltonians.molecular_hamiltonian"], [4, "module-ffsim.linalg"], [4, "module-ffsim.linalg.double_factorized"], [4, "module-ffsim.linalg.givens"], [4, "module-ffsim.linalg.linalg"], [4, "module-ffsim.linalg.predicates"], [5, "module-ffsim.protocols"], [5, "module-ffsim.protocols.approximate_equality"], [5, "module-ffsim.protocols.linear_operator"], [5, "module-ffsim.protocols.trace"], [6, "module-ffsim.trotter"], [6, "module-ffsim.trotter.qdrift"], [6, "module-ffsim.trotter.trotter"], [7, "module-ffsim.variational"], [7, "module-ffsim.variational.lucj"]], "one_hot() (in module ffsim.states)": [[0, "ffsim.states.one_hot"]], "orb (ffsim.fermion_action.fermionaction attribute)": [[0, "ffsim.fermion_action.FermionAction.orb"]], "random_antihermitian() (in module ffsim.random)": [[0, "ffsim.random.random_antihermitian"]], "random_hermitian() (in module ffsim.random)": [[0, "ffsim.random.random_hermitian"]], "random_nelec() (in module ffsim.testing)": [[0, "ffsim.testing.random_nelec"]], "random_occupied_orbitals() (in module ffsim.testing)": [[0, "ffsim.testing.random_occupied_orbitals"]], "random_orthogonal() (in module ffsim.random)": [[0, "ffsim.random.random_orthogonal"]], "random_real_symmetric_matrix() (in module ffsim.random)": [[0, "ffsim.random.random_real_symmetric_matrix"]], "random_special_orthogonal() (in module ffsim.random)": [[0, "ffsim.random.random_special_orthogonal"]], "random_statevector() (in module ffsim.random)": [[0, "ffsim.random.random_statevector"]], "random_t2_amplitudes() (in module ffsim.random)": [[0, "ffsim.random.random_t2_amplitudes"]], "random_two_body_tensor_real() (in module ffsim.random)": [[0, "ffsim.random.random_two_body_tensor_real"]], "random_unitary() (in module ffsim.random)": [[0, "ffsim.random.random_unitary"]], "slater_determinant() (in module ffsim.states)": [[0, "ffsim.states.slater_determinant"]], "slater_determinant_one_rdm() (in module ffsim.states)": [[0, "ffsim.states.slater_determinant_one_rdm"]], "spin (ffsim.fermion_action.fermionaction attribute)": [[0, "ffsim.fermion_action.FermionAction.spin"]], "contract_diag_coulomb() (in module ffsim.contract.diag_coulomb)": [[1, "ffsim.contract.diag_coulomb.contract_diag_coulomb"]], "contract_num_op_sum() (in module ffsim.contract.num_op_sum)": [[1, "ffsim.contract.num_op_sum.contract_num_op_sum"]], "diag_coulomb_linop() (in module ffsim.contract.diag_coulomb)": [[1, "ffsim.contract.diag_coulomb.diag_coulomb_linop"]], "ffsim.contract": [[1, "module-ffsim.contract"]], "ffsim.contract.diag_coulomb": [[1, "module-ffsim.contract.diag_coulomb"]], "ffsim.contract.hamiltonian": [[1, "module-ffsim.contract.hamiltonian"]], "ffsim.contract.num_op_sum": [[1, "module-ffsim.contract.num_op_sum"]], "hamiltonian_linop() (in module ffsim.contract.hamiltonian)": [[1, "ffsim.contract.hamiltonian.hamiltonian_linop"]], "hamiltonian_trace() (in module ffsim.contract.hamiltonian)": [[1, "ffsim.contract.hamiltonian.hamiltonian_trace"]], "num_op_sum_linop() (in module ffsim.contract.num_op_sum)": [[1, "ffsim.contract.num_op_sum.num_op_sum_linop"]], "apply_diag_coulomb_evolution() (in module ffsim.gates.diag_coulomb)": [[2, "ffsim.gates.diag_coulomb.apply_diag_coulomb_evolution"]], "apply_fsim_gate() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_fsim_gate"]], "apply_givens_rotation() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_givens_rotation"]], "apply_hop_gate() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_hop_gate"]], "apply_num_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_num_interaction"]], "apply_num_num_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_num_num_interaction"]], "apply_num_op_prod_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_num_op_prod_interaction"]], "apply_num_op_sum_evolution() (in module ffsim.gates.num_op_sum)": [[2, "ffsim.gates.num_op_sum.apply_num_op_sum_evolution"]], "apply_orbital_rotation() (in module ffsim.gates.orbital_rotation)": [[2, "ffsim.gates.orbital_rotation.apply_orbital_rotation"]], "apply_tunneling_interaction() (in module ffsim.gates.basic_gates)": [[2, "ffsim.gates.basic_gates.apply_tunneling_interaction"]], "ffsim.gates": [[2, "module-ffsim.gates"]], "ffsim.gates.basic_gates": [[2, "module-ffsim.gates.basic_gates"]], "ffsim.gates.diag_coulomb": [[2, "module-ffsim.gates.diag_coulomb"]], "ffsim.gates.num_op_sum": [[2, "module-ffsim.gates.num_op_sum"]], "ffsim.gates.orbital_rotation": [[2, "module-ffsim.gates.orbital_rotation"]], "gen_orbital_rotation_index() (in module ffsim.gates.orbital_rotation)": [[2, "ffsim.gates.orbital_rotation.gen_orbital_rotation_index"]], "doublefactorizedhamiltonian (class in ffsim.hamiltonians.double_factorized_hamiltonian)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian"]], "molecularhamiltonian (class in ffsim.hamiltonians.molecular_hamiltonian)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian"]], "constant (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.constant"]], "constant (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian attribute)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.constant"]], "diag_coulomb_mats (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.diag_coulomb_mats"]], "double_factorized_hamiltonian() (in module ffsim.hamiltonians.double_factorized_hamiltonian)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.double_factorized_hamiltonian"]], "ffsim.hamiltonians": [[3, "module-ffsim.hamiltonians"]], "ffsim.hamiltonians.double_factorized_hamiltonian": [[3, "module-ffsim.hamiltonians.double_factorized_hamiltonian"]], "ffsim.hamiltonians.molecular_hamiltonian": [[3, "module-ffsim.hamiltonians.molecular_hamiltonian"]], "norb (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian property)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.norb"]], "norb (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian property)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.norb"]], "one_body_tensor (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.one_body_tensor"]], "one_body_tensor (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian attribute)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.one_body_tensor"]], "orbital_rotations (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.orbital_rotations"]], "to_number_representation() (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian method)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.to_number_representation"]], "to_z_representation() (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian method)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.to_z_representation"]], "two_body_tensor (ffsim.hamiltonians.molecular_hamiltonian.molecularhamiltonian attribute)": [[3, "ffsim.hamiltonians.molecular_hamiltonian.MolecularHamiltonian.two_body_tensor"]], "z_representation (ffsim.hamiltonians.double_factorized_hamiltonian.doublefactorizedhamiltonian attribute)": [[3, "ffsim.hamiltonians.double_factorized_hamiltonian.DoubleFactorizedHamiltonian.z_representation"]], "apply_matrix_to_slices() (in module ffsim.linalg.givens)": [[4, "ffsim.linalg.givens.apply_matrix_to_slices"]], "double_factorized() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.double_factorized"]], "double_factorized_t2() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.double_factorized_t2"]], "expm_multiply_taylor() (in module ffsim.linalg.linalg)": [[4, "ffsim.linalg.linalg.expm_multiply_taylor"]], "ffsim.linalg": [[4, "module-ffsim.linalg"]], "ffsim.linalg.double_factorized": [[4, "module-ffsim.linalg.double_factorized"]], "ffsim.linalg.givens": [[4, "module-ffsim.linalg.givens"]], "ffsim.linalg.linalg": [[4, "module-ffsim.linalg.linalg"]], "ffsim.linalg.predicates": [[4, "module-ffsim.linalg.predicates"]], "givens_decomposition() (in module ffsim.linalg.givens)": [[4, "ffsim.linalg.givens.givens_decomposition"]], "is_antihermitian() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_antihermitian"]], "is_hermitian() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_hermitian"]], "is_orthogonal() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_orthogonal"]], "is_real_symmetric() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_real_symmetric"]], "is_special_orthogonal() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_special_orthogonal"]], "is_unitary() (in module ffsim.linalg.predicates)": [[4, "ffsim.linalg.predicates.is_unitary"]], "lup() (in module ffsim.linalg.linalg)": [[4, "ffsim.linalg.linalg.lup"]], "modified_cholesky() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.modified_cholesky"]], "optimal_diag_coulomb_mats() (in module ffsim.linalg.double_factorized)": [[4, "ffsim.linalg.double_factorized.optimal_diag_coulomb_mats"]], "zrotg() (in module ffsim.linalg.givens)": [[4, "ffsim.linalg.givens.zrotg"]], "supportsapproximateequality (class in ffsim.protocols.approximate_equality)": [[5, "ffsim.protocols.approximate_equality.SupportsApproximateEquality"]], "supportslinearoperator (class in ffsim.protocols.linear_operator)": [[5, "ffsim.protocols.linear_operator.SupportsLinearOperator"]], "supportstrace (class in ffsim.protocols.trace)": [[5, "ffsim.protocols.trace.SupportsTrace"]], "approx_eq() (in module ffsim.protocols.approximate_equality)": [[5, "ffsim.protocols.approximate_equality.approx_eq"]], "ffsim.protocols": [[5, "module-ffsim.protocols"]], "ffsim.protocols.approximate_equality": [[5, "module-ffsim.protocols.approximate_equality"]], "ffsim.protocols.linear_operator": [[5, "module-ffsim.protocols.linear_operator"]], "ffsim.protocols.trace": [[5, "module-ffsim.protocols.trace"]], "linear_operator() (in module ffsim.protocols.linear_operator)": [[5, "ffsim.protocols.linear_operator.linear_operator"]], "trace() (in module ffsim.protocols.trace)": [[5, "ffsim.protocols.trace.trace"]], "expectation_squared_diag_coulomb() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.expectation_squared_diag_coulomb"]], "ffsim.trotter": [[6, "module-ffsim.trotter"]], "ffsim.trotter.qdrift": [[6, "module-ffsim.trotter.qdrift"]], "ffsim.trotter.trotter": [[6, "module-ffsim.trotter.trotter"]], "one_body_square_decomposition() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.one_body_square_decomposition"]], "qdrift_probabilities() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.qdrift_probabilities"]], "simulate_qdrift_double_factorized() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.simulate_qdrift_double_factorized"]], "simulate_trotter_double_factorized() (in module ffsim.trotter.trotter)": [[6, "ffsim.trotter.trotter.simulate_trotter_double_factorized"]], "spectral_norm_diag_coulomb() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.spectral_norm_diag_coulomb"]], "spectral_norm_one_body_tensor() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.spectral_norm_one_body_tensor"]], "variance_diag_coulomb() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.variance_diag_coulomb"]], "variance_one_body_tensor() (in module ffsim.trotter.qdrift)": [[6, "ffsim.trotter.qdrift.variance_one_body_tensor"]], "ucjoperator (class in ffsim.variational.lucj)": [[7, "ffsim.variational.lucj.UCJOperator"]], "apply_ucj_operator() (in module ffsim.variational.lucj)": [[7, "ffsim.variational.lucj.apply_ucj_operator"]], "diag_coulomb_mats_alpha_alpha (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.diag_coulomb_mats_alpha_alpha"]], "diag_coulomb_mats_alpha_beta (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.diag_coulomb_mats_alpha_beta"]], "ffsim.variational": [[7, "module-ffsim.variational"]], "ffsim.variational.lucj": [[7, "module-ffsim.variational.lucj"]], "final_orbital_rotation (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.final_orbital_rotation"]], "from_parameters() (ffsim.variational.lucj.ucjoperator static method)": [[7, "ffsim.variational.lucj.UCJOperator.from_parameters"]], "from_t_amplitudes() (ffsim.variational.lucj.ucjoperator static method)": [[7, "ffsim.variational.lucj.UCJOperator.from_t_amplitudes"]], "n_reps (ffsim.variational.lucj.ucjoperator property)": [[7, "ffsim.variational.lucj.UCJOperator.n_reps"]], "norb (ffsim.variational.lucj.ucjoperator property)": [[7, "ffsim.variational.lucj.UCJOperator.norb"]], "orbital_rotations (ffsim.variational.lucj.ucjoperator attribute)": [[7, "ffsim.variational.lucj.UCJOperator.orbital_rotations"]], "to_parameters() (ffsim.variational.lucj.ucjoperator method)": [[7, "ffsim.variational.lucj.UCJOperator.to_parameters"]], "to_t_amplitudes() (ffsim.variational.lucj.ucjoperator method)": [[7, "ffsim.variational.lucj.UCJOperator.to_t_amplitudes"]]}}) \ No newline at end of file diff --git a/tutorials/01-introduction.ipynb b/tutorials/01-introduction.ipynb index 38472ac7d..b46f68b04 100644 --- a/tutorials/01-introduction.ipynb +++ b/tutorials/01-introduction.ipynb @@ -16,10 +16,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:34.339625Z", - "iopub.status.busy": "2023-10-19T02:46:34.339200Z", - "iopub.status.idle": "2023-10-19T02:46:34.631991Z", - "shell.execute_reply": "2023-10-19T02:46:34.631357Z" + "iopub.execute_input": "2023-10-19T14:39:55.333137Z", + "iopub.status.busy": "2023-10-19T14:39:55.332800Z", + "iopub.status.idle": "2023-10-19T14:39:55.620635Z", + "shell.execute_reply": "2023-10-19T14:39:55.620092Z" } }, "outputs": [], @@ -62,10 +62,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:34.635817Z", - "iopub.status.busy": "2023-10-19T02:46:34.635204Z", - "iopub.status.idle": "2023-10-19T02:46:34.639086Z", - "shell.execute_reply": "2023-10-19T02:46:34.638624Z" + "iopub.execute_input": "2023-10-19T14:39:55.625193Z", + "iopub.status.busy": "2023-10-19T14:39:55.624119Z", + "iopub.status.idle": "2023-10-19T14:39:55.629183Z", + "shell.execute_reply": "2023-10-19T14:39:55.628710Z" } }, "outputs": [], @@ -93,10 +93,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:34.642084Z", - "iopub.status.busy": "2023-10-19T02:46:34.641488Z", - "iopub.status.idle": "2023-10-19T02:46:34.644420Z", - "shell.execute_reply": "2023-10-19T02:46:34.643975Z" + "iopub.execute_input": "2023-10-19T14:39:55.633035Z", + "iopub.status.busy": "2023-10-19T14:39:55.632089Z", + "iopub.status.idle": "2023-10-19T14:39:55.636031Z", + "shell.execute_reply": "2023-10-19T14:39:55.635577Z" } }, "outputs": [], diff --git a/tutorials/02-orbital-rotation.ipynb b/tutorials/02-orbital-rotation.ipynb index 3d8e6a9aa..be6e21fe5 100644 --- a/tutorials/02-orbital-rotation.ipynb +++ b/tutorials/02-orbital-rotation.ipynb @@ -43,10 +43,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.167922Z", - "iopub.status.busy": "2023-10-19T02:46:36.167518Z", - "iopub.status.idle": "2023-10-19T02:46:36.461097Z", - "shell.execute_reply": "2023-10-19T02:46:36.460456Z" + "iopub.execute_input": "2023-10-19T14:39:57.127490Z", + "iopub.status.busy": "2023-10-19T14:39:57.127250Z", + "iopub.status.idle": "2023-10-19T14:39:57.415242Z", + "shell.execute_reply": "2023-10-19T14:39:57.414684Z" } }, "outputs": [], @@ -111,10 +111,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.464540Z", - "iopub.status.busy": "2023-10-19T02:46:36.464254Z", - "iopub.status.idle": "2023-10-19T02:46:36.489805Z", - "shell.execute_reply": "2023-10-19T02:46:36.489257Z" + "iopub.execute_input": "2023-10-19T14:39:57.419456Z", + "iopub.status.busy": "2023-10-19T14:39:57.418437Z", + "iopub.status.idle": "2023-10-19T14:39:57.443882Z", + "shell.execute_reply": "2023-10-19T14:39:57.443356Z" } }, "outputs": [], @@ -160,10 +160,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.492991Z", - "iopub.status.busy": "2023-10-19T02:46:36.492785Z", - "iopub.status.idle": "2023-10-19T02:46:36.503612Z", - "shell.execute_reply": "2023-10-19T02:46:36.503068Z" + "iopub.execute_input": "2023-10-19T14:39:57.447969Z", + "iopub.status.busy": "2023-10-19T14:39:57.447021Z", + "iopub.status.idle": "2023-10-19T14:39:57.458057Z", + "shell.execute_reply": "2023-10-19T14:39:57.457553Z" } }, "outputs": [], @@ -203,10 +203,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:36.506429Z", - "iopub.status.busy": "2023-10-19T02:46:36.506212Z", - "iopub.status.idle": "2023-10-19T02:46:36.511130Z", - "shell.execute_reply": "2023-10-19T02:46:36.510597Z" + "iopub.execute_input": "2023-10-19T14:39:57.462338Z", + "iopub.status.busy": "2023-10-19T14:39:57.461004Z", + "iopub.status.idle": "2023-10-19T14:39:57.467050Z", + "shell.execute_reply": "2023-10-19T14:39:57.466562Z" } }, "outputs": [], diff --git a/tutorials/03-double-factorized.html b/tutorials/03-double-factorized.html index 2aacdf11f..270204248 100644 --- a/tutorials/03-double-factorized.html +++ b/tutorials/03-double-factorized.html @@ -136,44 +136,44 @@

Double-factorized representation of the molecular Hamiltonian
-Hartree Fock energy: -0.8377963825937088
+Hartree Fock energy: -0.837796382593709
 

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.

@@ -352,7 +352,7 @@

Implementing Trotter simulation of the double-factorized Hamiltonian
-Fidelity of Trotter-evolved state with exact state: 0.999027574408349
+Fidelity of Trotter-evolved state with exact state: 0.9990275744083491
 

The fidelity of the final result can be improved by increasing the number of Trotter steps.

@@ -379,7 +379,7 @@

Implementing Trotter simulation of the double-factorized Hamiltonian
-Fidelity of Trotter-evolved state with exact state: 0.9999906233109657
+Fidelity of Trotter-evolved state with exact state: 0.9999906233109653
 

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.

@@ -408,7 +408,7 @@

Implementing Trotter simulation of the double-factorized Hamiltonian
-Fidelity of Trotter-evolved state with exact state: 0.9999906233109657
+Fidelity of Trotter-evolved state with exact state: 0.9999906233109653
 

A higher order formula achieves a higher fidelity with fewer Trotter steps:

@@ -436,7 +436,7 @@

Implementing Trotter simulation of the double-factorized Hamiltonian
-Fidelity of Trotter-evolved state with exact state: 0.9999999336740057
+Fidelity of Trotter-evolved state with exact state: 0.9999999336740059
 
diff --git a/tutorials/03-double-factorized.ipynb b/tutorials/03-double-factorized.ipynb index c719b9884..2cb8abca1 100644 --- a/tutorials/03-double-factorized.ipynb +++ b/tutorials/03-double-factorized.ipynb @@ -43,10 +43,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.188517Z", - "iopub.status.busy": "2023-10-19T02:46:38.188110Z", - "iopub.status.idle": "2023-10-19T02:46:38.578982Z", - "shell.execute_reply": "2023-10-19T02:46:38.578351Z" + "iopub.execute_input": "2023-10-19T14:39:58.908837Z", + "iopub.status.busy": "2023-10-19T14:39:58.908499Z", + "iopub.status.idle": "2023-10-19T14:39:59.292292Z", + "shell.execute_reply": "2023-10-19T14:39:59.291735Z" } }, "outputs": [ @@ -93,10 +93,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.591785Z", - "iopub.status.busy": "2023-10-19T02:46:38.591349Z", - "iopub.status.idle": "2023-10-19T02:46:38.597111Z", - "shell.execute_reply": "2023-10-19T02:46:38.596658Z" + "iopub.execute_input": "2023-10-19T14:39:59.296046Z", + "iopub.status.busy": "2023-10-19T14:39:59.295505Z", + "iopub.status.idle": "2023-10-19T14:39:59.303680Z", + "shell.execute_reply": "2023-10-19T14:39:59.303208Z" } }, "outputs": [ @@ -111,44 +111,44 @@ " [-3.07220771e-16 -6.77238770e-01]]\n", "\n", "Two-body tensor:\n", - "[[[[5.23173938e-01 1.57437591e-16]\n", - " [1.57437591e-16 5.33545754e-01]]\n", + "[[[[5.23173938e-01 1.94289029e-16]\n", + " [1.94289029e-16 5.33545754e-01]]\n", "\n", - " [[2.12704463e-16 2.48240570e-01]\n", - " [2.48240570e-01 1.61492903e-16]]]\n", + " [[1.94289029e-16 2.48240570e-01]\n", + " [2.48240570e-01 8.32667268e-17]]]\n", "\n", "\n", - " [[[2.12704463e-16 2.48240570e-01]\n", - " [2.48240570e-01 1.61492903e-16]]\n", + " [[[1.94289029e-16 2.48240570e-01]\n", + " [2.48240570e-01 8.32667268e-17]]\n", "\n", - " [[5.33545754e-01 1.24884750e-16]\n", - " [1.24884750e-16 5.53132024e-01]]]]\n", + " [[5.33545754e-01 1.11022302e-16]\n", + " [1.11022302e-16 5.53132024e-01]]]]\n", "\n", "Double-factorized representation\n", "--------------------------------\n", "One-body tensor:\n", - "[[-1.21318608e+00 -4.25870402e-16]\n", - " [-4.76015378e-16 -1.07792507e+00]]\n", + "[[-1.21318608e+00 -4.05183033e-16]\n", + " [-4.59876437e-16 -1.07792507e+00]]\n", "\n", "Diagonal Coulomb matrices:\n", - "[[[ 5.14653029e-01 5.33545754e-01]\n", - " [ 5.33545754e-01 5.53132024e-01]]\n", + "[[[ 5.14653029e-001 5.33545754e-001]\n", + " [ 5.33545754e-001 5.53132024e-001]]\n", "\n", - " [[ 2.48240570e-01 -2.48240570e-01]\n", - " [-2.48240570e-01 2.48240570e-01]]\n", + " [[ 2.48240570e-001 -2.48240570e-001]\n", + " [-2.48240570e-001 2.48240570e-001]]\n", "\n", - " [[ 1.50800163e-59 -3.58462611e-31]\n", - " [-3.58462611e-31 8.52090881e-03]]]\n", + " [[ 5.96958401e-121 -7.13206008e-062]\n", + " [-7.13206008e-062 8.52090881e-003]]]\n", "\n", "Orbital rotations:\n", - "[[[-1.00000000e+00 8.24520980e-15]\n", - " [ 8.24520980e-15 1.00000000e+00]]\n", + "[[[-1.00000000e+00 4.25128053e-15]\n", + " [ 4.25128053e-15 1.00000000e+00]]\n", "\n", - " [[-7.07106781e-01 -7.07106781e-01]\n", - " [ 7.07106781e-01 -7.07106781e-01]]\n", + " [[ 7.07106781e-01 -7.07106781e-01]\n", + " [-7.07106781e-01 -7.07106781e-01]]\n", "\n", - " [[ 6.48603030e-15 -1.00000000e+00]\n", - " [-1.00000000e+00 -6.48603030e-15]]]\n" + " [[ 2.89310728e-30 -1.00000000e+00]\n", + " [-1.00000000e+00 -2.89310728e-30]]]\n" ] } ], @@ -227,10 +227,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.599710Z", - "iopub.status.busy": "2023-10-19T02:46:38.599404Z", - "iopub.status.idle": "2023-10-19T02:46:38.603693Z", - "shell.execute_reply": "2023-10-19T02:46:38.603246Z" + "iopub.execute_input": "2023-10-19T14:39:59.307553Z", + "iopub.status.busy": "2023-10-19T14:39:59.306455Z", + "iopub.status.idle": "2023-10-19T14:39:59.312345Z", + "shell.execute_reply": "2023-10-19T14:39:59.311867Z" } }, "outputs": [], @@ -285,10 +285,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.606133Z", - "iopub.status.busy": "2023-10-19T02:46:38.605839Z", - "iopub.status.idle": "2023-10-19T02:46:38.609316Z", - "shell.execute_reply": "2023-10-19T02:46:38.608866Z" + "iopub.execute_input": "2023-10-19T14:39:59.315343Z", + "iopub.status.busy": "2023-10-19T14:39:59.315133Z", + "iopub.status.idle": "2023-10-19T14:39:59.319932Z", + "shell.execute_reply": "2023-10-19T14:39:59.319386Z" } }, "outputs": [], @@ -325,10 +325,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.611974Z", - "iopub.status.busy": "2023-10-19T02:46:38.611674Z", - "iopub.status.idle": "2023-10-19T02:46:38.615968Z", - "shell.execute_reply": "2023-10-19T02:46:38.615522Z" + "iopub.execute_input": "2023-10-19T14:39:59.322653Z", + "iopub.status.busy": "2023-10-19T14:39:59.322251Z", + "iopub.status.idle": "2023-10-19T14:39:59.327160Z", + "shell.execute_reply": "2023-10-19T14:39:59.326695Z" } }, "outputs": [ @@ -336,7 +336,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Hartree Fock energy: -0.8377963825937088\n" + "Hartree Fock energy: -0.837796382593709\n" ] } ], @@ -367,10 +367,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.618277Z", - "iopub.status.busy": "2023-10-19T02:46:38.617987Z", - "iopub.status.idle": "2023-10-19T02:46:38.629673Z", - "shell.execute_reply": "2023-10-19T02:46:38.629147Z" + "iopub.execute_input": "2023-10-19T14:39:59.329875Z", + "iopub.status.busy": "2023-10-19T14:39:59.329325Z", + "iopub.status.idle": "2023-10-19T14:39:59.339042Z", + "shell.execute_reply": "2023-10-19T14:39:59.338412Z" } }, "outputs": [ @@ -409,10 +409,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.632236Z", - "iopub.status.busy": "2023-10-19T02:46:38.631901Z", - "iopub.status.idle": "2023-10-19T02:46:38.639569Z", - "shell.execute_reply": "2023-10-19T02:46:38.639118Z" + "iopub.execute_input": "2023-10-19T14:39:59.341671Z", + "iopub.status.busy": "2023-10-19T14:39:59.341479Z", + "iopub.status.idle": "2023-10-19T14:39:59.349853Z", + "shell.execute_reply": "2023-10-19T14:39:59.349232Z" } }, "outputs": [ @@ -420,7 +420,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.999027574408349\n" + "Fidelity of Trotter-evolved state with exact state: 0.9990275744083491\n" ] } ], @@ -450,10 +450,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.641776Z", - "iopub.status.busy": "2023-10-19T02:46:38.641588Z", - "iopub.status.idle": "2023-10-19T02:46:38.677756Z", - "shell.execute_reply": "2023-10-19T02:46:38.677308Z" + "iopub.execute_input": "2023-10-19T14:39:59.353772Z", + "iopub.status.busy": "2023-10-19T14:39:59.353568Z", + "iopub.status.idle": "2023-10-19T14:39:59.390939Z", + "shell.execute_reply": "2023-10-19T14:39:59.389931Z" } }, "outputs": [ @@ -461,7 +461,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999906233109657\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999906233109653\n" ] } ], @@ -493,10 +493,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.680483Z", - "iopub.status.busy": "2023-10-19T02:46:38.680136Z", - "iopub.status.idle": "2023-10-19T02:46:38.707617Z", - "shell.execute_reply": "2023-10-19T02:46:38.707180Z" + "iopub.execute_input": "2023-10-19T14:39:59.393689Z", + "iopub.status.busy": "2023-10-19T14:39:59.393490Z", + "iopub.status.idle": "2023-10-19T14:39:59.425221Z", + "shell.execute_reply": "2023-10-19T14:39:59.424460Z" } }, "outputs": [ @@ -504,7 +504,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999906233109657\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999906233109653\n" ] } ], @@ -535,10 +535,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:46:38.710858Z", - "iopub.status.busy": "2023-10-19T02:46:38.710516Z", - "iopub.status.idle": "2023-10-19T02:46:38.722585Z", - "shell.execute_reply": "2023-10-19T02:46:38.722134Z" + "iopub.execute_input": "2023-10-19T14:39:59.427658Z", + "iopub.status.busy": "2023-10-19T14:39:59.427469Z", + "iopub.status.idle": "2023-10-19T14:39:59.443022Z", + "shell.execute_reply": "2023-10-19T14:39:59.442331Z" } }, "outputs": [ @@ -546,7 +546,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999999336740057\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999999336740059\n" ] } ], diff --git a/tutorials/04-lucj.html b/tutorials/04-lucj.html index e09245067..4c09e8dcc 100644 --- a/tutorials/04-lucj.html +++ b/tutorials/04-lucj.html @@ -94,8 +94,8 @@

The local unitary cluster Jastrow (LUCJ) ansatz
-converged SCF energy = -77.4456267643962
-CASCI E = -77.6290254326717  E(CI) = -3.57322412553862  S^2 = 0.0000000
+converged SCF energy = -77.4456267643961
+CASCI E = -77.6290254326717  E(CI) = -3.57322412553863  S^2 = 0.0000000
 
@@ -151,8 +151,8 @@

The unitary cluster Jastrow (UCJ) ansatz
-E(CCSD) = -77.49387212754471  E_corr = -0.04824536314851378
-Energy at initialialization: -77.46975600021688
+E(CCSD) = -77.49387212754462  E_corr = -0.04824536314851573
+Energy at initialialization: -77.46975600021692
 

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.)

@@ -193,12 +193,12 @@

The unitary cluster Jastrow (UCJ) ansatz\n" ] } @@ -252,10 +252,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:47:41.571164Z", - "iopub.status.busy": "2023-10-19T02:47:41.570955Z", - "iopub.status.idle": "2023-10-19T02:48:45.937231Z", - "shell.execute_reply": "2023-10-19T02:48:45.936737Z" + "iopub.execute_input": "2023-10-19T14:41:13.662631Z", + "iopub.status.busy": "2023-10-19T14:41:13.661664Z", + "iopub.status.idle": "2023-10-19T14:42:35.356542Z", + "shell.execute_reply": "2023-10-19T14:42:35.356016Z" } }, "outputs": [ @@ -267,12 +267,12 @@ " message: CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH\n", " success: True\n", " status: 0\n", - " fun: -77.62857380046123\n", - " x: [-9.474e-01 -7.735e-01 ... -1.104e+00 -6.212e-01]\n", - " nit: 456\n", - " jac: [-3.311e-04 5.016e-04 ... 1.791e-04 -4.462e-04]\n", - " nfev: 22748\n", - " njev: 484\n", + " fun: -77.62881470757267\n", + " x: [-3.795e+00 -1.386e+00 ... -4.020e-01 1.230e-01]\n", + " nit: 585\n", + " jac: [ 4.434e-04 -1.933e-04 ... 4.007e-04 -1.450e-04]\n", + " nfev: 29422\n", + " njev: 626\n", " hess_inv: <46x46 LbfgsInvHessProduct with dtype=float64>\n" ] } diff --git a/tutorials/05-fermion-operator.html b/tutorials/05-fermion-operator.html index 0ac7a57ea..95315f332 100644 --- a/tutorials/05-fermion-operator.html +++ b/tutorials/05-fermion-operator.html @@ -127,17 +127,17 @@

The FermionOperator class
 FermionOperator({
-    (cre_a(3), des_a(0)): -0.5,
-    (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,
-    (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,
     (des_a(3), des_b(3)): 0.0625,
+    (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,
+    (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,
+    (cre_a(3), des_a(0)): -0.5,
+    (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,
     (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,
-    (cre_b(2)): 0-0.25j,
+    (cre_a(0), des_a(3)): 1,
     (cre_b(1), des_b(5), cre_a(4)): 2+2j,
+    (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,
     (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,
-    (cre_a(0), des_a(3)): 1,
-    (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,
-    (cre_a(0), des_a(3), cre_b(2)): 0+0.5j
+    (cre_b(2)): 0-0.25j
 })
 
@@ -162,17 +162,17 @@

The FermionOperator class
 FermionOperator({
-    (cre_a(3), des_a(0)): 0+3j,
-    (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,
-    (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,
     (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_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,
+    (cre_a(3), des_a(0)): 0+3j,
+    (cre_a(0), des_a(3), cre_b(2)): 2,
     (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,
-    (cre_b(2)): -5,
+    (cre_a(0), des_a(3)): 0-6j,
     (cre_b(1), des_b(5), cre_a(4)): 12-12j,
+    (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,
     (cre_a(3), des_a(0), cre_b(2)): -1,
-    (cre_a(0), des_a(3)): 0-6j,
-    (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,
-    (cre_a(0), des_a(3), cre_b(2)): 2
+    (cre_b(2)): -5
 })
 
@@ -193,16 +193,16 @@

The FermionOperator class
 FermionOperator({
+    (cre_a(3), des_a(0)): 0+3j,
+    (cre_b(2)): -5,
+    (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_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,
-    (cre_b(2), cre_a(3), des_a(0)): -1,
-    (cre_b(2), cre_a(0), des_a(3)): 2,
     (cre_a(0), des_a(3)): 0-6j,
-    (cre_b(1), cre_a(4), des_b(5)): -12+12j,
+    (cre_b(2), cre_a(0), des_a(3)): 2,
+    (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)): -5,
-    (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,
-    (cre_a(3), des_a(0)): 0+3j
+    (cre_b(2), cre_a(3), des_a(0)): -1,
+    (cre_b(1), cre_a(4), des_b(5)): -12+12j
 })
 
@@ -271,11 +271,11 @@

The FermionOperator class
-array([0.       +0.j        , 0.       +0.j        ,
-       0.       +0.j        , 0.       +0.j        ,
-       0.0035998+0.01708495j, 0.       +0.j        ,
-       0.       +0.j        , 0.       +0.j        ,
-       0.       +0.j        ])
+array([0.        +0.j        , 0.        +0.j        ,
+       0.        +0.j        , 0.        +0.j        ,
+       0.11889056-0.13114645j, 0.        +0.j        ,
+       0.        +0.j        , 0.        +0.j        ,
+       0.        +0.j        ])
 

It can also be passed into most linear algebra routines in scipy.sparse.linalg.

diff --git a/tutorials/05-fermion-operator.ipynb b/tutorials/05-fermion-operator.ipynb index 1ae89228e..fa09bcb38 100644 --- a/tutorials/05-fermion-operator.ipynb +++ b/tutorials/05-fermion-operator.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:47.720976Z", - "iopub.status.busy": "2023-10-19T02:48:47.720625Z", - "iopub.status.idle": "2023-10-19T02:48:48.011002Z", - "shell.execute_reply": "2023-10-19T02:48:48.010479Z" + "iopub.execute_input": "2023-10-19T14:42:37.077633Z", + "iopub.status.busy": "2023-10-19T14:42:37.077306Z", + "iopub.status.idle": "2023-10-19T14:42:37.362479Z", + "shell.execute_reply": "2023-10-19T14:42:37.361769Z" } }, "outputs": [ @@ -76,10 +76,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.013922Z", - "iopub.status.busy": "2023-10-19T02:48:48.013514Z", - "iopub.status.idle": "2023-10-19T02:48:48.017207Z", - "shell.execute_reply": "2023-10-19T02:48:48.016749Z" + "iopub.execute_input": "2023-10-19T14:42:37.367296Z", + "iopub.status.busy": "2023-10-19T14:42:37.366261Z", + "iopub.status.idle": "2023-10-19T14:42:37.372138Z", + "shell.execute_reply": "2023-10-19T14:42:37.371678Z" } }, "outputs": [ @@ -110,10 +110,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.019690Z", - "iopub.status.busy": "2023-10-19T02:48:48.019374Z", - "iopub.status.idle": "2023-10-19T02:48:48.023718Z", - "shell.execute_reply": "2023-10-19T02:48:48.023278Z" + "iopub.execute_input": "2023-10-19T14:42:37.375800Z", + "iopub.status.busy": "2023-10-19T14:42:37.374921Z", + "iopub.status.idle": "2023-10-19T14:42:37.381567Z", + "shell.execute_reply": "2023-10-19T14:42:37.381116Z" } }, "outputs": [ @@ -121,17 +121,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(3), des_a(0)): -0.5,\n", - " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,\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_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,\n", + " (cre_a(3), des_a(0)): -0.5,\n", + " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", - " (cre_b(2)): 0-0.25j,\n", + " (cre_a(0), des_a(3)): 1,\n", " (cre_b(1), des_b(5), cre_a(4)): 2+2j,\n", + " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625,\n", " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", - " (cre_a(0), des_a(3)): 1,\n", - " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -0.25-0.25j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j\n", + " (cre_b(2)): 0-0.25j\n", "})" ] }, @@ -169,10 +169,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.027444Z", - "iopub.status.busy": "2023-10-19T02:48:48.026559Z", - "iopub.status.idle": "2023-10-19T02:48:48.032272Z", - "shell.execute_reply": "2023-10-19T02:48:48.031808Z" + "iopub.execute_input": "2023-10-19T14:42:37.385304Z", + "iopub.status.busy": "2023-10-19T14:42:37.384396Z", + "iopub.status.idle": "2023-10-19T14:42:37.390385Z", + "shell.execute_reply": "2023-10-19T14:42:37.389901Z" } }, "outputs": [ @@ -180,17 +180,17 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(3), des_a(0)): 0+3j,\n", - " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,\n", - " (cre_a(0), des_a(3), des_a(3), des_b(3)): 0+0.5j,\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_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,\n", + " (cre_a(3), des_a(0)): 0+3j,\n", + " (cre_a(0), des_a(3), cre_b(2)): 2,\n", " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", - " (cre_b(2)): -5,\n", + " (cre_a(0), des_a(3)): 0-6j,\n", " (cre_b(1), des_b(5), cre_a(4)): 12-12j,\n", + " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j,\n", " (cre_a(3), des_a(0), cre_b(2)): -1,\n", - " (cre_a(0), des_a(3)): 0-6j,\n", - " (cre_b(1), des_b(5), cre_a(4), des_a(3), des_b(3)): -1+1j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 2\n", + " (cre_b(2)): -5\n", "})" ] }, @@ -219,10 +219,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.036387Z", - "iopub.status.busy": "2023-10-19T02:48:48.035466Z", - "iopub.status.idle": "2023-10-19T02:48:48.040999Z", - "shell.execute_reply": "2023-10-19T02:48:48.040538Z" + "iopub.execute_input": "2023-10-19T14:42:37.394709Z", + "iopub.status.busy": "2023-10-19T14:42:37.393740Z", + "iopub.status.idle": "2023-10-19T14:42:37.399514Z", + "shell.execute_reply": "2023-10-19T14:42:37.399055Z" } }, "outputs": [ @@ -230,16 +230,16 @@ "data": { "text/plain": [ "FermionOperator({\n", + " (cre_a(3), des_a(0)): 0+3j,\n", + " (cre_b(2)): -5,\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_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", - " (cre_b(2), cre_a(3), des_a(0)): -1,\n", - " (cre_b(2), cre_a(0), des_a(3)): 2,\n", " (cre_a(0), des_a(3)): 0-6j,\n", - " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", + " (cre_b(2), cre_a(0), des_a(3)): 2,\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)): -5,\n", - " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", - " (cre_a(3), des_a(0)): 0+3j\n", + " (cre_b(2), cre_a(3), des_a(0)): -1,\n", + " (cre_b(1), cre_a(4), des_b(5)): -12+12j\n", "})" ] }, @@ -264,10 +264,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.043752Z", - "iopub.status.busy": "2023-10-19T02:48:48.043401Z", - "iopub.status.idle": "2023-10-19T02:48:48.048074Z", - "shell.execute_reply": "2023-10-19T02:48:48.047596Z" + "iopub.execute_input": "2023-10-19T14:42:37.403183Z", + "iopub.status.busy": "2023-10-19T14:42:37.402262Z", + "iopub.status.idle": "2023-10-19T14:42:37.407487Z", + "shell.execute_reply": "2023-10-19T14:42:37.407040Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.050711Z", - "iopub.status.busy": "2023-10-19T02:48:48.050309Z", - "iopub.status.idle": "2023-10-19T02:48:48.056567Z", - "shell.execute_reply": "2023-10-19T02:48:48.056091Z" + "iopub.execute_input": "2023-10-19T14:42:37.411097Z", + "iopub.status.busy": "2023-10-19T14:42:37.410179Z", + "iopub.status.idle": "2023-10-19T14:42:37.416471Z", + "shell.execute_reply": "2023-10-19T14:42:37.416023Z" } }, "outputs": [ @@ -340,21 +340,21 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.059325Z", - "iopub.status.busy": "2023-10-19T02:48:48.058968Z", - "iopub.status.idle": "2023-10-19T02:48:48.066273Z", - "shell.execute_reply": "2023-10-19T02:48:48.065819Z" + "iopub.execute_input": "2023-10-19T14:42:37.420049Z", + "iopub.status.busy": "2023-10-19T14:42:37.419152Z", + "iopub.status.idle": "2023-10-19T14:42:37.426669Z", + "shell.execute_reply": "2023-10-19T14:42:37.426204Z" } }, "outputs": [ { "data": { "text/plain": [ - "array([0. +0.j , 0. +0.j ,\n", - " 0. +0.j , 0. +0.j ,\n", - " 0.0035998+0.01708495j, 0. +0.j ,\n", - " 0. +0.j , 0. +0.j ,\n", - " 0. +0.j ])" + "array([0. +0.j , 0. +0.j ,\n", + " 0. +0.j , 0. +0.j ,\n", + " 0.11889056-0.13114645j, 0. +0.j ,\n", + " 0. +0.j , 0. +0.j ,\n", + " 0. +0.j ])" ] }, "execution_count": 8, @@ -379,10 +379,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-10-19T02:48:48.069821Z", - "iopub.status.busy": "2023-10-19T02:48:48.068935Z", - "iopub.status.idle": "2023-10-19T02:48:48.080969Z", - "shell.execute_reply": "2023-10-19T02:48:48.080523Z" + "iopub.execute_input": "2023-10-19T14:42:37.430250Z", + "iopub.status.busy": "2023-10-19T14:42:37.429345Z", + "iopub.status.idle": "2023-10-19T14:42:37.441262Z", + "shell.execute_reply": "2023-10-19T14:42:37.440811Z" } }, "outputs": [