diff --git a/.doctrees/api/ffsim.doctree b/.doctrees/api/ffsim.doctree index 2e3d7bb7b..f2874522a 100644 Binary files a/.doctrees/api/ffsim.doctree and b/.doctrees/api/ffsim.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index fb65facb3..281d8c5fe 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree index 0ba42497b..939388793 100644 Binary files a/.doctrees/index.doctree and b/.doctrees/index.doctree differ diff --git a/.doctrees/nbsphinx/tutorials/01-introduction.ipynb b/.doctrees/nbsphinx/tutorials/01-introduction.ipynb index d5ba19349..3797ae9e6 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-27T02:10:56.876770Z", - "iopub.status.busy": "2023-10-27T02:10:56.876313Z", - "iopub.status.idle": "2023-10-27T02:10:57.234710Z", - "shell.execute_reply": "2023-10-27T02:10:57.233997Z" + "iopub.execute_input": "2023-10-27T03:04:57.255539Z", + "iopub.status.busy": "2023-10-27T03:04:57.255034Z", + "iopub.status.idle": "2023-10-27T03:04:57.653213Z", + "shell.execute_reply": "2023-10-27T03:04:57.652569Z" } }, "outputs": [], @@ -62,10 +62,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:57.238646Z", - "iopub.status.busy": "2023-10-27T02:10:57.238253Z", - "iopub.status.idle": "2023-10-27T02:10:57.243775Z", - "shell.execute_reply": "2023-10-27T02:10:57.243164Z" + "iopub.execute_input": "2023-10-27T03:04:57.657905Z", + "iopub.status.busy": "2023-10-27T03:04:57.656590Z", + "iopub.status.idle": "2023-10-27T03:04:57.662682Z", + "shell.execute_reply": "2023-10-27T03:04:57.662136Z" } }, "outputs": [], @@ -93,10 +93,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:57.246706Z", - "iopub.status.busy": "2023-10-27T02:10:57.246424Z", - "iopub.status.idle": "2023-10-27T02:10:57.250646Z", - "shell.execute_reply": "2023-10-27T02:10:57.250044Z" + "iopub.execute_input": "2023-10-27T03:04:57.667736Z", + "iopub.status.busy": "2023-10-27T03:04:57.666400Z", + "iopub.status.idle": "2023-10-27T03:04:57.671189Z", + "shell.execute_reply": "2023-10-27T03:04:57.670658Z" } }, "outputs": [], diff --git a/.doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb b/.doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb index f9f1f6346..7699c0f29 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-27T02:10:58.972368Z", - "iopub.status.busy": "2023-10-27T02:10:58.971701Z", - "iopub.status.idle": "2023-10-27T02:10:59.327235Z", - "shell.execute_reply": "2023-10-27T02:10:59.326526Z" + "iopub.execute_input": "2023-10-27T03:04:59.630059Z", + "iopub.status.busy": "2023-10-27T03:04:59.629560Z", + "iopub.status.idle": "2023-10-27T03:05:00.024476Z", + "shell.execute_reply": "2023-10-27T03:05:00.023597Z" } }, "outputs": [], @@ -111,10 +111,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:59.331910Z", - "iopub.status.busy": "2023-10-27T02:10:59.331556Z", - "iopub.status.idle": "2023-10-27T02:10:59.363811Z", - "shell.execute_reply": "2023-10-27T02:10:59.363117Z" + "iopub.execute_input": "2023-10-27T03:05:00.028824Z", + "iopub.status.busy": "2023-10-27T03:05:00.028106Z", + "iopub.status.idle": "2023-10-27T03:05:00.061962Z", + "shell.execute_reply": "2023-10-27T03:05:00.061268Z" } }, "outputs": [], @@ -158,10 +158,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:59.367924Z", - "iopub.status.busy": "2023-10-27T02:10:59.367666Z", - "iopub.status.idle": "2023-10-27T02:10:59.380003Z", - "shell.execute_reply": "2023-10-27T02:10:59.379403Z" + "iopub.execute_input": "2023-10-27T03:05:00.067442Z", + "iopub.status.busy": "2023-10-27T03:05:00.066016Z", + "iopub.status.idle": "2023-10-27T03:05:00.079662Z", + "shell.execute_reply": "2023-10-27T03:05:00.079034Z" } }, "outputs": [], @@ -201,10 +201,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:59.383243Z", - "iopub.status.busy": "2023-10-27T02:10:59.382787Z", - "iopub.status.idle": "2023-10-27T02:10:59.387977Z", - "shell.execute_reply": "2023-10-27T02:10:59.387405Z" + "iopub.execute_input": "2023-10-27T03:05:00.084489Z", + "iopub.status.busy": "2023-10-27T03:05:00.083296Z", + "iopub.status.idle": "2023-10-27T03:05:00.090411Z", + "shell.execute_reply": "2023-10-27T03:05:00.089817Z" } }, "outputs": [], diff --git a/.doctrees/nbsphinx/tutorials/03-double-factorized.ipynb b/.doctrees/nbsphinx/tutorials/03-double-factorized.ipynb index 793d55de6..c061160c4 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-27T02:11:01.239526Z", - "iopub.status.busy": "2023-10-27T02:11:01.239298Z", - "iopub.status.idle": "2023-10-27T02:11:01.672486Z", - "shell.execute_reply": "2023-10-27T02:11:01.671867Z" + "iopub.execute_input": "2023-10-27T03:05:01.960181Z", + "iopub.status.busy": "2023-10-27T03:05:01.959717Z", + "iopub.status.idle": "2023-10-27T03:05:02.404039Z", + "shell.execute_reply": "2023-10-27T03:05:02.403342Z" } }, "outputs": [ @@ -92,10 +92,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.676217Z", - "iopub.status.busy": "2023-10-27T02:11:01.675393Z", - "iopub.status.idle": "2023-10-27T02:11:01.682498Z", - "shell.execute_reply": "2023-10-27T02:11:01.681935Z" + "iopub.execute_input": "2023-10-27T03:05:02.408011Z", + "iopub.status.busy": "2023-10-27T03:05:02.407295Z", + "iopub.status.idle": "2023-10-27T03:05:02.417935Z", + "shell.execute_reply": "2023-10-27T03:05:02.417313Z" } }, "outputs": [ @@ -226,10 +226,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.685379Z", - "iopub.status.busy": "2023-10-27T02:11:01.684954Z", - "iopub.status.idle": "2023-10-27T02:11:01.690254Z", - "shell.execute_reply": "2023-10-27T02:11:01.689707Z" + "iopub.execute_input": "2023-10-27T03:05:02.423483Z", + "iopub.status.busy": "2023-10-27T03:05:02.421763Z", + "iopub.status.idle": "2023-10-27T03:05:02.431334Z", + "shell.execute_reply": "2023-10-27T03:05:02.430699Z" } }, "outputs": [], @@ -284,10 +284,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.693242Z", - "iopub.status.busy": "2023-10-27T02:11:01.692815Z", - "iopub.status.idle": "2023-10-27T02:11:01.697021Z", - "shell.execute_reply": "2023-10-27T02:11:01.696463Z" + "iopub.execute_input": "2023-10-27T03:05:02.434936Z", + "iopub.status.busy": "2023-10-27T03:05:02.434685Z", + "iopub.status.idle": "2023-10-27T03:05:02.439093Z", + "shell.execute_reply": "2023-10-27T03:05:02.438396Z" } }, "outputs": [], @@ -324,10 +324,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.798461Z", - "iopub.status.busy": "2023-10-27T02:11:01.797539Z", - "iopub.status.idle": "2023-10-27T02:11:01.804011Z", - "shell.execute_reply": "2023-10-27T02:11:01.803354Z" + "iopub.execute_input": "2023-10-27T03:05:02.559009Z", + "iopub.status.busy": "2023-10-27T03:05:02.558102Z", + "iopub.status.idle": "2023-10-27T03:05:02.564371Z", + "shell.execute_reply": "2023-10-27T03:05:02.563761Z" } }, "outputs": [ @@ -363,10 +363,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.807404Z", - "iopub.status.busy": "2023-10-27T02:11:01.806733Z", - "iopub.status.idle": "2023-10-27T02:11:01.818517Z", - "shell.execute_reply": "2023-10-27T02:11:01.817866Z" + "iopub.execute_input": "2023-10-27T03:05:02.567736Z", + "iopub.status.busy": "2023-10-27T03:05:02.567083Z", + "iopub.status.idle": "2023-10-27T03:05:02.584110Z", + "shell.execute_reply": "2023-10-27T03:05:02.583071Z" } }, "outputs": [ @@ -405,10 +405,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.821521Z", - "iopub.status.busy": "2023-10-27T02:11:01.821296Z", - "iopub.status.idle": "2023-10-27T02:11:01.831674Z", - "shell.execute_reply": "2023-10-27T02:11:01.831110Z" + "iopub.execute_input": "2023-10-27T03:05:02.587264Z", + "iopub.status.busy": "2023-10-27T03:05:02.586808Z", + "iopub.status.idle": "2023-10-27T03:05:02.600814Z", + "shell.execute_reply": "2023-10-27T03:05:02.599564Z" } }, "outputs": [ @@ -446,10 +446,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.835578Z", - "iopub.status.busy": "2023-10-27T02:11:01.835146Z", - "iopub.status.idle": "2023-10-27T02:11:01.879635Z", - "shell.execute_reply": "2023-10-27T02:11:01.878876Z" + "iopub.execute_input": "2023-10-27T03:05:02.604427Z", + "iopub.status.busy": "2023-10-27T03:05:02.603969Z", + "iopub.status.idle": "2023-10-27T03:05:02.648867Z", + "shell.execute_reply": "2023-10-27T03:05:02.648260Z" } }, "outputs": [ @@ -457,14 +457,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999906233109686" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999906233109686\n" ] } ], @@ -496,10 +489,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.882831Z", - "iopub.status.busy": "2023-10-27T02:11:01.882543Z", - "iopub.status.idle": "2023-10-27T02:11:01.913639Z", - "shell.execute_reply": "2023-10-27T02:11:01.913025Z" + "iopub.execute_input": "2023-10-27T03:05:02.654063Z", + "iopub.status.busy": "2023-10-27T03:05:02.652939Z", + "iopub.status.idle": "2023-10-27T03:05:02.679846Z", + "shell.execute_reply": "2023-10-27T03:05:02.679254Z" } }, "outputs": [ @@ -538,10 +531,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.916639Z", - "iopub.status.busy": "2023-10-27T02:11:01.916394Z", - "iopub.status.idle": "2023-10-27T02:11:01.932237Z", - "shell.execute_reply": "2023-10-27T02:11:01.931529Z" + "iopub.execute_input": "2023-10-27T03:05:02.684588Z", + "iopub.status.busy": "2023-10-27T03:05:02.683495Z", + "iopub.status.idle": "2023-10-27T03:05:02.697257Z", + "shell.execute_reply": "2023-10-27T03:05:02.696649Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/tutorials/04-lucj.ipynb b/.doctrees/nbsphinx/tutorials/04-lucj.ipynb index c737c45d3..d037aca8d 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-27T02:11:03.958539Z", - "iopub.status.busy": "2023-10-27T02:11:03.958087Z", - "iopub.status.idle": "2023-10-27T02:11:04.561967Z", - "shell.execute_reply": "2023-10-27T02:11:04.561381Z" + "iopub.execute_input": "2023-10-27T03:05:05.159264Z", + "iopub.status.busy": "2023-10-27T03:05:05.159017Z", + "iopub.status.idle": "2023-10-27T03:05:05.871208Z", + "shell.execute_reply": "2023-10-27T03:05:05.870569Z" } }, "outputs": [ @@ -25,14 +25,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "converged SCF energy = -77.4456267643961\n" + "converged SCF energy = -77.4456267643962\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "CASCI E = -77.6290254326717 E(CI) = -3.57322412553863 S^2 = 0.0000000\n" + "CASCI E = -77.6290254326717 E(CI) = -3.57322412553862 S^2 = 0.0000000\n" ] } ], @@ -110,10 +110,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:04.565535Z", - "iopub.status.busy": "2023-10-27T02:11:04.565064Z", - "iopub.status.idle": "2023-10-27T02:11:05.231996Z", - "shell.execute_reply": "2023-10-27T02:11:05.231402Z" + "iopub.execute_input": "2023-10-27T03:05:05.876664Z", + "iopub.status.busy": "2023-10-27T03:05:05.875285Z", + "iopub.status.idle": "2023-10-27T03:05:06.651133Z", + "shell.execute_reply": "2023-10-27T03:05:06.650529Z" } }, "outputs": [ @@ -121,14 +121,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "E(CCSD) = -77.49387212754469 E_corr = -0.0482453631485175\n" + "E(CCSD) = -77.49387212754471 E_corr = -0.04824536314851448\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Energy at initialialization: -77.46975600021719\n" + "Energy at initialialization: -77.46975600021672\n" ] } ], @@ -173,10 +173,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:05.236610Z", - "iopub.status.busy": "2023-10-27T02:11:05.235535Z", - "iopub.status.idle": "2023-10-27T02:11:08.829264Z", - "shell.execute_reply": "2023-10-27T02:11:08.828593Z" + "iopub.execute_input": "2023-10-27T03:05:06.655856Z", + "iopub.status.busy": "2023-10-27T03:05:06.654768Z", + "iopub.status.idle": "2023-10-27T03:05:10.593929Z", + "shell.execute_reply": "2023-10-27T03:05:10.593304Z" } }, "outputs": [ @@ -188,12 +188,12 @@ " message: STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT\n", " success: False\n", " status: 1\n", - " fun: -77.51503435994836\n", - " x: [-1.518e-01 1.985e-01 ... 5.868e-01 6.172e-02]\n", + " fun: -77.51577544983374\n", + " x: [-1.451e-01 1.878e-01 ... -6.238e-01 -6.006e-02]\n", " nit: 9\n", - " jac: [-6.439e-03 -6.426e-03 ... -2.275e-03 -4.705e-03]\n", - " nfev: 1022\n", - " njev: 14\n", + " jac: [ 3.988e-03 -8.249e-03 ... -3.389e-03 -1.711e-03]\n", + " nfev: 1168\n", + " njev: 16\n", " hess_inv: <72x72 LbfgsInvHessProduct with dtype=float64>\n" ] } @@ -246,10 +246,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:08.832707Z", - "iopub.status.busy": "2023-10-27T02:11:08.832430Z", - "iopub.status.idle": "2023-10-27T02:11:12.354220Z", - "shell.execute_reply": "2023-10-27T02:11:12.352965Z" + "iopub.execute_input": "2023-10-27T03:05:10.598208Z", + "iopub.status.busy": "2023-10-27T03:05:10.597724Z", + "iopub.status.idle": "2023-10-27T03:05:14.139838Z", + "shell.execute_reply": "2023-10-27T03:05:14.139253Z" } }, "outputs": [ @@ -261,10 +261,10 @@ " message: STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT\n", " success: False\n", " status: 1\n", - " fun: -77.45984977965071\n", - " x: [-3.041e-01 7.966e-02 ... 6.591e-01 -1.166e-01]\n", - " nit: 15\n", - " jac: [ 3.774e-03 -8.242e-04 ... -8.043e-04 -2.260e-04]\n", + " fun: -77.45946564739053\n", + " x: [-3.765e-01 8.190e-02 ... -5.784e-01 1.644e-01]\n", + " nit: 16\n", + " jac: [-1.646e-03 9.805e-05 ... -1.137e-05 -1.251e-04]\n", " nfev: 1034\n", " njev: 22\n", " hess_inv: <46x46 LbfgsInvHessProduct with dtype=float64>\n" diff --git a/.doctrees/nbsphinx/tutorials/05-entanglement-forging.ipynb b/.doctrees/nbsphinx/tutorials/05-entanglement-forging.ipynb index c4e59b84d..03c556894 100644 --- a/.doctrees/nbsphinx/tutorials/05-entanglement-forging.ipynb +++ b/.doctrees/nbsphinx/tutorials/05-entanglement-forging.ipynb @@ -14,10 +14,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:14.326189Z", - "iopub.status.busy": "2023-10-27T02:11:14.325801Z", - "iopub.status.idle": "2023-10-27T02:11:14.865774Z", - "shell.execute_reply": "2023-10-27T02:11:14.865147Z" + "iopub.execute_input": "2023-10-27T03:05:16.248103Z", + "iopub.status.busy": "2023-10-27T03:05:16.246192Z", + "iopub.status.idle": "2023-10-27T03:05:16.873689Z", + "shell.execute_reply": "2023-10-27T03:05:16.872788Z" } }, "outputs": [ @@ -90,10 +90,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:14.870135Z", - "iopub.status.busy": "2023-10-27T02:11:14.869803Z", - "iopub.status.idle": "2023-10-27T02:11:14.917268Z", - "shell.execute_reply": "2023-10-27T02:11:14.916596Z" + "iopub.execute_input": "2023-10-27T03:05:16.877753Z", + "iopub.status.busy": "2023-10-27T03:05:16.877167Z", + "iopub.status.idle": "2023-10-27T03:05:16.929555Z", + "shell.execute_reply": "2023-10-27T03:05:16.928339Z" } }, "outputs": [ @@ -101,7 +101,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Energy at initialialization: -75.6836617444762\n" + "Energy at initialialization: -75.68366174447618\n" ] } ], @@ -135,10 +135,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:14.920663Z", - "iopub.status.busy": "2023-10-27T02:11:14.920403Z", - "iopub.status.idle": "2023-10-27T02:11:17.010029Z", - "shell.execute_reply": "2023-10-27T02:11:17.009260Z" + "iopub.execute_input": "2023-10-27T03:05:16.935598Z", + "iopub.status.busy": "2023-10-27T03:05:16.935182Z", + "iopub.status.idle": "2023-10-27T03:05:19.090629Z", + "shell.execute_reply": "2023-10-27T03:05:19.089696Z" } }, "outputs": [ @@ -150,8 +150,8 @@ " message: Maximum number of function evaluations has been exceeded.\n", " success: False\n", " status: 2\n", - " fun: -75.69430210102367\n", - " x: [ 1.344e+00 8.447e-02 -1.883e-03 1.105e+00 -1.881e-01]\n", + " fun: -75.69448131020114\n", + " x: [ 1.354e+00 9.651e-02 -1.863e-03 1.095e+00 -2.132e-01]\n", " nfev: 100\n", " maxcv: 0.0\n" ] diff --git a/.doctrees/nbsphinx/tutorials/06-fermion-operator.ipynb b/.doctrees/nbsphinx/tutorials/06-fermion-operator.ipynb index 2c48e7a63..737161603 100644 --- a/.doctrees/nbsphinx/tutorials/06-fermion-operator.ipynb +++ b/.doctrees/nbsphinx/tutorials/06-fermion-operator.ipynb @@ -29,10 +29,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.540238Z", - "iopub.status.busy": "2023-10-27T02:11:18.539954Z", - "iopub.status.idle": "2023-10-27T02:11:18.900380Z", - "shell.execute_reply": "2023-10-27T02:11:18.899767Z" + "iopub.execute_input": "2023-10-27T03:05:20.826794Z", + "iopub.status.busy": "2023-10-27T03:05:20.826354Z", + "iopub.status.idle": "2023-10-27T03:05:21.191528Z", + "shell.execute_reply": "2023-10-27T03:05:21.190910Z" } }, "outputs": [ @@ -41,8 +41,8 @@ "text/plain": [ "FermionOperator({\n", " (cre_a(3), des_a(0)): -0.25,\n", - " (cre_b(1), des_b(5), cre_a(4)): 1+1j,\n", - " (cre_a(0), des_a(3)): 0.5\n", + " (cre_a(0), des_a(3)): 0.5,\n", + " (cre_b(1), des_b(5), cre_a(4)): 1+1j\n", "})" ] }, @@ -76,17 +76,17 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.903799Z", - "iopub.status.busy": "2023-10-27T02:11:18.903266Z", - "iopub.status.idle": "2023-10-27T02:11:18.907652Z", - "shell.execute_reply": "2023-10-27T02:11:18.907107Z" + "iopub.execute_input": "2023-10-27T03:05:21.196565Z", + "iopub.status.busy": "2023-10-27T03:05:21.195229Z", + "iopub.status.idle": "2023-10-27T03:05:21.202666Z", + "shell.execute_reply": "2023-10-27T03:05:21.202084Z" } }, "outputs": [ { "data": { "text/plain": [ - "'FermionOperator({((True, False, 3), (False, False, 0)): -0.25+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 0), (False, False, 3)): 0.5+0j})'" + "'FermionOperator({((True, False, 3), (False, False, 0)): -0.25+0j, ((True, False, 0), (False, False, 3)): 0.5+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j})'" ] }, "execution_count": 2, @@ -110,10 +110,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.911628Z", - "iopub.status.busy": "2023-10-27T02:11:18.910545Z", - "iopub.status.idle": "2023-10-27T02:11:18.918136Z", - "shell.execute_reply": "2023-10-27T02:11:18.917602Z" + "iopub.execute_input": "2023-10-27T03:05:21.208130Z", + "iopub.status.busy": "2023-10-27T03:05:21.206968Z", + "iopub.status.idle": "2023-10-27T03:05:21.215617Z", + "shell.execute_reply": "2023-10-27T03:05:21.214933Z" } }, "outputs": [ @@ -122,16 +122,16 @@ "text/plain": [ "FermionOperator({\n", " (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,\n", - " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,\n", - " (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)): 2+2j,\n", + " (cre_b(2)): 0-0.25j,\n", " (cre_a(3), des_a(0)): -0.5,\n", - " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\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_b(2)): 0-0.25j,\n", - " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625\n", + " (cre_a(0), des_a(3)): 1,\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_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,\n", + " (cre_b(1), des_b(5), cre_a(4)): 2+2j,\n", + " (cre_a(0), des_a(3), cre_b(2)): 0+0.5j\n", "})" ] }, @@ -169,10 +169,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.922486Z", - "iopub.status.busy": "2023-10-27T02:11:18.921450Z", - "iopub.status.idle": "2023-10-27T02:11:18.928054Z", - "shell.execute_reply": "2023-10-27T02:11:18.927512Z" + "iopub.execute_input": "2023-10-27T03:05:21.223002Z", + "iopub.status.busy": "2023-10-27T03:05:21.219475Z", + "iopub.status.idle": "2023-10-27T03:05:21.229733Z", + "shell.execute_reply": "2023-10-27T03:05:21.229048Z" } }, "outputs": [ @@ -181,16 +181,16 @@ "text/plain": [ "FermionOperator({\n", " (cre_a(3), des_a(0), cre_b(2)): -1,\n", - " (cre_a(0), des_a(3), cre_b(2)): 2,\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)): 12-12j,\n", + " (cre_b(2)): -5,\n", " (cre_a(3), des_a(0)): 0+3j,\n", - " (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\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_b(2)): -5,\n", - " (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j\n", + " (cre_a(0), des_a(3)): 0-6j,\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_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j,\n", + " (cre_b(1), des_b(5), cre_a(4)): 12-12j,\n", + " (cre_a(0), des_a(3), cre_b(2)): 2\n", "})" ] }, @@ -219,10 +219,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.932269Z", - "iopub.status.busy": "2023-10-27T02:11:18.931233Z", - "iopub.status.idle": "2023-10-27T02:11:18.937561Z", - "shell.execute_reply": "2023-10-27T02:11:18.937026Z" + "iopub.execute_input": "2023-10-27T03:05:21.234131Z", + "iopub.status.busy": "2023-10-27T03:05:21.233065Z", + "iopub.status.idle": "2023-10-27T03:05:21.240141Z", + "shell.execute_reply": "2023-10-27T03:05:21.239585Z" } }, "outputs": [ @@ -230,16 +230,16 @@ "data": { "text/plain": [ "FermionOperator({\n", - " (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,\n", - " (cre_b(2)): -5,\n", - " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", - " (cre_a(3), des_a(0)): 0+3j,\n", - " (cre_b(2), cre_a(0), des_a(3)): 2,\n", " (des_b(3), des_a(3)): 0+1.25j,\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_a(0), des_a(3)): 0-6j,\n", " (cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,\n", - " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j\n", + " (cre_b(2), cre_a(0), des_a(3)): 2,\n", + " (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,\n", + " (cre_b(2)): -5,\n", + " (cre_b(1), cre_a(4), des_b(5)): -12+12j,\n", + " (cre_a(3), des_a(0)): 0+3j\n", "})" ] }, @@ -264,10 +264,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.941838Z", - "iopub.status.busy": "2023-10-27T02:11:18.940807Z", - "iopub.status.idle": "2023-10-27T02:11:18.946856Z", - "shell.execute_reply": "2023-10-27T02:11:18.946288Z" + "iopub.execute_input": "2023-10-27T03:05:21.244450Z", + "iopub.status.busy": "2023-10-27T03:05:21.243285Z", + "iopub.status.idle": "2023-10-27T03:05:21.250663Z", + "shell.execute_reply": "2023-10-27T03:05:21.250096Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.949976Z", - "iopub.status.busy": "2023-10-27T02:11:18.949567Z", - "iopub.status.idle": "2023-10-27T02:11:18.956974Z", - "shell.execute_reply": "2023-10-27T02:11:18.956421Z" + "iopub.execute_input": "2023-10-27T03:05:21.254249Z", + "iopub.status.busy": "2023-10-27T03:05:21.253812Z", + "iopub.status.idle": "2023-10-27T03:05:21.262971Z", + "shell.execute_reply": "2023-10-27T03:05:21.262375Z" } }, "outputs": [ @@ -340,21 +340,21 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:18.960261Z", - "iopub.status.busy": "2023-10-27T02:11:18.959821Z", - "iopub.status.idle": "2023-10-27T02:11:18.968651Z", - "shell.execute_reply": "2023-10-27T02:11:18.968109Z" + "iopub.execute_input": "2023-10-27T03:05:21.267860Z", + "iopub.status.busy": "2023-10-27T03:05:21.266431Z", + "iopub.status.idle": "2023-10-27T03:05:21.275640Z", + "shell.execute_reply": "2023-10-27T03:05:21.275026Z" } }, "outputs": [ { "data": { "text/plain": [ - "array([0. +0.j , 0. +0.j ,\n", - " 0. +0.j , 0. +0.j ,\n", - " 0.09345703-0.26351017j, 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.04860684-0.04058205j, 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-27T02:11:18.972854Z", - "iopub.status.busy": "2023-10-27T02:11:18.971772Z", - "iopub.status.idle": "2023-10-27T02:11:18.987593Z", - "shell.execute_reply": "2023-10-27T02:11:18.987042Z" + "iopub.execute_input": "2023-10-27T03:05:21.280309Z", + "iopub.status.busy": "2023-10-27T03:05:21.279234Z", + "iopub.status.idle": "2023-10-27T03:05:21.295396Z", + "shell.execute_reply": "2023-10-27T03:05:21.294821Z" } }, "outputs": [ diff --git a/.doctrees/tutorials/04-lucj.doctree b/.doctrees/tutorials/04-lucj.doctree index 619b6c6c2..6abf317b5 100644 Binary files a/.doctrees/tutorials/04-lucj.doctree and b/.doctrees/tutorials/04-lucj.doctree differ diff --git a/.doctrees/tutorials/05-entanglement-forging.doctree b/.doctrees/tutorials/05-entanglement-forging.doctree index 756bf6681..b41ea3e4e 100644 Binary files a/.doctrees/tutorials/05-entanglement-forging.doctree and b/.doctrees/tutorials/05-entanglement-forging.doctree differ diff --git a/.doctrees/tutorials/06-fermion-operator.doctree b/.doctrees/tutorials/06-fermion-operator.doctree index 1749ab9ce..c946b96db 100644 Binary files a/.doctrees/tutorials/06-fermion-operator.doctree and b/.doctrees/tutorials/06-fermion-operator.doctree differ diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index b119719d2..a18814fc3 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -2,7 +2,7 @@ Welcome to ffsim's documentation! ================================= -ffsim is a software library for simulating fermionic quantum circuits that preserve particle number +ffsim is a software library for simulating fermionic quantum circuits that conserve particle number and the Z component of spin. This category includes many quantum circuits used for quantum chemistry simulations. By exploiting the symmetries and using specialized algorithms, ffsim can simulate these circuits much faster than a generic quantum circuit simulator. diff --git a/api/ffsim.html b/api/ffsim.html index 63742b4d8..7d02694e1 100644 --- a/api/ffsim.html +++ b/api/ffsim.html @@ -318,9 +318,9 @@
FermionOperator({
- (cre_a(0), des_a(3)): 0.5,
+ (cre_b(1), des_b(5), cre_a(4)): 1+1j,
(cre_a(3), des_a(0)): -0.25,
- (cre_b(1), des_b(5), cre_a(4)): 1+1j
+ (cre_a(0), des_a(3)): 0.5
})
FermionOperator({
- (cre_b(1), des_b(5), cre_a(4)): 2+2j,
(cre_a(3), des_a(0)): -0.5,
+ (cre_b(1), des_b(5), cre_a(4)): 2+2j,
(cre_a(0), des_a(3)): 1
})
FermionOperator({
(cre_b(2)): 0+1j,
- (des_a(3), des_b(3)): -0.25,
- (cre_a(0), des_a(3)): 0.5,
(cre_a(3), des_a(0)): -0.25,
- (cre_b(1), des_b(5), cre_a(4)): 1+1j
+ (cre_b(1), des_b(5), cre_a(4)): 1+1j,
+ (cre_a(0), des_a(3)): 0.5,
+ (des_a(3), des_b(3)): -0.25
})
FermionOperator({
- (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,
- (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,
(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), des_a(3), des_b(3)): 0.0625,
+ (cre_a(3), des_a(0), cre_b(2)): 0-0.25j,
(cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j,
- (cre_a(3), des_a(0), cre_b(2)): 0-0.25j
+ (cre_a(0), des_a(3), cre_b(2)): 0+0.5j,
+ (cre_a(0), des_a(3), des_a(3), des_b(3)): -0.125,
+ (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625
})
ffsim is a software library for simulating fermionic quantum circuits that preserve particle number +
ffsim is a software library for simulating fermionic quantum circuits that conserve particle number and the Z component of spin. This category includes many quantum circuits used for quantum chemistry simulations. By exploiting the symmetries and using specialized algorithms, ffsim can simulate these circuits much faster than a generic quantum circuit simulator.
diff --git a/searchindex.js b/searchindex.js index 5883e6416..385943532 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api/ffsim", "api/ffsim.contract", "api/ffsim.linalg", "api/ffsim.random", "api/ffsim.testing", "index", "tutorials/01-introduction", "tutorials/02-orbital-rotation", "tutorials/03-double-factorized", "tutorials/04-lucj", "tutorials/05-entanglement-forging", "tutorials/06-fermion-operator"], "filenames": ["api/ffsim.rst", "api/ffsim.contract.rst", "api/ffsim.linalg.rst", "api/ffsim.random.rst", "api/ffsim.testing.rst", "index.rst", "tutorials/01-introduction.ipynb", "tutorials/02-orbital-rotation.ipynb", "tutorials/03-double-factorized.ipynb", "tutorials/04-lucj.ipynb", "tutorials/05-entanglement-forging.ipynb", "tutorials/06-fermion-operator.ipynb"], "titles": ["ffsim", "ffsim.contract", "ffsim.linalg", "ffsim.random", "ffsim.testing", "Welcome to ffsim\u2019s documentation!", "Introduction to ffsim", "Orbital rotations and quadratic Hamiltonians", "Diagonal Coulomb operators and double-factorized Trotter simulation", "The local unitary cluster Jastrow (LUCJ) ansatz", "Entanglement forging", "The FermionOperator class"], "terms": {"i": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11], "softwar": [0, 5, 6], "librari": [0, 5, 6], "fast": 0, "simul": [0, 5, 6, 7, 9, 10], "fermion": [0, 5, 6, 7, 9, 11], "quantum": [0, 5, 6, 8, 9], "circuit": [0, 5, 6], "class": [0, 3, 5, 6, 9], "doublefactorizedhamiltonian": [0, 5, 8], "one_body_tensor": [0, 7, 8], "diag_coulomb_mat": [0, 8], "orbital_rot": [0, 1, 6, 7, 8], "constant": [0, 8, 9], "0": [0, 7, 8, 9, 10, 11], "z_represent": [0, 1], "fals": [0, 1, 2, 9, 10, 11], "sourc": [0, 1, 2, 3, 4], "base": [0, 2, 9, 10], "object": [0, 2, 9, 11], "A": [0, 1, 2, 3, 4, 7, 8, 9, 11], "hamiltonian": [0, 5, 9, 10], "doubl": [0, 2, 5, 9], "factor": [0, 2, 5, 9], "form": [0, 1, 2, 7, 8, 9, 11], "low": [0, 2, 6], "rank": [0, 2, 3], "decomposit": [0, 2], "The": [0, 1, 2, 3, 4, 5, 6, 7, 8], "molecular": [0, 9, 10], "h": [0, 8, 9, 10], "sum_": [0, 1, 2, 7, 8, 9], "pq": [0, 2, 8], "sigma": [0, 1, 7, 8, 9], "kappa_": 0, "dagger_": [0, 7, 8], "p": [0, 2, 8, 9], "a_": [0, 7, 8, 11], "q": [0, 8], "frac12": [0, 8, 9], "sum_t": 0, "ij": [0, 1, 2, 7, 8, 9], "tau": [0, 1, 8, 9], "z": [0, 1, 2, 5, 6, 11], "t": [0, 2, 7, 8], "_": [0, 2, 7, 8, 9], "n": [0, 2, 6, 7, 8, 9], "j": [0, 1, 7, 8, 9, 11], "text": [0, 8], "where": [0, 1, 2, 7, 8, 9], "u": [0, 1, 2], "pi": [0, 10], "qi": 0, "here": [0, 2, 6, 7, 8, 9], "each": [0, 2, 6, 8, 9, 11], "unitari": [0, 1, 2, 3, 5, 7, 8], "matrix": [0, 1, 2, 3, 6, 7, 8, 9, 11], "real": [0, 1, 2, 3, 7, 8, 9, 10], "symmetr": [0, 1, 2, 3, 8, 9], "represent": [0, 1, 2, 6, 11], "an": [0, 1, 2, 3, 6, 7, 8, 9, 11], "altern": [0, 8], "sometim": 0, "yield": [0, 2, 8, 9], "simpler": 0, "under": 0, "jordan": 0, "wigner": 0, "transform": [0, 1, 6, 7], "number": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "oper": [0, 1, 2, 5, 7, 9, 10, 11], "take": [0, 6, 9], "frac": 0, "1": [0, 2, 3, 6, 7, 8, 9, 10, 11], "2": [0, 1, 2, 3, 6, 7, 8, 9, 10, 11], "pauli": 0, "rotat": [0, 1, 2, 5, 6, 8, 9], "basi": [0, 7, 8, 9, 10], "obtain": [0, 7, 8, 9], "rewrit": 0, "two": [0, 2, 3, 8, 9, 10], "bodi": [0, 1, 2, 3, 8, 9, 10], "part": [0, 2], "term": [0, 1, 2, 8, 9, 11], "updat": [0, 8], "one": [0, 1, 2, 6, 8, 9, 10], "appropri": 0, "kappa": 0, "frac18": 0, "asterisk": 0, "denot": [0, 1, 7], "summat": 0, "over": 0, "indic": [0, 2, 9, 11], "neq": [0, 1], "tensor": [0, 1, 2, 3, 8, 9, 10], "type": [0, 1, 2, 3, 4], "np": [0, 3, 4, 7, 8, 9, 10], "ndarrai": [0, 1, 2, 3, 8], "diagon": [0, 1, 2, 5, 7, 9], "coulomb": [0, 1, 2, 5, 9], "matric": [0, 1, 2, 7, 8, 9], "orbit": [0, 1, 2, 3, 4, 5, 6, 8, 9, 11], "float": [0, 2, 3, 8], "whether": [0, 1, 2, 11], "rather": [0, 6], "than": [0, 5, 6, 9], "bool": [0, 1, 2], "static": 0, "from_molecular_hamiltonian": [0, 8], "tol": [0, 2], "1e": [0, 2], "08": [0, 2], "max_vec": [0, 2], "none": [0, 1, 2, 3, 4], "optim": [0, 2, 9, 10], "method": [0, 2, 9, 10], "l": [0, 2, 8, 9], "bfg": [0, 2, 9], "b": [0, 2, 7, 9], "option": [0, 1, 2, 3, 9, 10], "diag_coulomb_mask": [0, 2], "choleski": [0, 2], "true": [0, 2, 6, 11], "act": [0, 11], "h_": [0, 2, 8], "pqr": [0, 2, 8], "r": [0, 2, 8], "": [0, 2, 6, 8, 9, 10, 11], "decompos": [0, 2, 8], "ar": [0, 1, 2, 3, 6, 7, 8, 9, 11], "output": [0, 8, 9], "guarante": 0, "so": [0, 2, 7, 8, 9, 11], "depend": [0, 2, 6], "allow": [0, 2, 9], "error": [0, 2], "threshold": [0, 2], "larger": [0, 2, 11], "lead": 0, "smaller": [0, 2, 8, 11], "furthermor": [0, 2], "max_rank": 0, "paramet": [0, 1, 2, 3, 4, 9, 10], "specifi": [0, 2, 9], "upper": [0, 2, 9], "bound": [0, 2], "default": [0, 2, 3], "behavior": [0, 2, 3], "thi": [0, 2, 5, 6, 7, 8, 9, 10], "routin": [0, 2, 6, 11], "perform": [0, 2, 7, 8], "straightforward": [0, 2], "exact": [0, 2, 6, 8], "nest": [0, 2], "eigenvalu": [0, 2, 7], "addition": [0, 2], "can": [0, 2, 5, 6, 7, 8, 9, 11], "choos": [0, 2, 6, 9], "coeffici": [0, 1, 2, 7, 9, 11], "store": [0, 2, 8, 9], "achiev": [0, 2, 8], "compress": [0, 2], "enabl": [0, 2], "set": [0, 2, 6, 7, 8, 9], "attempt": [0, 2], "minim": [0, 2, 9, 10], "least": [0, 2], "squar": [0, 2, 9], "function": [0, 1, 2, 6, 7, 8, 9, 10, 11], "quantifi": [0, 2], "It": [0, 2, 6, 8, 11], "us": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11], "scipi": [0, 2, 6, 7, 8, 9, 10, 11], "pass": [0, 2, 7, 11], "both": [0, 2], "its": [0, 2, 7, 8, 11], "gradient": [0, 2], "return": [0, 1, 2, 3, 4, 8, 9, 10, 11], "constrain": [0, 2], "have": [0, 2, 6, 7, 9, 11], "onli": [0, 2, 6, 7, 9], "certain": [0, 2], "element": [0, 2], "nonzero": [0, 2, 9], "which": [0, 2, 3, 6, 7, 8, 9, 11], "time": [0, 2, 6, 8], "boolean": [0, 2], "valu": [0, 1, 2, 3, 8, 9], "triangular": [0, 2], "becaus": [0, 2, 6, 8, 9, 11], "note": [0, 9, 11], "current": 0, "support": [0, 11], "two_body_tensor": [0, 2, 8], "toler": [0, 2, 9], "defin": [0, 2, 9, 10], "maximum": [0, 2, 3, 10], "absolut": [0, 2], "differ": [0, 1, 2, 9], "between": [0, 1, 2, 9], "origin": [0, 2, 8], "correspond": [0, 2, 7, 8], "reconstruct": [0, 2], "int": [0, 1, 2, 3, 4, 8, 10], "limit": [0, 2, 9], "keep": [0, 2], "argument": [0, 2, 7], "overrid": [0, 2], "str": [0, 2], "see": [0, 2], "document": [0, 2], "possibl": [0, 2], "callback": [0, 2], "usag": [0, 2, 11], "dict": [0, 2, 9, 10], "mask": [0, 2], "modifi": [0, 2], "If": [0, 1, 2, 3, 11], "full": [0, 2, 6], "instead": [0, 2], "much": [0, 2, 5, 6], "more": [0, 2, 6, 9], "expens": [0, 2], "ignor": [0, 2, 8], "refer": [0, 2, 3, 9], "arxiv": [0, 2, 3], "1808": [0, 2], "02625": [0, 2], "2104": [0, 2], "08957": [0, 2], "properti": [0, 7], "norb": [0, 1, 3, 4, 6, 7, 8, 9, 10, 11], "spatial": [0, 1, 4, 6, 8, 9, 11], "to_number_represent": 0, "to_z_represent": 0, "fermionact": [0, 5], "action": [0, 1, 7, 11], "spin": [0, 1, 5, 6, 7, 9, 10, 11], "orb": [0, 11], "namedtupl": 0, "alia": 0, "field": 0, "fermionoper": [0, 5], "coeff": [0, 1], "repres": [0, 6, 9, 11], "linear": [0, 1, 2, 7, 11], "combin": [0, 1, 7, 11], "product": [0, 8, 11], "creation": [0, 7, 11], "annihil": [0, 11], "explan": 0, "how": [0, 6, 7, 8, 9, 10, 11], "exampl": [0, 6, 7, 9, 11], "import": [0, 6, 7, 8, 9, 10, 11], "op1": [0, 11], "cre_a": [0, 5, 11], "des_a": [0, 5, 11], "3": [0, 6, 7, 8, 9, 10, 11], "5": [0, 8, 9, 10, 11], "25": [0, 11], "cre_b": [0, 5, 11], "des_b": [0, 5, 11], "4": [0, 7, 8, 9, 10, 11], "1j": [0, 7, 8, 11], "2j": [0, 11], "op2": [0, 11], "125": [0, 11], "5j": [0, 11], "25j": [0, 11], "0625": [0, 11], "tupl": [0, 1, 2, 4, 8, 11], "complex": [0, 1, 2, 3], "conserves_particle_numb": [0, 11], "conserv": [0, 6, 11], "particl": [0, 4, 5, 6, 7, 11], "otherwis": 0, "conserves_spin_z": [0, 11], "compon": [0, 5, 6, 11], "many_body_ord": 0, "mani": [0, 5], "order": [0, 6, 8, 9, 11], "length": [0, 6, 8, 9], "longest": 0, "contain": [0, 2, 9, 11], "normal_ord": [0, 11], "normal": [0, 11], "equival": 0, "ha": [0, 1, 2, 6, 7, 8, 9, 10], "been": [0, 10], "reorder": 0, "canon": 0, "In": [0, 7, 8, 9, 10, 11], "compris": [0, 11], "appear": [0, 11], "from": [0, 3, 6, 7, 9, 10, 11], "left": [0, 7, 11], "right": [0, 7, 11], "descend": [0, 11], "lexicograph": [0, 11], "That": [0, 7, 11], "all": [0, 9, 11], "befor": [0, 9, 11], "within": [0, 2, 11], "beta": [0, 1, 4, 6, 9, 11], "alpha": [0, 1, 4, 6, 9, 11], "hopgateansatzoper": [0, 5, 10], "interaction_pair": [0, 10], "theta": [0, 10], "hop": 0, "gate": [0, 9], "ansatz": [0, 5, 10], "moleculardata": [0, 5, 8, 9, 10], "nelec": [0, 1, 4, 6, 7, 8, 9, 10, 11], "core_energi": 0, "dipole_integr": 0, "orbital_symmetri": 0, "data": [0, 3, 8, 9, 10, 11], "electron": [0, 1, 3, 4, 6, 8], "core": [0, 2], "energi": [0, 7, 8, 9, 10], "dipol": 0, "integr": 0, "symmetri": [0, 5, 6, 7, 8, 9, 10], "from_hartree_fock": [0, 8, 9, 10], "hartree_fock": [0, 8, 9, 10], "active_spac": [0, 9, 10], "initi": [0, 3, 4, 8, 9, 10], "hartre": [0, 8, 9], "fock": [0, 8, 9], "calcul": [0, 6, 8, 9], "scf": [0, 8, 9, 10], "iter": 0, "list": [0, 1, 2, 4, 9, 10], "activ": [0, 9, 10], "space": [0, 9, 10], "molecularhamiltonian": [0, 5, 8], "call": [0, 6, 7, 8, 11], "supportsapplyunitari": [0, 5], "arg": 0, "kwarg": 0, "protocol": 0, "appli": [0, 1, 2, 6, 7, 8, 9], "vector": [0, 1, 2, 3, 6, 7, 9, 10, 11], "supportsapproximateequ": [0, 5], "compar": [0, 8], "approxim": [0, 2, 8], "supportslinearoper": [0, 5], "convert": [0, 1, 6, 7, 8, 11], "linearoper": [0, 1, 7, 8, 11], "supportstrac": [0, 5], "whose": [0, 2, 6], "trace": [0, 5, 8], "comput": [0, 2, 7, 9, 10], "ucjoper": [0, 5, 9], "diag_coulomb_mats_alpha_alpha": 0, "diag_coulomb_mats_alpha_beta": 0, "final_orbital_rot": 0, "cluster": [0, 5], "jastrow": [0, 5], "ucj": 0, "prod_": [0, 9], "k": [0, 2, 7, 8, 9, 11], "mathcal": [0, 1, 7, 8, 9], "w_k": [0, 9], "e": [0, 8, 9, 10, 11], "_k": [0, 8, 9], "dagger": [0, 1, 2, 7, 8, 9, 11], "mathbf": [0, 7, 8, 9], "n_": [0, 1, 6, 7, 8, 9], "commut": [0, 8, 9], "total": [0, 8, 9], "we": [0, 7, 8, 9, 10, 11], "enforc": [0, 9], "As": [0, 6, 7, 8, 9], "result": [0, 1, 2, 3, 7, 8, 9, 10], "describ": [0, 1, 6, 7, 8, 9, 11], "involv": [0, 9], "same": [0, 6, 9], "To": [0, 6, 7, 8, 9], "variat": [0, 9], "final": [0, 8, 9], "includ": [0, 2, 5, 6, 7, 8], "end": [0, 7, 9], "from_paramet": [0, 9], "param": 0, "n_rep": [0, 9, 10], "alpha_alpha_indic": [0, 9], "alpha_beta_indic": [0, 9], "with_final_orbital_rot": 0, "from_t_amplitud": [0, 9], "t2_amplitud": [0, 2], "t1_amplitud": 0, "t2": [0, 2, 3, 9], "t1": [0, 9], "amplitud": [0, 2, 3, 9], "repetit": [0, 9], "to_paramet": [0, 9], "to_t_amplitud": 0, "nocc": [0, 3], "possibli": 0, "apply_diag_coulomb_evolut": [0, 5, 8], "vec": [0, 1, 2, 6, 7, 8, 11], "mat": [0, 1, 2], "mat_alpha_beta": [0, 1], "occupations_a": [0, 1], "occupations_b": [0, 1], "strings_a": [0, 1], "strings_b": [0, 1], "orbital_rotation_index_a": 0, "orbital_rotation_index_b": 0, "copi": [0, 11], "evolut": [0, 8], "exp": [0, 7], "z_": [0, 1], "also": [0, 1, 7, 11], "given": [0, 1, 2, 7, 8], "place": [0, 1, 9, 11], "sum": [0, 1, 8, 10], "state": [0, 1, 3, 7, 8, 9, 10], "interact": [0, 1, 6], "occupi": [0, 1, 3, 4, 8], "string": [0, 1, 6, 11], "index": [0, 6, 9, 11], "alwai": [0, 2, 7], "newli": 0, "alloc": 0, "untouch": 0, "mai": [0, 2, 9], "still": [0, 9], "overwritten": 0, "evolv": [0, 8], "apply_fsim_g": [0, 5], "phi": 0, "target_orb": 0, "fsim": 0, "consist": 0, "tunnel": 0, "follow": [0, 6, 7, 8, 9, 11], "neg": 0, "sign": 0, "convent": 0, "angl": [0, 10], "nn": 0, "dagger_i": 0, "a_i": 0, "dagger_j": 0, "a_j": [0, 1], "when": [0, 8, 9, 11], "neighbor": 0, "qubit": [0, 9], "begin": [0, 7, 9], "pmatrix": 0, "co": [0, 10], "sin": [0, 10], "apply_givens_rot": [0, 5], "g": [0, 9], "apply_hop_g": [0, 5], "apply_num_interact": [0, 5], "apply_num_num_interact": [0, 5], "apply_num_op_prod_interact": [0, 5], "prod": 0, "sequenc": 0, "pair": [0, 4], "integ": 0, "give": [0, 7], "first": [0, 2, 7, 8, 9, 10], "second": [0, 2, 8, 10], "apply_num_op_sum_evolut": [0, 5, 7, 8], "lambda_i": [0, 1, 7], "rais": 0, "valueerror": 0, "must": [0, 2, 11], "dimension": [0, 2, 6], "apply_orbital_rot": [0, 5, 6, 7], "allow_row_permut": 0, "allow_col_permut": 0, "map": [0, 7, 11], "mapsto": [0, 7], "u_": 0, "ji": [0, 7], "log": 0, "permut": [0, 2], "row": [0, 6], "column": [0, 2, 6, 7], "wa": 0, "well": 0, "actual": [0, 7, 9], "effect": [0, 9], "apply_tunneling_interact": [0, 5], "apply_unitari": [0, 5, 9], "obj": 0, "ani": [0, 7, 9], "approx_eq": [0, 5], "other": [0, 9], "rtol": [0, 2], "05": [0, 2], "atol": [0, 2], "equal": 0, "isclos": 0, "interpret": 0, "rel": [0, 2], "numer": [0, 2, 11], "up": [0, 7], "cre": [0, 5], "creat": [0, 6, 7, 8, 9, 11], "de": [0, 5], "destroi": [0, 11], "dim": [0, 3, 5, 6, 11], "get": [0, 7, 8, 9, 10], "dimens": [0, 3, 6], "fci": [0, 6, 9, 10], "dim_a": [0, 6], "dim_b": [0, 6], "expectation_one_body_pow": [0, 5], "one_rdm": 0, "power": 0, "expect": [0, 7], "w": [0, 7, 8], "slater": [0, 6, 7, 8], "determin": [0, 2, 6, 7, 8], "o": [0, 10], "m_": [0, 1, 2], "a_p": 0, "a_q": 0, "m": [0, 1, 2, 7], "let": [0, 8, 11], "lvert": [0, 9], "psi": [0, 9], "rangl": [0, 9], "Then": 0, "quantiti": 0, "langl": 0, "rvert": 0, "reduc": [0, 2], "densiti": 0, "expectation_one_body_product": [0, 5], "o_1": 0, "o_2": 0, "dot": 0, "o_k": 0, "hartree_fock_st": [0, 5, 8, 9], "statevector": [0, 6, 7], "indices_to_str": [0, 5], "bitstr": 0, "rang": [0, 6, 7, 8, 9], "011001": 0, "011010": 0, "011100": 0, "101001": 0, "101010": 0, "101100": 0, "110001": 0, "110010": 0, "110100": 0, "linear_oper": [0, 5, 8, 9, 10, 11], "multireference_st": [0, 5, 10], "ansatz_oper": 0, "reference_occup": [0, 10], "root": 0, "multirefer": 0, "occup": [0, 6, 7, 8], "desir": 0, "eigenvector": [0, 7], "lowest": [0, 7, 8], "one_hot": [0, 5], "shape": [0, 2, 3, 6, 9], "dtype": [0, 3, 9], "arrai": [0, 2, 6, 11], "zero": [0, 10], "except": 0, "hot": 0, "simulate_qdrift_double_factor": [0, 5], "n_step": [0, 8], "probabl": 0, "norm": 0, "n_sampl": 0, "seed": [0, 3, 4, 6, 7], "via": [0, 8], "qdrift": 0, "trotter": [0, 5], "step": [0, 7, 8], "sampl": [0, 3, 4], "els": [0, 3], "explicit": 0, "proport": [0, 7], "spectral": 0, "uniform": [0, 3], "requir": [0, 9], "whenev": 0, "complet": 0, "character": 0, "trajectori": 0, "pseudorandom": [0, 3, 4], "gener": [0, 3, 4, 5, 6, 7, 8, 9], "should": [0, 3, 4, 7, 8], "valid": [0, 3, 4], "input": [0, 1, 3, 4, 9], "random": [0, 4, 5, 6, 7, 11], "default_rng": [0, 3, 4], "numpi": [0, 2, 6, 7, 8, 9, 10], "just": [0, 8, 9], "simulate_trotter_double_factor": [0, 5, 8], "suzuki": 0, "formula": 0, "slater_determin": [0, 5, 6, 7], "occupied_orbit": [0, 6, 7], "configur": [0, 6], "word": [0, 9], "slater_determinant_one_rdm": [0, 5], "similarli": [0, 8], "construct": [1, 8, 9, 10, 11], "contract_diag_coulomb": [1, 5], "contract_num_op_sum": [1, 5], "diag_coulomb_linop": [1, 5], "implement": [1, 6, 7, 9], "num_op_sum_linop": [1, 5], "one_body_linop": [1, 5, 7], "algebra": [2, 11], "util": [2, 3, 4], "apply_matrix_to_slic": [2, 5], "target": 2, "slice": 2, "out": [2, 8], "double_factor": [2, 5], "ell": 2, "pk": 2, "qk": 2, "respect": 2, "too": 2, "small": [2, 9], "exce": [2, 9], "collect": 2, "double_factorized_t2": [2, 5], "t_": 2, "ijab": 2, "ap": 2, "ip": 2, "bq": 2, "jq": 2, "expm_multiply_taylor": [2, 5], "12": [2, 11], "expm": 2, "taylor": 2, "seri": 2, "expans": 2, "givens_decomposit": [2, 5], "is_antihermitian": [2, 5], "anti": [2, 3], "hermitian": [2, 3, 7], "is_hermitian": [2, 5], "is_orthogon": [2, 5], "orthogon": [2, 3], "union": 2, "bool_": 2, "is_real_symmetr": [2, 5], "is_special_orthogon": [2, 5], "special": [2, 3, 5, 6], "is_unitari": [2, 5], "lup": [2, 5], "pivot": 2, "lu": 2, "rtype": 2, "lower": 2, "unit": 2, "modified_choleski": [2, 5], "v_i": 2, "posit": [2, 10], "definit": 2, "No": 2, "check": [2, 7, 8], "verifi": 2, "1711": 2, "02242": 2, "assembl": 2, "reduced_matrix": [2, 5], "subspac": [2, 11], "span": 2, "some": [2, 8, 11], "v_j": 2, "random_antihermitian": [3, 5], "width": 3, "height": 3, "dype": 3, "random_hermitian": [3, 5, 7], "random_orthogon": [3, 5], "distribut": 3, "haar": 3, "measur": 3, "instanc": [3, 7, 8], "math": [3, 10], "ph": 3, "0609050": 3, "random_real_symmetric_matrix": [3, 5], "random_special_orthogon": [3, 5], "random_statevector": [3, 5, 11], "random_t2_amplitud": [3, 5], "random_two_body_tensor_r": [3, 5], "random_unitari": [3, 5, 6, 7], "random_nelec": [4, 5], "n_alpha": [4, 6, 7, 10], "n_beta": [4, 6, 7, 10], "random_occupied_orbit": [4, 5], "occ_a": 4, "occ_b": 4, "preserv": [5, 11], "categori": 5, "chemistri": 5, "By": [5, 6], "exploit": 5, "algorithm": 5, "faster": 5, "introduct": 5, "quadrat": [5, 8], "local": 5, "lucj": 5, "entangl": 5, "forg": 5, "contract": [5, 7], "linalg": [5, 7, 8, 11], "test": [5, 7, 8], "advantag": 6, "effici": [6, 11], "level": [6, 8], "doe": [6, 11], "primari": 6, "wai": [6, 7, 9], "directli": [6, 8], "code": [6, 8, 9, 11], "show": [6, 7, 8, 9, 10, 11], "6": [6, 7, 8, 9, 10, 11], "1234": [6, 7], "rotated_vec": [6, 7], "plain": 6, "Its": 6, "fix": 6, "For": [6, 7, 9, 11], "system": [6, 7], "conveni": 6, "comb": 6, "assert": 6, "standard": 6, "often": [6, 9], "simpli": [6, 7], "reshap": 6, "reshaped_vec": 6, "choic": 6, "pyscf": [6, 8, 9, 10], "modul": 6, "tutori": [7, 8, 9, 10], "ffsim": [7, 8, 9, 10, 11], "fundament": 7, "mode": 7, "sum_j": 7, "new": [7, 11], "th": 7, "satisfi": [7, 11], "anticommut": 7, "relat": [7, 9], "thei": [7, 9, 11], "align": [7, 9], "_1": 7, "_2": 7, "section": 7, "ll": [7, 8, 9], "demonstr": [7, 8, 9], "task": 7, "consid": [7, 9], "rewritten": 7, "introduc": [7, 9], "eigendecomposit": 7, "sum_k": [7, 8], "lambda_k": 7, "ik": 7, "jk": 7, "our": [7, 8, 9], "ground": [7, 9], "pick": 7, "phase": 7, "spars": [7, 8, 11], "eig": [7, 11], "eigsh": 7, "la": 7, "fact": 7, "you": [7, 9], "illustr": 7, "purpos": 7, "explicitli": 7, "eigh": [7, 8], "evolved_vec": 7, "conj": 7, "undo": 7, "expected_phas": 7, "assert_allclos": 7, "mention": [7, 8], "abov": [7, 8, 11], "below": [7, 8, 9], "better": [7, 8], "evolved_vec_alt": 7, "daunt": 8, "scale": 8, "cell": [8, 9], "hydrogen": 8, "molecul": [8, 9, 10], "stretch": [8, 9], "bond": [8, 9, 10], "build": [8, 9, 10], "h2": 8, "mol": [8, 9, 10], "gto": [8, 9, 10], "mole": [8, 9, 10], "atom": [8, 9, 10], "8": [8, 9, 10, 11], "sto": [8, 9, 10], "6g": [8, 9, 10], "d2h": [8, 9], "rhf": [8, 9, 10], "kernel": [8, 9, 10], "mol_data": [8, 9, 10], "mol_hamiltonian": [8, 9, 10], "df_hamiltonian": 8, "converg": [8, 9, 10], "837796382593709": 8, "dataclass": [8, 9], "print": [8, 9, 10, 11], "inform": [8, 11], "One": 8, "27478830e": 8, "01": [8, 9, 10], "52909490e": 8, "17": 8, "57029092e": 8, "77238770e": 8, "23173938e": 8, "58782168e": 8, "33545754e": 8, "49859013e": 8, "48240570e": 8, "83067333e": 8, "01841799e": 8, "53132024e": 8, "21318608e": 8, "00": [8, 10], "27383424e": 8, "16": 8, "82879498e": 8, "07792507e": 8, "14653029e": 8, "27521846e": 8, "62": 8, "39236953e": 8, "32": 8, "52090881e": 8, "03": [8, 9, 10], "00000000e": 8, "7": [8, 9, 11], "07106781e": 8, "27830444e": 8, "15": [8, 9], "rest": 8, "although": 8, "alreadi": 8, "built": 8, "manual": 8, "asymmetr": 8, "basic": 8, "h_k": 8, "divid": 8, "singl": 8, "exponenti": 8, "individu": [8, 11], "do": [8, 11], "approx": 8, "prod_k": 8, "higher": 8, "deriv": 8, "write": 8, "recal": 8, "addit": [8, 11], "think": 8, "compos": 8, "def": [8, 9, 10], "simulate_trotter_step_double_factor": 8, "one_body_energi": 8, "one_body_basis_chang": 8, "zip": [8, 10], "finish": 8, "handl": 8, "split": 8, "multipl": [8, 11], "wrote": 8, "step_tim": 8, "match": 8, "initial_st": 8, "\u03c8": [8, 9, 10], "hf_energi": 8, "vdot": [8, 9, 10], "f": [8, 9, 10], "8377963825937084": 8, "now": 8, "later": 8, "exact_st": 8, "expm_multipli": 8, "tracea": 8, "fidel": 8, "ab": 8, "9696296369955066": 8, "final_st": [8, 9], "9990275744083494": 8, "improv": 8, "increas": [8, 9], "10": 8, "9999906233109686": 8, "commonli": 8, "known": 8, "fourth": 8, "reproduc": 8, "9": [8, 9, 11], "fewer": 8, "9999999336740067": 8, "ethen": 9, "mcscf": [9, 10], "bond_dist": 9, "678": 9, "5626": 9, "c": 9, "9289": 9, "nelectron": 9, "ca": [9, 10], "casci": [9, 10], "nca": [9, 10], "neleca": [9, 10], "mo": [9, 10], "sort_mo": [9, 10], "energy_fci": [9, 10], "77": 9, "4456267643961": 9, "6290254326717": 9, "ci": [9, 10], "57322412553863": 9, "0000000": [9, 10], "phi_0": 9, "taken": 9, "express": 9, "previou": 9, "constructor": 9, "provid": 9, "truncat": 9, "ccsd": 9, "mp2": 9, "run": 9, "sinc": 9, "cc": 9, "frozen": 9, "nao_nr": 9, "reference_st": 9, "ansatz_st": [9, 10], "initiali": [9, 10], "49387212754469": 9, "e_corr": 9, "0482453631485175": 9, "46975600021719": 9, "facilit": 9, "convers": 9, "precis": 9, "somewhat": 9, "complic": 9, "short": 9, "entri": 9, "non": 9, "redund": 9, "associ": [9, 11], "evalu": [9, 10], "would": 9, "like": 9, "fun": [9, 10], "x": [9, 10], "x0": [9, 10], "maxfun": 9, "1000": 9, "len": [9, 10], "72": 9, "messag": [9, 10], "stop": 9, "NO": 9, "AND": 9, "success": [9, 10], "statu": [9, 10], "51503435994836": 9, "518e": 9, "985e": 9, "868e": 9, "172e": 9, "02": [9, 10], "nit": 9, "jac": 9, "439e": 9, "426e": 9, "275e": 9, "705e": 9, "nfev": [9, 10], "1022": 9, "njev": 9, "14": [9, 10], "hess_inv": 9, "lt": 9, "72x72": 9, "lbfgsinvhessproduct": 9, "float64": 9, "gt": 9, "either": 9, "connect": 9, "swap": 9, "network": 9, "make": 9, "challeng": 9, "noisi": 9, "pre": 9, "fault": 9, "processor": 9, "idea": 9, "impos": 9, "sparsiti": 9, "constraint": 9, "them": 9, "depth": 9, "topologi": 9, "triangl": 9, "need": 9, "lattic": 9, "parallel": 9, "line": 9, "rung": 9, "ladder": 9, "With": 9, "setup": 9, "while": 9, "share": 9, "ldot": 9, "without": 9, "Of": 9, "cours": 9, "less": 9, "notic": 9, "decreas": 9, "46": 9, "45984977965071": 9, "041e": 9, "966e": 9, "591e": 9, "166e": 9, "774e": 9, "242e": 9, "04": 9, "043e": 9, "260e": 9, "1034": 9, "22": 9, "46x46": 9, "water": 10, "equilibrium": 10, "radius_1": 10, "958": 10, "radius_2": 10, "bond_angle_deg": 10, "104": 10, "478": 10, "h1_x": 10, "h2_x": 10, "180": 10, "h2_y": 10, "c2v": 10, "n_electron": 10, "mo_occ": 10, "75": 10, "6787887956297": 10, "7079508859773": 10, "3336207346502": 10, "reference_occupations_spati": 10, "6836617444762": 10, "cobyla": 10, "maxit": 10, "100": 10, "exceed": 10, "69430210102367": 10, "344e": 10, "447e": 10, "883e": 10, "105e": 10, "881e": 10, "maxcv": 10, "Such": 11, "programmat": 11, "dictionari": 11, "hash": 11, "tabl": 11, "three": 11, "piec": 11, "being": 11, "upon": 11, "intern": 11, "itself": 11, "recommend": 11, "helper": 11, "shown": 11, "repr": 11, "view": 11, "displai": 11, "39": 11, "0j": 11, "arithmet": 11, "multipli": 11, "scalar": 11, "go": 11, "op": 11, "op3": 11, "good": 11, "awar": 11, "especi": 11, "avoid": 11, "These": 11, "subtract": 11, "divis": 11, "12j": 11, "3j": 11, "4j": 11, "6j": 11, "far": 11, "criteria": 11, "op4": 11, "linop": 11, "onto": 11, "09345703": 11, "26351017j": 11, "most": 11, "lm": 11, "21984743e": 11, "18j": 11}, "objects": {"": [[0, 0, 0, "-", "ffsim"]], "ffsim": [[0, 1, 1, "", "DoubleFactorizedHamiltonian"], [0, 1, 1, "", "FermionAction"], [0, 1, 1, "", "FermionOperator"], [0, 1, 1, "", "HopGateAnsatzOperator"], [0, 1, 1, "", "MolecularData"], [0, 1, 1, "", "MolecularHamiltonian"], [0, 1, 1, "", "SupportsApplyUnitary"], [0, 1, 1, "", "SupportsApproximateEquality"], [0, 1, 1, "", "SupportsLinearOperator"], [0, 1, 1, "", "SupportsTrace"], [0, 1, 1, "", "UCJOperator"], [0, 5, 1, "", "apply_diag_coulomb_evolution"], [0, 5, 1, "", "apply_fsim_gate"], [0, 5, 1, "", "apply_givens_rotation"], [0, 5, 1, "", "apply_hop_gate"], [0, 5, 1, "", "apply_num_interaction"], [0, 5, 1, "", "apply_num_num_interaction"], [0, 5, 1, "", "apply_num_op_prod_interaction"], [0, 5, 1, "", "apply_num_op_sum_evolution"], [0, 5, 1, "", "apply_orbital_rotation"], [0, 5, 1, "", "apply_tunneling_interaction"], [0, 5, 1, "", "apply_unitary"], [0, 5, 1, "", "approx_eq"], [1, 0, 0, "-", "contract"], [0, 5, 1, "", "cre"], [0, 5, 1, "", "cre_a"], [0, 5, 1, "", "cre_b"], [0, 5, 1, "", "des"], [0, 5, 1, "", "des_a"], [0, 5, 1, "", "des_b"], [0, 5, 1, "", "dim"], [0, 5, 1, "", "dims"], [0, 5, 1, "", "expectation_one_body_power"], [0, 5, 1, "", "expectation_one_body_product"], [0, 5, 1, "", "hartree_fock_state"], [0, 5, 1, "", "indices_to_strings"], [2, 0, 0, "-", "linalg"], [0, 5, 1, "", "linear_operator"], [0, 5, 1, "", "multireference_state"], [0, 5, 1, "", "one_hot"], [3, 0, 0, "-", "random"], [0, 5, 1, "", "simulate_qdrift_double_factorized"], [0, 5, 1, "", "simulate_trotter_double_factorized"], [0, 5, 1, "", "slater_determinant"], [0, 5, 1, "", "slater_determinant_one_rdm"], [4, 0, 0, "-", "testing"], [0, 5, 1, "", "trace"]], "ffsim.DoubleFactorizedHamiltonian": [[0, 2, 1, "", "constant"], [0, 2, 1, "", "diag_coulomb_mats"], [0, 3, 1, "", "from_molecular_hamiltonian"], [0, 4, 1, "", "norb"], [0, 2, 1, "", "one_body_tensor"], [0, 2, 1, "", "orbital_rotations"], [0, 3, 1, "", "to_number_representation"], [0, 3, 1, "", "to_z_representation"], [0, 2, 1, "", "z_representation"]], "ffsim.FermionAction": [[0, 2, 1, "", "action"], [0, 2, 1, "", "orb"], [0, 2, 1, "", "spin"]], "ffsim.FermionOperator": [[0, 3, 1, "", "conserves_particle_number"], [0, 3, 1, "", "conserves_spin_z"], [0, 3, 1, "", "many_body_order"], [0, 3, 1, "", "normal_ordered"]], "ffsim.MolecularData": [[0, 2, 1, "", "core_energy"], [0, 2, 1, "", "dipole_integrals"], [0, 3, 1, "", "from_hartree_fock"], [0, 4, 1, "", "hamiltonian"], [0, 2, 1, "", "nelec"], [0, 2, 1, "", "norb"], [0, 2, 1, "", "one_body_tensor"], [0, 2, 1, "", "orbital_symmetries"], [0, 2, 1, "", "two_body_tensor"]], "ffsim.MolecularHamiltonian": [[0, 2, 1, "", "constant"], [0, 4, 1, "", "norb"], [0, 2, 1, "", "one_body_tensor"], [0, 2, 1, "", "two_body_tensor"]], "ffsim.UCJOperator": [[0, 2, 1, "", "diag_coulomb_mats_alpha_alpha"], [0, 2, 1, "", "diag_coulomb_mats_alpha_beta"], [0, 2, 1, "", "final_orbital_rotation"], [0, 3, 1, "", "from_parameters"], [0, 3, 1, "", "from_t_amplitudes"], [0, 4, 1, "", "n_reps"], [0, 4, 1, "", "norb"], [0, 2, 1, "", "orbital_rotations"], [0, 3, 1, "", "to_parameters"], [0, 3, 1, "", "to_t_amplitudes"]], "ffsim.contract": [[1, 5, 1, "", "contract_diag_coulomb"], [1, 5, 1, "", "contract_num_op_sum"], [1, 5, 1, "", "diag_coulomb_linop"], [1, 5, 1, "", "num_op_sum_linop"], [1, 5, 1, "", "one_body_linop"]], "ffsim.linalg": [[2, 5, 1, "", "apply_matrix_to_slices"], [2, 5, 1, "", "double_factorized"], [2, 5, 1, "", "double_factorized_t2"], [2, 5, 1, "", "expm_multiply_taylor"], [2, 5, 1, "", "givens_decomposition"], [2, 5, 1, "", "is_antihermitian"], [2, 5, 1, "", "is_hermitian"], [2, 5, 1, "", "is_orthogonal"], [2, 5, 1, "", "is_real_symmetric"], [2, 5, 1, "", "is_special_orthogonal"], [2, 5, 1, "", "is_unitary"], [2, 5, 1, "", "lup"], [2, 5, 1, "", "modified_cholesky"], [2, 5, 1, "", "reduced_matrix"]], "ffsim.random": [[3, 5, 1, "", "random_antihermitian"], [3, 5, 1, "", "random_hermitian"], [3, 5, 1, "", "random_orthogonal"], [3, 5, 1, "", "random_real_symmetric_matrix"], [3, 5, 1, "", "random_special_orthogonal"], [3, 5, 1, "", "random_statevector"], [3, 5, 1, "", "random_t2_amplitudes"], [3, 5, 1, "", "random_two_body_tensor_real"], [3, 5, 1, "", "random_unitary"]], "ffsim.testing": [[4, 5, 1, "", "random_nelec"], [4, 5, 1, "", "random_occupied_orbitals"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"]}, "titleterms": {"ffsim": [0, 1, 2, 3, 4, 5, 6], "contract": 1, "linalg": 2, "random": 3, "test": 4, "welcom": 5, "": 5, "document": 5, "tutori": 5, "api": 5, "refer": 5, "introduct": 6, "orbit": 7, "rotat": 7, "quadrat": 7, "hamiltonian": [7, 8], "time": 7, "evolut": 7, "diagon": 8, "coulomb": 8, "oper": 8, "doubl": 8, "factor": 8, "trotter": 8, "simul": 8, "represent": 8, "molecular": 8, "brief": 8, "background": 8, "suzuki": 8, "formula": 8, "implement": 8, "The": [9, 11], "local": 9, "unitari": 9, "cluster": 9, "jastrow": 9, "lucj": 9, "ansatz": 9, "ucj": 9, "entangl": 10, "forg": 10, "fermionoper": 11, "class": 11}, "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": [[0, "module-ffsim"]], "ffsim.contract": [[1, "module-ffsim.contract"]], "ffsim.linalg": [[2, "module-ffsim.linalg"]], "ffsim.random": [[3, "module-ffsim.random"]], "ffsim.testing": [[4, "module-ffsim.testing"]], "Welcome to ffsim\u2019s documentation!": [[5, "welcome-to-ffsim-s-documentation"]], "Tutorials": [[5, "tutorials"]], "API Reference": [[5, "api-reference"]], "Introduction to ffsim": [[6, "Introduction-to-ffsim"]], "Orbital rotations and quadratic Hamiltonians": [[7, "Orbital-rotations-and-quadratic-Hamiltonians"]], "Orbital rotations": [[7, "Orbital-rotations"]], "Time evolution by a quadratic Hamiltonian": [[7, "Time-evolution-by-a-quadratic-Hamiltonian"]], "Diagonal Coulomb operators and double-factorized Trotter simulation": [[8, "Diagonal-Coulomb-operators-and-double-factorized-Trotter-simulation"]], "Double-factorized representation of the molecular Hamiltonian": [[8, "Double-factorized-representation-of-the-molecular-Hamiltonian"]], "Trotter simulation of the double-factorized Hamiltonian": [[8, "Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "Brief background on Trotter-Suzuki formulas": [[8, "Brief-background-on-Trotter-Suzuki-formulas"]], "Implementing Trotter simulation of the double-factorized Hamiltonian": [[8, "Implementing-Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "The local unitary cluster Jastrow (LUCJ) ansatz": [[9, "The-local-unitary-cluster-Jastrow-(LUCJ)-ansatz"], [9, "id1"]], "The unitary cluster Jastrow (UCJ) ansatz": [[9, "The-unitary-cluster-Jastrow-(UCJ)-ansatz"]], "Entanglement forging": [[10, "Entanglement-forging"]], "The FermionOperator class": [[11, "The-FermionOperator-class"]]}, "indexentries": {"doublefactorizedhamiltonian (class in ffsim)": [[0, "ffsim.DoubleFactorizedHamiltonian"]], "fermionaction (class in ffsim)": [[0, "ffsim.FermionAction"]], "fermionoperator (class in ffsim)": [[0, "ffsim.FermionOperator"]], "hopgateansatzoperator (class in ffsim)": [[0, "ffsim.HopGateAnsatzOperator"]], "moleculardata (class in ffsim)": [[0, "ffsim.MolecularData"]], "molecularhamiltonian (class in ffsim)": [[0, "ffsim.MolecularHamiltonian"]], "supportsapplyunitary (class in ffsim)": [[0, "ffsim.SupportsApplyUnitary"]], "supportsapproximateequality (class in ffsim)": [[0, "ffsim.SupportsApproximateEquality"]], "supportslinearoperator (class in ffsim)": [[0, "ffsim.SupportsLinearOperator"]], "supportstrace (class in ffsim)": [[0, "ffsim.SupportsTrace"]], "ucjoperator (class in ffsim)": [[0, "ffsim.UCJOperator"]], "action (ffsim.fermionaction attribute)": [[0, "ffsim.FermionAction.action"]], "apply_diag_coulomb_evolution() (in module ffsim)": [[0, "ffsim.apply_diag_coulomb_evolution"]], "apply_fsim_gate() (in module ffsim)": [[0, "ffsim.apply_fsim_gate"]], "apply_givens_rotation() (in module ffsim)": [[0, "ffsim.apply_givens_rotation"]], "apply_hop_gate() (in module ffsim)": [[0, "ffsim.apply_hop_gate"]], "apply_num_interaction() (in module ffsim)": [[0, "ffsim.apply_num_interaction"]], "apply_num_num_interaction() (in module ffsim)": [[0, "ffsim.apply_num_num_interaction"]], "apply_num_op_prod_interaction() (in module ffsim)": [[0, "ffsim.apply_num_op_prod_interaction"]], "apply_num_op_sum_evolution() (in module ffsim)": [[0, "ffsim.apply_num_op_sum_evolution"]], "apply_orbital_rotation() (in module ffsim)": [[0, "ffsim.apply_orbital_rotation"]], "apply_tunneling_interaction() (in module ffsim)": [[0, "ffsim.apply_tunneling_interaction"]], "apply_unitary() (in module ffsim)": [[0, "ffsim.apply_unitary"]], "approx_eq() (in module ffsim)": [[0, "ffsim.approx_eq"]], "conserves_particle_number() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.conserves_particle_number"]], "conserves_spin_z() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.conserves_spin_z"]], "constant (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.constant"]], "constant (ffsim.molecularhamiltonian attribute)": [[0, "ffsim.MolecularHamiltonian.constant"]], "core_energy (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.core_energy"]], "cre() (in module ffsim)": [[0, "ffsim.cre"]], "cre_a() (in module ffsim)": [[0, "ffsim.cre_a"]], "cre_b() (in module ffsim)": [[0, "ffsim.cre_b"]], "des() (in module ffsim)": [[0, "ffsim.des"]], "des_a() (in module ffsim)": [[0, "ffsim.des_a"]], "des_b() (in module ffsim)": [[0, "ffsim.des_b"]], "diag_coulomb_mats (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.diag_coulomb_mats"]], "diag_coulomb_mats_alpha_alpha (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.diag_coulomb_mats_alpha_alpha"]], "diag_coulomb_mats_alpha_beta (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.diag_coulomb_mats_alpha_beta"]], "dim() (in module ffsim)": [[0, "ffsim.dim"]], "dims() (in module ffsim)": [[0, "ffsim.dims"]], "dipole_integrals (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.dipole_integrals"]], "expectation_one_body_power() (in module ffsim)": [[0, "ffsim.expectation_one_body_power"]], "expectation_one_body_product() (in module ffsim)": [[0, "ffsim.expectation_one_body_product"]], "ffsim": [[0, "module-ffsim"]], "final_orbital_rotation (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.final_orbital_rotation"]], "from_hartree_fock() (ffsim.moleculardata static method)": [[0, "ffsim.MolecularData.from_hartree_fock"]], "from_molecular_hamiltonian() (ffsim.doublefactorizedhamiltonian static method)": [[0, "ffsim.DoubleFactorizedHamiltonian.from_molecular_hamiltonian"]], "from_parameters() (ffsim.ucjoperator static method)": [[0, "ffsim.UCJOperator.from_parameters"]], "from_t_amplitudes() (ffsim.ucjoperator static method)": [[0, "ffsim.UCJOperator.from_t_amplitudes"]], "hamiltonian (ffsim.moleculardata property)": [[0, "ffsim.MolecularData.hamiltonian"]], "hartree_fock_state() (in module ffsim)": [[0, "ffsim.hartree_fock_state"]], "indices_to_strings() (in module ffsim)": [[0, "ffsim.indices_to_strings"]], "linear_operator() (in module ffsim)": [[0, "ffsim.linear_operator"]], "many_body_order() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.many_body_order"]], "module": [[0, "module-ffsim"], [1, "module-ffsim.contract"], [2, "module-ffsim.linalg"], [3, "module-ffsim.random"], [4, "module-ffsim.testing"]], "multireference_state() (in module ffsim)": [[0, "ffsim.multireference_state"]], "n_reps (ffsim.ucjoperator property)": [[0, "ffsim.UCJOperator.n_reps"]], "nelec (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.nelec"]], "norb (ffsim.doublefactorizedhamiltonian property)": [[0, "ffsim.DoubleFactorizedHamiltonian.norb"]], "norb (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.norb"]], "norb (ffsim.molecularhamiltonian property)": [[0, "ffsim.MolecularHamiltonian.norb"]], "norb (ffsim.ucjoperator property)": [[0, "ffsim.UCJOperator.norb"]], "normal_ordered() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.normal_ordered"]], "one_body_tensor (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.one_body_tensor"]], "one_body_tensor (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.one_body_tensor"]], "one_body_tensor (ffsim.molecularhamiltonian attribute)": [[0, "ffsim.MolecularHamiltonian.one_body_tensor"]], "one_hot() (in module ffsim)": [[0, "ffsim.one_hot"]], "orb (ffsim.fermionaction attribute)": [[0, "ffsim.FermionAction.orb"]], "orbital_rotations (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.orbital_rotations"]], "orbital_rotations (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.orbital_rotations"]], "orbital_symmetries (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.orbital_symmetries"]], "simulate_qdrift_double_factorized() (in module ffsim)": [[0, "ffsim.simulate_qdrift_double_factorized"]], "simulate_trotter_double_factorized() (in module ffsim)": [[0, "ffsim.simulate_trotter_double_factorized"]], "slater_determinant() (in module ffsim)": [[0, "ffsim.slater_determinant"]], "slater_determinant_one_rdm() (in module ffsim)": [[0, "ffsim.slater_determinant_one_rdm"]], "spin (ffsim.fermionaction attribute)": [[0, "ffsim.FermionAction.spin"]], "to_number_representation() (ffsim.doublefactorizedhamiltonian method)": [[0, "ffsim.DoubleFactorizedHamiltonian.to_number_representation"]], "to_parameters() (ffsim.ucjoperator method)": [[0, "ffsim.UCJOperator.to_parameters"]], "to_t_amplitudes() (ffsim.ucjoperator method)": [[0, "ffsim.UCJOperator.to_t_amplitudes"]], "to_z_representation() (ffsim.doublefactorizedhamiltonian method)": [[0, "ffsim.DoubleFactorizedHamiltonian.to_z_representation"]], "trace() (in module ffsim)": [[0, "ffsim.trace"]], "two_body_tensor (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.two_body_tensor"]], "two_body_tensor (ffsim.molecularhamiltonian attribute)": [[0, "ffsim.MolecularHamiltonian.two_body_tensor"]], "z_representation (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.z_representation"]], "contract_diag_coulomb() (in module ffsim.contract)": [[1, "ffsim.contract.contract_diag_coulomb"]], "contract_num_op_sum() (in module ffsim.contract)": [[1, "ffsim.contract.contract_num_op_sum"]], "diag_coulomb_linop() (in module ffsim.contract)": [[1, "ffsim.contract.diag_coulomb_linop"]], "ffsim.contract": [[1, "module-ffsim.contract"]], "num_op_sum_linop() (in module ffsim.contract)": [[1, "ffsim.contract.num_op_sum_linop"]], "one_body_linop() (in module ffsim.contract)": [[1, "ffsim.contract.one_body_linop"]], "apply_matrix_to_slices() (in module ffsim.linalg)": [[2, "ffsim.linalg.apply_matrix_to_slices"]], "double_factorized() (in module ffsim.linalg)": [[2, "ffsim.linalg.double_factorized"]], "double_factorized_t2() (in module ffsim.linalg)": [[2, "ffsim.linalg.double_factorized_t2"]], "expm_multiply_taylor() (in module ffsim.linalg)": [[2, "ffsim.linalg.expm_multiply_taylor"]], "ffsim.linalg": [[2, "module-ffsim.linalg"]], "givens_decomposition() (in module ffsim.linalg)": [[2, "ffsim.linalg.givens_decomposition"]], "is_antihermitian() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_antihermitian"]], "is_hermitian() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_hermitian"]], "is_orthogonal() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_orthogonal"]], "is_real_symmetric() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_real_symmetric"]], "is_special_orthogonal() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_special_orthogonal"]], "is_unitary() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_unitary"]], "lup() (in module ffsim.linalg)": [[2, "ffsim.linalg.lup"]], "modified_cholesky() (in module ffsim.linalg)": [[2, "ffsim.linalg.modified_cholesky"]], "reduced_matrix() (in module ffsim.linalg)": [[2, "ffsim.linalg.reduced_matrix"]], "ffsim.random": [[3, "module-ffsim.random"]], "random_antihermitian() (in module ffsim.random)": [[3, "ffsim.random.random_antihermitian"]], "random_hermitian() (in module ffsim.random)": [[3, "ffsim.random.random_hermitian"]], "random_orthogonal() (in module ffsim.random)": [[3, "ffsim.random.random_orthogonal"]], "random_real_symmetric_matrix() (in module ffsim.random)": [[3, "ffsim.random.random_real_symmetric_matrix"]], "random_special_orthogonal() (in module ffsim.random)": [[3, "ffsim.random.random_special_orthogonal"]], "random_statevector() (in module ffsim.random)": [[3, "ffsim.random.random_statevector"]], "random_t2_amplitudes() (in module ffsim.random)": [[3, "ffsim.random.random_t2_amplitudes"]], "random_two_body_tensor_real() (in module ffsim.random)": [[3, "ffsim.random.random_two_body_tensor_real"]], "random_unitary() (in module ffsim.random)": [[3, "ffsim.random.random_unitary"]], "ffsim.testing": [[4, "module-ffsim.testing"]], "random_nelec() (in module ffsim.testing)": [[4, "ffsim.testing.random_nelec"]], "random_occupied_orbitals() (in module ffsim.testing)": [[4, "ffsim.testing.random_occupied_orbitals"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["api/ffsim", "api/ffsim.contract", "api/ffsim.linalg", "api/ffsim.random", "api/ffsim.testing", "index", "tutorials/01-introduction", "tutorials/02-orbital-rotation", "tutorials/03-double-factorized", "tutorials/04-lucj", "tutorials/05-entanglement-forging", "tutorials/06-fermion-operator"], "filenames": ["api/ffsim.rst", "api/ffsim.contract.rst", "api/ffsim.linalg.rst", "api/ffsim.random.rst", "api/ffsim.testing.rst", "index.rst", "tutorials/01-introduction.ipynb", "tutorials/02-orbital-rotation.ipynb", "tutorials/03-double-factorized.ipynb", "tutorials/04-lucj.ipynb", "tutorials/05-entanglement-forging.ipynb", "tutorials/06-fermion-operator.ipynb"], "titles": ["ffsim", "ffsim.contract", "ffsim.linalg", "ffsim.random", "ffsim.testing", "Welcome to ffsim\u2019s documentation!", "Introduction to ffsim", "Orbital rotations and quadratic Hamiltonians", "Diagonal Coulomb operators and double-factorized Trotter simulation", "The local unitary cluster Jastrow (LUCJ) ansatz", "Entanglement forging", "The FermionOperator class"], "terms": {"i": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11], "softwar": [0, 5, 6], "librari": [0, 5, 6], "fast": 0, "simul": [0, 5, 6, 7, 9, 10], "fermion": [0, 5, 6, 7, 9, 11], "quantum": [0, 5, 6, 8, 9], "circuit": [0, 5, 6], "class": [0, 3, 5, 6, 9], "doublefactorizedhamiltonian": [0, 5, 8], "one_body_tensor": [0, 7, 8], "diag_coulomb_mat": [0, 8], "orbital_rot": [0, 1, 6, 7, 8], "constant": [0, 8, 9], "0": [0, 7, 8, 9, 10, 11], "z_represent": [0, 1], "fals": [0, 1, 2, 9, 10, 11], "sourc": [0, 1, 2, 3, 4], "base": [0, 2, 9, 10], "object": [0, 2, 9, 11], "A": [0, 1, 2, 3, 4, 7, 8, 9, 11], "hamiltonian": [0, 5, 9, 10], "doubl": [0, 2, 5, 9], "factor": [0, 2, 5, 9], "form": [0, 1, 2, 7, 8, 9, 11], "low": [0, 2, 6], "rank": [0, 2, 3], "decomposit": [0, 2], "The": [0, 1, 2, 3, 4, 5, 6, 7, 8], "molecular": [0, 9, 10], "h": [0, 8, 9, 10], "sum_": [0, 1, 2, 7, 8, 9], "pq": [0, 2, 8], "sigma": [0, 1, 7, 8, 9], "kappa_": 0, "dagger_": [0, 7, 8], "p": [0, 2, 8, 9], "a_": [0, 7, 8, 11], "q": [0, 8], "frac12": [0, 8, 9], "sum_t": 0, "ij": [0, 1, 2, 7, 8, 9], "tau": [0, 1, 8, 9], "z": [0, 1, 2, 5, 6, 11], "t": [0, 2, 7, 8], "_": [0, 2, 7, 8, 9], "n": [0, 2, 6, 7, 8, 9], "j": [0, 1, 7, 8, 9, 11], "text": [0, 8], "where": [0, 1, 2, 7, 8, 9], "u": [0, 1, 2], "pi": [0, 10], "qi": 0, "here": [0, 2, 6, 7, 8, 9], "each": [0, 2, 6, 8, 9, 11], "unitari": [0, 1, 2, 3, 5, 7, 8], "matrix": [0, 1, 2, 3, 6, 7, 8, 9, 11], "real": [0, 1, 2, 3, 7, 8, 9, 10], "symmetr": [0, 1, 2, 3, 8, 9], "represent": [0, 1, 2, 6, 11], "an": [0, 1, 2, 3, 6, 7, 8, 9, 11], "altern": [0, 8], "sometim": 0, "yield": [0, 2, 8, 9], "simpler": 0, "under": 0, "jordan": 0, "wigner": 0, "transform": [0, 1, 6, 7], "number": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "oper": [0, 1, 2, 5, 7, 9, 10, 11], "take": [0, 6, 9], "frac": 0, "1": [0, 2, 3, 6, 7, 8, 9, 10, 11], "2": [0, 1, 2, 3, 6, 7, 8, 9, 10, 11], "pauli": 0, "rotat": [0, 1, 2, 5, 6, 8, 9], "basi": [0, 7, 8, 9, 10], "obtain": [0, 7, 8, 9], "rewrit": 0, "two": [0, 2, 3, 8, 9, 10], "bodi": [0, 1, 2, 3, 8, 9, 10], "part": [0, 2], "term": [0, 1, 2, 8, 9, 11], "updat": [0, 8], "one": [0, 1, 2, 6, 8, 9, 10], "appropri": 0, "kappa": 0, "frac18": 0, "asterisk": 0, "denot": [0, 1, 7], "summat": 0, "over": 0, "indic": [0, 2, 9, 11], "neq": [0, 1], "tensor": [0, 1, 2, 3, 8, 9, 10], "type": [0, 1, 2, 3, 4], "np": [0, 3, 4, 7, 8, 9, 10], "ndarrai": [0, 1, 2, 3, 8], "diagon": [0, 1, 2, 5, 7, 9], "coulomb": [0, 1, 2, 5, 9], "matric": [0, 1, 2, 7, 8, 9], "orbit": [0, 1, 2, 3, 4, 5, 6, 8, 9, 11], "float": [0, 2, 3, 8], "whether": [0, 1, 2, 11], "rather": [0, 6], "than": [0, 5, 6, 9], "bool": [0, 1, 2], "static": 0, "from_molecular_hamiltonian": [0, 8], "tol": [0, 2], "1e": [0, 2], "08": [0, 2], "max_vec": [0, 2], "none": [0, 1, 2, 3, 4], "optim": [0, 2, 9, 10], "method": [0, 2, 9, 10], "l": [0, 2, 8, 9], "bfg": [0, 2, 9], "b": [0, 2, 7, 9], "option": [0, 1, 2, 3, 9, 10], "diag_coulomb_mask": [0, 2], "choleski": [0, 2], "true": [0, 2, 6, 11], "act": [0, 11], "h_": [0, 2, 8], "pqr": [0, 2, 8], "r": [0, 2, 8], "": [0, 2, 6, 8, 9, 10, 11], "decompos": [0, 2, 8], "ar": [0, 1, 2, 3, 6, 7, 8, 9, 11], "output": [0, 8, 9], "guarante": 0, "so": [0, 2, 7, 8, 9, 11], "depend": [0, 2, 6], "allow": [0, 2, 9], "error": [0, 2], "threshold": [0, 2], "larger": [0, 2, 11], "lead": 0, "smaller": [0, 2, 8, 11], "furthermor": [0, 2], "max_rank": 0, "paramet": [0, 1, 2, 3, 4, 9, 10], "specifi": [0, 2, 9], "upper": [0, 2, 9], "bound": [0, 2], "default": [0, 2, 3], "behavior": [0, 2, 3], "thi": [0, 2, 5, 6, 7, 8, 9, 10], "routin": [0, 2, 6, 11], "perform": [0, 2, 7, 8], "straightforward": [0, 2], "exact": [0, 2, 6, 8], "nest": [0, 2], "eigenvalu": [0, 2, 7], "addition": [0, 2], "can": [0, 2, 5, 6, 7, 8, 9, 11], "choos": [0, 2, 6, 9], "coeffici": [0, 1, 2, 7, 9, 11], "store": [0, 2, 8, 9], "achiev": [0, 2, 8], "compress": [0, 2], "enabl": [0, 2], "set": [0, 2, 6, 7, 8, 9], "attempt": [0, 2], "minim": [0, 2, 9, 10], "least": [0, 2], "squar": [0, 2, 9], "function": [0, 1, 2, 6, 7, 8, 9, 10, 11], "quantifi": [0, 2], "It": [0, 2, 6, 8, 11], "us": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11], "scipi": [0, 2, 6, 7, 8, 9, 10, 11], "pass": [0, 2, 7, 11], "both": [0, 2], "its": [0, 2, 7, 8, 11], "gradient": [0, 2], "return": [0, 1, 2, 3, 4, 8, 9, 10, 11], "constrain": [0, 2], "have": [0, 2, 6, 7, 9, 11], "onli": [0, 2, 6, 7, 9], "certain": [0, 2], "element": [0, 2], "nonzero": [0, 2, 9], "which": [0, 2, 3, 6, 7, 8, 9, 11], "time": [0, 2, 6, 8], "boolean": [0, 2], "valu": [0, 1, 2, 3, 8, 9], "triangular": [0, 2], "becaus": [0, 2, 6, 8, 9, 11], "note": [0, 9, 11], "current": 0, "support": [0, 11], "two_body_tensor": [0, 2, 8], "toler": [0, 2, 9], "defin": [0, 2, 9, 10], "maximum": [0, 2, 3, 10], "absolut": [0, 2], "differ": [0, 1, 2, 9], "between": [0, 1, 2, 9], "origin": [0, 2, 8], "correspond": [0, 2, 7, 8], "reconstruct": [0, 2], "int": [0, 1, 2, 3, 4, 8, 10], "limit": [0, 2, 9], "keep": [0, 2], "argument": [0, 2, 7], "overrid": [0, 2], "str": [0, 2], "see": [0, 2], "document": [0, 2], "possibl": [0, 2], "callback": [0, 2], "usag": [0, 2, 11], "dict": [0, 2, 9, 10], "mask": [0, 2], "modifi": [0, 2], "If": [0, 1, 2, 3, 11], "full": [0, 2, 6], "instead": [0, 2], "much": [0, 2, 5, 6], "more": [0, 2, 6, 9], "expens": [0, 2], "ignor": [0, 2, 8], "refer": [0, 2, 3, 9], "arxiv": [0, 2, 3], "1808": [0, 2], "02625": [0, 2], "2104": [0, 2], "08957": [0, 2], "properti": [0, 7], "norb": [0, 1, 3, 4, 6, 7, 8, 9, 10, 11], "spatial": [0, 1, 4, 6, 8, 9, 11], "to_number_represent": 0, "to_z_represent": 0, "fermionact": [0, 5], "action": [0, 1, 7, 11], "spin": [0, 1, 5, 6, 7, 9, 10, 11], "orb": [0, 11], "namedtupl": 0, "alia": 0, "field": 0, "fermionoper": [0, 5], "coeff": [0, 1], "repres": [0, 6, 9, 11], "linear": [0, 1, 2, 7, 11], "combin": [0, 1, 7, 11], "product": [0, 8, 11], "creation": [0, 7, 11], "annihil": [0, 11], "explan": 0, "how": [0, 6, 7, 8, 9, 10, 11], "exampl": [0, 6, 7, 9, 11], "import": [0, 6, 7, 8, 9, 10, 11], "op1": [0, 11], "cre_a": [0, 5, 11], "des_a": [0, 5, 11], "3": [0, 6, 7, 8, 9, 10, 11], "5": [0, 8, 9, 10, 11], "25": [0, 11], "cre_b": [0, 5, 11], "des_b": [0, 5, 11], "4": [0, 7, 8, 9, 10, 11], "1j": [0, 7, 8, 11], "2j": [0, 11], "op2": [0, 11], "25j": [0, 11], "5j": [0, 11], "125": [0, 11], "0625": [0, 11], "tupl": [0, 1, 2, 4, 8, 11], "complex": [0, 1, 2, 3], "conserves_particle_numb": [0, 11], "conserv": [0, 5, 6, 11], "particl": [0, 4, 5, 6, 7, 11], "otherwis": 0, "conserves_spin_z": [0, 11], "compon": [0, 5, 6, 11], "many_body_ord": 0, "mani": [0, 5], "order": [0, 6, 8, 9, 11], "length": [0, 6, 8, 9], "longest": 0, "contain": [0, 2, 9, 11], "normal_ord": [0, 11], "normal": [0, 11], "equival": 0, "ha": [0, 1, 2, 6, 7, 8, 9, 10], "been": [0, 10], "reorder": 0, "canon": 0, "In": [0, 7, 8, 9, 10, 11], "compris": [0, 11], "appear": [0, 11], "from": [0, 3, 6, 7, 9, 10, 11], "left": [0, 7, 11], "right": [0, 7, 11], "descend": [0, 11], "lexicograph": [0, 11], "That": [0, 7, 11], "all": [0, 9, 11], "befor": [0, 9, 11], "within": [0, 2, 11], "beta": [0, 1, 4, 6, 9, 11], "alpha": [0, 1, 4, 6, 9, 11], "hopgateansatzoper": [0, 5, 10], "interaction_pair": [0, 10], "theta": [0, 10], "hop": 0, "gate": [0, 9], "ansatz": [0, 5, 10], "moleculardata": [0, 5, 8, 9, 10], "nelec": [0, 1, 4, 6, 7, 8, 9, 10, 11], "core_energi": 0, "dipole_integr": 0, "orbital_symmetri": 0, "data": [0, 3, 8, 9, 10, 11], "electron": [0, 1, 3, 4, 6, 8], "core": [0, 2], "energi": [0, 7, 8, 9, 10], "dipol": 0, "integr": 0, "symmetri": [0, 5, 6, 7, 8, 9, 10], "from_hartree_fock": [0, 8, 9, 10], "hartree_fock": [0, 8, 9, 10], "active_spac": [0, 9, 10], "initi": [0, 3, 4, 8, 9, 10], "hartre": [0, 8, 9], "fock": [0, 8, 9], "calcul": [0, 6, 8, 9], "scf": [0, 8, 9, 10], "iter": 0, "list": [0, 1, 2, 4, 9, 10], "activ": [0, 9, 10], "space": [0, 9, 10], "molecularhamiltonian": [0, 5, 8], "call": [0, 6, 7, 8, 11], "supportsapplyunitari": [0, 5], "arg": 0, "kwarg": 0, "protocol": 0, "appli": [0, 1, 2, 6, 7, 8, 9], "vector": [0, 1, 2, 3, 6, 7, 9, 10, 11], "supportsapproximateequ": [0, 5], "compar": [0, 8], "approxim": [0, 2, 8], "supportslinearoper": [0, 5], "convert": [0, 1, 6, 7, 8, 11], "linearoper": [0, 1, 7, 8, 11], "supportstrac": [0, 5], "whose": [0, 2, 6], "trace": [0, 5, 8], "comput": [0, 2, 7, 9, 10], "ucjoper": [0, 5, 9], "diag_coulomb_mats_alpha_alpha": 0, "diag_coulomb_mats_alpha_beta": 0, "final_orbital_rot": 0, "cluster": [0, 5], "jastrow": [0, 5], "ucj": 0, "prod_": [0, 9], "k": [0, 2, 7, 8, 9, 11], "mathcal": [0, 1, 7, 8, 9], "w_k": [0, 9], "e": [0, 8, 9, 10, 11], "_k": [0, 8, 9], "dagger": [0, 1, 2, 7, 8, 9, 11], "mathbf": [0, 7, 8, 9], "n_": [0, 1, 6, 7, 8, 9], "commut": [0, 8, 9], "total": [0, 8, 9], "we": [0, 7, 8, 9, 10, 11], "enforc": [0, 9], "As": [0, 6, 7, 8, 9], "result": [0, 1, 2, 3, 7, 8, 9, 10], "describ": [0, 1, 6, 7, 8, 9, 11], "involv": [0, 9], "same": [0, 6, 9], "To": [0, 6, 7, 8, 9], "variat": [0, 9], "final": [0, 8, 9], "includ": [0, 2, 5, 6, 7, 8], "end": [0, 7, 9], "from_paramet": [0, 9], "param": 0, "n_rep": [0, 9, 10], "alpha_alpha_indic": [0, 9], "alpha_beta_indic": [0, 9], "with_final_orbital_rot": 0, "from_t_amplitud": [0, 9], "t2_amplitud": [0, 2], "t1_amplitud": 0, "t2": [0, 2, 3, 9], "t1": [0, 9], "amplitud": [0, 2, 3, 9], "repetit": [0, 9], "to_paramet": [0, 9], "to_t_amplitud": 0, "nocc": [0, 3], "possibli": 0, "apply_diag_coulomb_evolut": [0, 5, 8], "vec": [0, 1, 2, 6, 7, 8, 11], "mat": [0, 1, 2], "mat_alpha_beta": [0, 1], "occupations_a": [0, 1], "occupations_b": [0, 1], "strings_a": [0, 1], "strings_b": [0, 1], "orbital_rotation_index_a": 0, "orbital_rotation_index_b": 0, "copi": [0, 11], "evolut": [0, 8], "exp": [0, 7], "z_": [0, 1], "also": [0, 1, 7, 11], "given": [0, 1, 2, 7, 8], "place": [0, 1, 9, 11], "sum": [0, 1, 8, 10], "state": [0, 1, 3, 7, 8, 9, 10], "interact": [0, 1, 6], "occupi": [0, 1, 3, 4, 8], "string": [0, 1, 6, 11], "index": [0, 6, 9, 11], "alwai": [0, 2, 7], "newli": 0, "alloc": 0, "untouch": 0, "mai": [0, 2, 9], "still": [0, 9], "overwritten": 0, "evolv": [0, 8], "apply_fsim_g": [0, 5], "phi": 0, "target_orb": 0, "fsim": 0, "consist": 0, "tunnel": 0, "follow": [0, 6, 7, 8, 9, 11], "neg": 0, "sign": 0, "convent": 0, "angl": [0, 10], "nn": 0, "dagger_i": 0, "a_i": 0, "dagger_j": 0, "a_j": [0, 1], "when": [0, 8, 9, 11], "neighbor": 0, "qubit": [0, 9], "begin": [0, 7, 9], "pmatrix": 0, "co": [0, 10], "sin": [0, 10], "apply_givens_rot": [0, 5], "g": [0, 9], "apply_hop_g": [0, 5], "apply_num_interact": [0, 5], "apply_num_num_interact": [0, 5], "apply_num_op_prod_interact": [0, 5], "prod": 0, "sequenc": 0, "pair": [0, 4], "integ": 0, "give": [0, 7], "first": [0, 2, 7, 8, 9, 10], "second": [0, 2, 8, 10], "apply_num_op_sum_evolut": [0, 5, 7, 8], "lambda_i": [0, 1, 7], "rais": 0, "valueerror": 0, "must": [0, 2, 11], "dimension": [0, 2, 6], "apply_orbital_rot": [0, 5, 6, 7], "allow_row_permut": 0, "allow_col_permut": 0, "map": [0, 7, 11], "mapsto": [0, 7], "u_": 0, "ji": [0, 7], "log": 0, "permut": [0, 2], "row": [0, 6], "column": [0, 2, 6, 7], "wa": 0, "well": 0, "actual": [0, 7, 9], "effect": [0, 9], "apply_tunneling_interact": [0, 5], "apply_unitari": [0, 5, 9], "obj": 0, "ani": [0, 7, 9], "approx_eq": [0, 5], "other": [0, 9], "rtol": [0, 2], "05": [0, 2, 9], "atol": [0, 2], "equal": 0, "isclos": 0, "interpret": 0, "rel": [0, 2], "numer": [0, 2, 11], "up": [0, 7], "cre": [0, 5], "creat": [0, 6, 7, 8, 9, 11], "de": [0, 5], "destroi": [0, 11], "dim": [0, 3, 5, 6, 11], "get": [0, 7, 8, 9, 10], "dimens": [0, 3, 6], "fci": [0, 6, 9, 10], "dim_a": [0, 6], "dim_b": [0, 6], "expectation_one_body_pow": [0, 5], "one_rdm": 0, "power": 0, "expect": [0, 7], "w": [0, 7, 8], "slater": [0, 6, 7, 8], "determin": [0, 2, 6, 7, 8], "o": [0, 10], "m_": [0, 1, 2], "a_p": 0, "a_q": 0, "m": [0, 1, 2, 7], "let": [0, 8, 11], "lvert": [0, 9], "psi": [0, 9], "rangl": [0, 9], "Then": 0, "quantiti": 0, "langl": 0, "rvert": 0, "reduc": [0, 2], "densiti": 0, "expectation_one_body_product": [0, 5], "o_1": 0, "o_2": 0, "dot": 0, "o_k": 0, "hartree_fock_st": [0, 5, 8, 9], "statevector": [0, 6, 7], "indices_to_str": [0, 5], "bitstr": 0, "rang": [0, 6, 7, 8, 9], "011001": 0, "011010": 0, "011100": 0, "101001": 0, "101010": 0, "101100": 0, "110001": 0, "110010": 0, "110100": 0, "linear_oper": [0, 5, 8, 9, 10, 11], "multireference_st": [0, 5, 10], "ansatz_oper": 0, "reference_occup": [0, 10], "root": 0, "multirefer": 0, "occup": [0, 6, 7, 8], "desir": 0, "eigenvector": [0, 7], "lowest": [0, 7, 8], "one_hot": [0, 5], "shape": [0, 2, 3, 6, 9], "dtype": [0, 3, 9], "arrai": [0, 2, 6, 11], "zero": [0, 10], "except": 0, "hot": 0, "simulate_qdrift_double_factor": [0, 5], "n_step": [0, 8], "probabl": 0, "norm": 0, "n_sampl": 0, "seed": [0, 3, 4, 6, 7], "via": [0, 8], "qdrift": 0, "trotter": [0, 5], "step": [0, 7, 8], "sampl": [0, 3, 4], "els": [0, 3], "explicit": 0, "proport": [0, 7], "spectral": 0, "uniform": [0, 3], "requir": [0, 9], "whenev": 0, "complet": 0, "character": 0, "trajectori": 0, "pseudorandom": [0, 3, 4], "gener": [0, 3, 4, 5, 6, 7, 8, 9], "should": [0, 3, 4, 7, 8], "valid": [0, 3, 4], "input": [0, 1, 3, 4, 9], "random": [0, 4, 5, 6, 7, 11], "default_rng": [0, 3, 4], "numpi": [0, 2, 6, 7, 8, 9, 10], "just": [0, 8, 9], "simulate_trotter_double_factor": [0, 5, 8], "suzuki": 0, "formula": 0, "slater_determin": [0, 5, 6, 7], "occupied_orbit": [0, 6, 7], "configur": [0, 6], "word": [0, 9], "slater_determinant_one_rdm": [0, 5], "similarli": [0, 8], "construct": [1, 8, 9, 10, 11], "contract_diag_coulomb": [1, 5], "contract_num_op_sum": [1, 5], "diag_coulomb_linop": [1, 5], "implement": [1, 6, 7, 9], "num_op_sum_linop": [1, 5], "one_body_linop": [1, 5, 7], "algebra": [2, 11], "util": [2, 3, 4], "apply_matrix_to_slic": [2, 5], "target": 2, "slice": 2, "out": [2, 8], "double_factor": [2, 5], "ell": 2, "pk": 2, "qk": 2, "respect": 2, "too": 2, "small": [2, 9], "exce": [2, 9], "collect": 2, "double_factorized_t2": [2, 5], "t_": 2, "ijab": 2, "ap": 2, "ip": 2, "bq": 2, "jq": 2, "expm_multiply_taylor": [2, 5], "12": [2, 11], "expm": 2, "taylor": 2, "seri": 2, "expans": 2, "givens_decomposit": [2, 5], "is_antihermitian": [2, 5], "anti": [2, 3], "hermitian": [2, 3, 7], "is_hermitian": [2, 5], "is_orthogon": [2, 5], "orthogon": [2, 3], "union": 2, "bool_": 2, "is_real_symmetr": [2, 5], "is_special_orthogon": [2, 5], "special": [2, 3, 5, 6], "is_unitari": [2, 5], "lup": [2, 5], "pivot": 2, "lu": 2, "rtype": 2, "lower": 2, "unit": 2, "modified_choleski": [2, 5], "v_i": 2, "posit": [2, 10], "definit": 2, "No": 2, "check": [2, 7, 8], "verifi": 2, "1711": 2, "02242": 2, "assembl": 2, "reduced_matrix": [2, 5], "subspac": [2, 11], "span": 2, "some": [2, 8, 11], "v_j": 2, "random_antihermitian": [3, 5], "width": 3, "height": 3, "dype": 3, "random_hermitian": [3, 5, 7], "random_orthogon": [3, 5], "distribut": 3, "haar": 3, "measur": 3, "instanc": [3, 7, 8], "math": [3, 10], "ph": 3, "0609050": 3, "random_real_symmetric_matrix": [3, 5], "random_special_orthogon": [3, 5], "random_statevector": [3, 5, 11], "random_t2_amplitud": [3, 5], "random_two_body_tensor_r": [3, 5], "random_unitari": [3, 5, 6, 7], "random_nelec": [4, 5], "n_alpha": [4, 6, 7, 10], "n_beta": [4, 6, 7, 10], "random_occupied_orbit": [4, 5], "occ_a": 4, "occ_b": 4, "categori": 5, "chemistri": 5, "By": [5, 6], "exploit": 5, "algorithm": 5, "faster": 5, "introduct": 5, "quadrat": [5, 8], "local": 5, "lucj": 5, "entangl": 5, "forg": 5, "contract": [5, 7], "linalg": [5, 7, 8, 11], "test": [5, 7, 8], "advantag": 6, "effici": [6, 11], "level": [6, 8], "doe": [6, 11], "primari": 6, "wai": [6, 7, 9], "directli": [6, 8], "code": [6, 8, 9, 11], "show": [6, 7, 8, 9, 10, 11], "6": [6, 7, 8, 9, 10, 11], "1234": [6, 7], "rotated_vec": [6, 7], "plain": 6, "Its": 6, "fix": 6, "For": [6, 7, 9, 11], "system": [6, 7], "conveni": 6, "comb": 6, "assert": 6, "standard": 6, "often": [6, 9], "simpli": [6, 7], "reshap": 6, "reshaped_vec": 6, "choic": 6, "pyscf": [6, 8, 9, 10], "modul": 6, "tutori": [7, 8, 9, 10], "ffsim": [7, 8, 9, 10, 11], "fundament": 7, "mode": 7, "sum_j": 7, "new": [7, 11], "th": 7, "satisfi": [7, 11], "anticommut": 7, "relat": [7, 9], "thei": [7, 9, 11], "align": [7, 9], "_1": 7, "_2": 7, "section": 7, "ll": [7, 8, 9], "demonstr": [7, 8, 9], "task": 7, "consid": [7, 9], "rewritten": 7, "introduc": [7, 9], "eigendecomposit": 7, "sum_k": [7, 8], "lambda_k": 7, "ik": 7, "jk": 7, "our": [7, 8, 9], "ground": [7, 9], "pick": 7, "phase": 7, "spars": [7, 8, 11], "eig": [7, 11], "eigsh": 7, "la": 7, "fact": 7, "you": [7, 9], "illustr": 7, "purpos": 7, "explicitli": 7, "eigh": [7, 8], "evolved_vec": 7, "conj": 7, "undo": 7, "expected_phas": 7, "assert_allclos": 7, "mention": [7, 8], "abov": [7, 8, 11], "below": [7, 8, 9], "better": [7, 8], "evolved_vec_alt": 7, "daunt": 8, "scale": 8, "cell": [8, 9], "hydrogen": 8, "molecul": [8, 9, 10], "stretch": [8, 9], "bond": [8, 9, 10], "build": [8, 9, 10], "h2": 8, "mol": [8, 9, 10], "gto": [8, 9, 10], "mole": [8, 9, 10], "atom": [8, 9, 10], "8": [8, 9, 11], "sto": [8, 9, 10], "6g": [8, 9, 10], "d2h": [8, 9], "rhf": [8, 9, 10], "kernel": [8, 9, 10], "mol_data": [8, 9, 10], "mol_hamiltonian": [8, 9, 10], "df_hamiltonian": 8, "converg": [8, 9, 10], "837796382593709": 8, "dataclass": [8, 9], "print": [8, 9, 10, 11], "inform": [8, 11], "One": 8, "27478830e": 8, "01": [8, 9, 10], "52909490e": 8, "17": 8, "57029092e": 8, "77238770e": 8, "23173938e": 8, "58782168e": 8, "33545754e": 8, "49859013e": 8, "48240570e": 8, "83067333e": 8, "01841799e": 8, "53132024e": 8, "21318608e": 8, "00": [8, 10], "27383424e": 8, "16": [8, 9], "82879498e": 8, "07792507e": 8, "14653029e": 8, "27521846e": 8, "62": 8, "39236953e": 8, "32": 8, "52090881e": 8, "03": [8, 9, 10], "00000000e": 8, "7": [8, 11], "07106781e": 8, "27830444e": 8, "15": 8, "rest": 8, "although": 8, "alreadi": 8, "built": 8, "manual": 8, "asymmetr": 8, "basic": 8, "h_k": 8, "divid": 8, "singl": 8, "exponenti": 8, "individu": [8, 11], "do": [8, 11], "approx": 8, "prod_k": 8, "higher": 8, "deriv": 8, "write": 8, "recal": 8, "addit": [8, 11], "think": 8, "compos": 8, "def": [8, 9, 10], "simulate_trotter_step_double_factor": 8, "one_body_energi": 8, "one_body_basis_chang": 8, "zip": [8, 10], "finish": 8, "handl": 8, "split": 8, "multipl": [8, 11], "wrote": 8, "step_tim": 8, "match": 8, "initial_st": 8, "\u03c8": [8, 9, 10], "hf_energi": 8, "vdot": [8, 9, 10], "f": [8, 9, 10], "8377963825937084": 8, "now": 8, "later": 8, "exact_st": 8, "expm_multipli": 8, "tracea": 8, "fidel": 8, "ab": 8, "9696296369955066": 8, "final_st": [8, 9], "9990275744083494": 8, "improv": 8, "increas": [8, 9], "10": 8, "9999906233109686": 8, "commonli": 8, "known": 8, "fourth": 8, "reproduc": 8, "9": [8, 9, 10, 11], "fewer": 8, "9999999336740067": 8, "ethen": 9, "mcscf": [9, 10], "bond_dist": 9, "678": 9, "5626": 9, "c": 9, "9289": 9, "nelectron": 9, "ca": [9, 10], "casci": [9, 10], "nca": [9, 10], "neleca": [9, 10], "mo": [9, 10], "sort_mo": [9, 10], "energy_fci": [9, 10], "77": 9, "4456267643962": 9, "6290254326717": 9, "ci": [9, 10], "57322412553862": 9, "0000000": [9, 10], "phi_0": 9, "taken": 9, "express": 9, "previou": 9, "constructor": 9, "provid": 9, "truncat": 9, "ccsd": 9, "mp2": 9, "run": 9, "sinc": 9, "cc": 9, "frozen": 9, "nao_nr": 9, "reference_st": 9, "ansatz_st": [9, 10], "initiali": [9, 10], "49387212754471": 9, "e_corr": 9, "04824536314851448": 9, "46975600021672": 9, "facilit": 9, "convers": 9, "precis": 9, "somewhat": 9, "complic": 9, "short": 9, "entri": 9, "non": 9, "redund": 9, "associ": [9, 11], "evalu": [9, 10], "would": 9, "like": 9, "fun": [9, 10], "x": [9, 10], "x0": [9, 10], "maxfun": 9, "1000": 9, "len": [9, 10], "72": 9, "messag": [9, 10], "stop": 9, "NO": 9, "AND": 9, "success": [9, 10], "statu": [9, 10], "51577544983374": 9, "451e": 9, "878e": 9, "238e": 9, "006e": 9, "02": [9, 10], "nit": 9, "jac": 9, "988e": 9, "249e": 9, "389e": 9, "711e": 9, "nfev": [9, 10], "1168": 9, "njev": 9, "hess_inv": 9, "lt": 9, "72x72": 9, "lbfgsinvhessproduct": 9, "float64": 9, "gt": 9, "either": 9, "connect": 9, "swap": 9, "network": 9, "make": 9, "challeng": 9, "noisi": 9, "pre": 9, "fault": 9, "processor": 9, "idea": 9, "impos": 9, "sparsiti": 9, "constraint": 9, "them": 9, "depth": 9, "topologi": 9, "triangl": 9, "need": 9, "lattic": 9, "parallel": 9, "line": 9, "rung": 9, "ladder": 9, "With": 9, "setup": 9, "while": 9, "share": 9, "ldot": 9, "without": 9, "Of": 9, "cours": 9, "less": 9, "notic": 9, "decreas": 9, "46": 9, "45946564739053": 9, "765e": 9, "190e": 9, "784e": 9, "644e": 9, "646e": 9, "805e": 9, "137e": 9, "251e": 9, "04": 9, "1034": 9, "22": 9, "46x46": 9, "water": 10, "equilibrium": 10, "radius_1": 10, "958": 10, "radius_2": 10, "bond_angle_deg": 10, "104": 10, "478": 10, "h1_x": 10, "h2_x": 10, "180": 10, "h2_y": 10, "c2v": 10, "n_electron": 10, "mo_occ": 10, "75": 10, "6787887956297": 10, "7079508859773": 10, "14": 10, "3336207346502": 10, "reference_occupations_spati": 10, "68366174447618": 10, "cobyla": 10, "maxit": 10, "100": 10, "exceed": 10, "69448131020114": 10, "354e": 10, "651e": 10, "863e": 10, "095e": 10, "132e": 10, "maxcv": 10, "Such": 11, "programmat": 11, "dictionari": 11, "hash": 11, "tabl": 11, "three": 11, "piec": 11, "being": 11, "upon": 11, "intern": 11, "itself": 11, "recommend": 11, "helper": 11, "shown": 11, "repr": 11, "view": 11, "displai": 11, "39": 11, "0j": 11, "arithmet": 11, "multipli": 11, "scalar": 11, "go": 11, "op": 11, "op3": 11, "good": 11, "awar": 11, "especi": 11, "avoid": 11, "These": 11, "subtract": 11, "divis": 11, "3j": 11, "6j": 11, "4j": 11, "12j": 11, "preserv": 11, "far": 11, "criteria": 11, "op4": 11, "linop": 11, "onto": 11, "04860684": 11, "04058205j": 11, "most": 11, "lm": 11, "21984743e": 11, "18j": 11}, "objects": {"": [[0, 0, 0, "-", "ffsim"]], "ffsim": [[0, 1, 1, "", "DoubleFactorizedHamiltonian"], [0, 1, 1, "", "FermionAction"], [0, 1, 1, "", "FermionOperator"], [0, 1, 1, "", "HopGateAnsatzOperator"], [0, 1, 1, "", "MolecularData"], [0, 1, 1, "", "MolecularHamiltonian"], [0, 1, 1, "", "SupportsApplyUnitary"], [0, 1, 1, "", "SupportsApproximateEquality"], [0, 1, 1, "", "SupportsLinearOperator"], [0, 1, 1, "", "SupportsTrace"], [0, 1, 1, "", "UCJOperator"], [0, 5, 1, "", "apply_diag_coulomb_evolution"], [0, 5, 1, "", "apply_fsim_gate"], [0, 5, 1, "", "apply_givens_rotation"], [0, 5, 1, "", "apply_hop_gate"], [0, 5, 1, "", "apply_num_interaction"], [0, 5, 1, "", "apply_num_num_interaction"], [0, 5, 1, "", "apply_num_op_prod_interaction"], [0, 5, 1, "", "apply_num_op_sum_evolution"], [0, 5, 1, "", "apply_orbital_rotation"], [0, 5, 1, "", "apply_tunneling_interaction"], [0, 5, 1, "", "apply_unitary"], [0, 5, 1, "", "approx_eq"], [1, 0, 0, "-", "contract"], [0, 5, 1, "", "cre"], [0, 5, 1, "", "cre_a"], [0, 5, 1, "", "cre_b"], [0, 5, 1, "", "des"], [0, 5, 1, "", "des_a"], [0, 5, 1, "", "des_b"], [0, 5, 1, "", "dim"], [0, 5, 1, "", "dims"], [0, 5, 1, "", "expectation_one_body_power"], [0, 5, 1, "", "expectation_one_body_product"], [0, 5, 1, "", "hartree_fock_state"], [0, 5, 1, "", "indices_to_strings"], [2, 0, 0, "-", "linalg"], [0, 5, 1, "", "linear_operator"], [0, 5, 1, "", "multireference_state"], [0, 5, 1, "", "one_hot"], [3, 0, 0, "-", "random"], [0, 5, 1, "", "simulate_qdrift_double_factorized"], [0, 5, 1, "", "simulate_trotter_double_factorized"], [0, 5, 1, "", "slater_determinant"], [0, 5, 1, "", "slater_determinant_one_rdm"], [4, 0, 0, "-", "testing"], [0, 5, 1, "", "trace"]], "ffsim.DoubleFactorizedHamiltonian": [[0, 2, 1, "", "constant"], [0, 2, 1, "", "diag_coulomb_mats"], [0, 3, 1, "", "from_molecular_hamiltonian"], [0, 4, 1, "", "norb"], [0, 2, 1, "", "one_body_tensor"], [0, 2, 1, "", "orbital_rotations"], [0, 3, 1, "", "to_number_representation"], [0, 3, 1, "", "to_z_representation"], [0, 2, 1, "", "z_representation"]], "ffsim.FermionAction": [[0, 2, 1, "", "action"], [0, 2, 1, "", "orb"], [0, 2, 1, "", "spin"]], "ffsim.FermionOperator": [[0, 3, 1, "", "conserves_particle_number"], [0, 3, 1, "", "conserves_spin_z"], [0, 3, 1, "", "many_body_order"], [0, 3, 1, "", "normal_ordered"]], "ffsim.MolecularData": [[0, 2, 1, "", "core_energy"], [0, 2, 1, "", "dipole_integrals"], [0, 3, 1, "", "from_hartree_fock"], [0, 4, 1, "", "hamiltonian"], [0, 2, 1, "", "nelec"], [0, 2, 1, "", "norb"], [0, 2, 1, "", "one_body_tensor"], [0, 2, 1, "", "orbital_symmetries"], [0, 2, 1, "", "two_body_tensor"]], "ffsim.MolecularHamiltonian": [[0, 2, 1, "", "constant"], [0, 4, 1, "", "norb"], [0, 2, 1, "", "one_body_tensor"], [0, 2, 1, "", "two_body_tensor"]], "ffsim.UCJOperator": [[0, 2, 1, "", "diag_coulomb_mats_alpha_alpha"], [0, 2, 1, "", "diag_coulomb_mats_alpha_beta"], [0, 2, 1, "", "final_orbital_rotation"], [0, 3, 1, "", "from_parameters"], [0, 3, 1, "", "from_t_amplitudes"], [0, 4, 1, "", "n_reps"], [0, 4, 1, "", "norb"], [0, 2, 1, "", "orbital_rotations"], [0, 3, 1, "", "to_parameters"], [0, 3, 1, "", "to_t_amplitudes"]], "ffsim.contract": [[1, 5, 1, "", "contract_diag_coulomb"], [1, 5, 1, "", "contract_num_op_sum"], [1, 5, 1, "", "diag_coulomb_linop"], [1, 5, 1, "", "num_op_sum_linop"], [1, 5, 1, "", "one_body_linop"]], "ffsim.linalg": [[2, 5, 1, "", "apply_matrix_to_slices"], [2, 5, 1, "", "double_factorized"], [2, 5, 1, "", "double_factorized_t2"], [2, 5, 1, "", "expm_multiply_taylor"], [2, 5, 1, "", "givens_decomposition"], [2, 5, 1, "", "is_antihermitian"], [2, 5, 1, "", "is_hermitian"], [2, 5, 1, "", "is_orthogonal"], [2, 5, 1, "", "is_real_symmetric"], [2, 5, 1, "", "is_special_orthogonal"], [2, 5, 1, "", "is_unitary"], [2, 5, 1, "", "lup"], [2, 5, 1, "", "modified_cholesky"], [2, 5, 1, "", "reduced_matrix"]], "ffsim.random": [[3, 5, 1, "", "random_antihermitian"], [3, 5, 1, "", "random_hermitian"], [3, 5, 1, "", "random_orthogonal"], [3, 5, 1, "", "random_real_symmetric_matrix"], [3, 5, 1, "", "random_special_orthogonal"], [3, 5, 1, "", "random_statevector"], [3, 5, 1, "", "random_t2_amplitudes"], [3, 5, 1, "", "random_two_body_tensor_real"], [3, 5, 1, "", "random_unitary"]], "ffsim.testing": [[4, 5, 1, "", "random_nelec"], [4, 5, 1, "", "random_occupied_orbitals"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"]}, "titleterms": {"ffsim": [0, 1, 2, 3, 4, 5, 6], "contract": 1, "linalg": 2, "random": 3, "test": 4, "welcom": 5, "": 5, "document": 5, "tutori": 5, "api": 5, "refer": 5, "introduct": 6, "orbit": 7, "rotat": 7, "quadrat": 7, "hamiltonian": [7, 8], "time": 7, "evolut": 7, "diagon": 8, "coulomb": 8, "oper": 8, "doubl": 8, "factor": 8, "trotter": 8, "simul": 8, "represent": 8, "molecular": 8, "brief": 8, "background": 8, "suzuki": 8, "formula": 8, "implement": 8, "The": [9, 11], "local": 9, "unitari": 9, "cluster": 9, "jastrow": 9, "lucj": 9, "ansatz": 9, "ucj": 9, "entangl": 10, "forg": 10, "fermionoper": 11, "class": 11}, "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": [[0, "module-ffsim"]], "ffsim.contract": [[1, "module-ffsim.contract"]], "ffsim.linalg": [[2, "module-ffsim.linalg"]], "ffsim.random": [[3, "module-ffsim.random"]], "ffsim.testing": [[4, "module-ffsim.testing"]], "Welcome to ffsim\u2019s documentation!": [[5, "welcome-to-ffsim-s-documentation"]], "Tutorials": [[5, "tutorials"]], "API Reference": [[5, "api-reference"]], "Introduction to ffsim": [[6, "Introduction-to-ffsim"]], "Orbital rotations and quadratic Hamiltonians": [[7, "Orbital-rotations-and-quadratic-Hamiltonians"]], "Orbital rotations": [[7, "Orbital-rotations"]], "Time evolution by a quadratic Hamiltonian": [[7, "Time-evolution-by-a-quadratic-Hamiltonian"]], "Diagonal Coulomb operators and double-factorized Trotter simulation": [[8, "Diagonal-Coulomb-operators-and-double-factorized-Trotter-simulation"]], "Double-factorized representation of the molecular Hamiltonian": [[8, "Double-factorized-representation-of-the-molecular-Hamiltonian"]], "Trotter simulation of the double-factorized Hamiltonian": [[8, "Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "Brief background on Trotter-Suzuki formulas": [[8, "Brief-background-on-Trotter-Suzuki-formulas"]], "Implementing Trotter simulation of the double-factorized Hamiltonian": [[8, "Implementing-Trotter-simulation-of-the-double-factorized-Hamiltonian"]], "The local unitary cluster Jastrow (LUCJ) ansatz": [[9, "The-local-unitary-cluster-Jastrow-(LUCJ)-ansatz"], [9, "id1"]], "The unitary cluster Jastrow (UCJ) ansatz": [[9, "The-unitary-cluster-Jastrow-(UCJ)-ansatz"]], "Entanglement forging": [[10, "Entanglement-forging"]], "The FermionOperator class": [[11, "The-FermionOperator-class"]]}, "indexentries": {"doublefactorizedhamiltonian (class in ffsim)": [[0, "ffsim.DoubleFactorizedHamiltonian"]], "fermionaction (class in ffsim)": [[0, "ffsim.FermionAction"]], "fermionoperator (class in ffsim)": [[0, "ffsim.FermionOperator"]], "hopgateansatzoperator (class in ffsim)": [[0, "ffsim.HopGateAnsatzOperator"]], "moleculardata (class in ffsim)": [[0, "ffsim.MolecularData"]], "molecularhamiltonian (class in ffsim)": [[0, "ffsim.MolecularHamiltonian"]], "supportsapplyunitary (class in ffsim)": [[0, "ffsim.SupportsApplyUnitary"]], "supportsapproximateequality (class in ffsim)": [[0, "ffsim.SupportsApproximateEquality"]], "supportslinearoperator (class in ffsim)": [[0, "ffsim.SupportsLinearOperator"]], "supportstrace (class in ffsim)": [[0, "ffsim.SupportsTrace"]], "ucjoperator (class in ffsim)": [[0, "ffsim.UCJOperator"]], "action (ffsim.fermionaction attribute)": [[0, "ffsim.FermionAction.action"]], "apply_diag_coulomb_evolution() (in module ffsim)": [[0, "ffsim.apply_diag_coulomb_evolution"]], "apply_fsim_gate() (in module ffsim)": [[0, "ffsim.apply_fsim_gate"]], "apply_givens_rotation() (in module ffsim)": [[0, "ffsim.apply_givens_rotation"]], "apply_hop_gate() (in module ffsim)": [[0, "ffsim.apply_hop_gate"]], "apply_num_interaction() (in module ffsim)": [[0, "ffsim.apply_num_interaction"]], "apply_num_num_interaction() (in module ffsim)": [[0, "ffsim.apply_num_num_interaction"]], "apply_num_op_prod_interaction() (in module ffsim)": [[0, "ffsim.apply_num_op_prod_interaction"]], "apply_num_op_sum_evolution() (in module ffsim)": [[0, "ffsim.apply_num_op_sum_evolution"]], "apply_orbital_rotation() (in module ffsim)": [[0, "ffsim.apply_orbital_rotation"]], "apply_tunneling_interaction() (in module ffsim)": [[0, "ffsim.apply_tunneling_interaction"]], "apply_unitary() (in module ffsim)": [[0, "ffsim.apply_unitary"]], "approx_eq() (in module ffsim)": [[0, "ffsim.approx_eq"]], "conserves_particle_number() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.conserves_particle_number"]], "conserves_spin_z() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.conserves_spin_z"]], "constant (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.constant"]], "constant (ffsim.molecularhamiltonian attribute)": [[0, "ffsim.MolecularHamiltonian.constant"]], "core_energy (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.core_energy"]], "cre() (in module ffsim)": [[0, "ffsim.cre"]], "cre_a() (in module ffsim)": [[0, "ffsim.cre_a"]], "cre_b() (in module ffsim)": [[0, "ffsim.cre_b"]], "des() (in module ffsim)": [[0, "ffsim.des"]], "des_a() (in module ffsim)": [[0, "ffsim.des_a"]], "des_b() (in module ffsim)": [[0, "ffsim.des_b"]], "diag_coulomb_mats (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.diag_coulomb_mats"]], "diag_coulomb_mats_alpha_alpha (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.diag_coulomb_mats_alpha_alpha"]], "diag_coulomb_mats_alpha_beta (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.diag_coulomb_mats_alpha_beta"]], "dim() (in module ffsim)": [[0, "ffsim.dim"]], "dims() (in module ffsim)": [[0, "ffsim.dims"]], "dipole_integrals (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.dipole_integrals"]], "expectation_one_body_power() (in module ffsim)": [[0, "ffsim.expectation_one_body_power"]], "expectation_one_body_product() (in module ffsim)": [[0, "ffsim.expectation_one_body_product"]], "ffsim": [[0, "module-ffsim"]], "final_orbital_rotation (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.final_orbital_rotation"]], "from_hartree_fock() (ffsim.moleculardata static method)": [[0, "ffsim.MolecularData.from_hartree_fock"]], "from_molecular_hamiltonian() (ffsim.doublefactorizedhamiltonian static method)": [[0, "ffsim.DoubleFactorizedHamiltonian.from_molecular_hamiltonian"]], "from_parameters() (ffsim.ucjoperator static method)": [[0, "ffsim.UCJOperator.from_parameters"]], "from_t_amplitudes() (ffsim.ucjoperator static method)": [[0, "ffsim.UCJOperator.from_t_amplitudes"]], "hamiltonian (ffsim.moleculardata property)": [[0, "ffsim.MolecularData.hamiltonian"]], "hartree_fock_state() (in module ffsim)": [[0, "ffsim.hartree_fock_state"]], "indices_to_strings() (in module ffsim)": [[0, "ffsim.indices_to_strings"]], "linear_operator() (in module ffsim)": [[0, "ffsim.linear_operator"]], "many_body_order() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.many_body_order"]], "module": [[0, "module-ffsim"], [1, "module-ffsim.contract"], [2, "module-ffsim.linalg"], [3, "module-ffsim.random"], [4, "module-ffsim.testing"]], "multireference_state() (in module ffsim)": [[0, "ffsim.multireference_state"]], "n_reps (ffsim.ucjoperator property)": [[0, "ffsim.UCJOperator.n_reps"]], "nelec (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.nelec"]], "norb (ffsim.doublefactorizedhamiltonian property)": [[0, "ffsim.DoubleFactorizedHamiltonian.norb"]], "norb (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.norb"]], "norb (ffsim.molecularhamiltonian property)": [[0, "ffsim.MolecularHamiltonian.norb"]], "norb (ffsim.ucjoperator property)": [[0, "ffsim.UCJOperator.norb"]], "normal_ordered() (ffsim.fermionoperator method)": [[0, "ffsim.FermionOperator.normal_ordered"]], "one_body_tensor (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.one_body_tensor"]], "one_body_tensor (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.one_body_tensor"]], "one_body_tensor (ffsim.molecularhamiltonian attribute)": [[0, "ffsim.MolecularHamiltonian.one_body_tensor"]], "one_hot() (in module ffsim)": [[0, "ffsim.one_hot"]], "orb (ffsim.fermionaction attribute)": [[0, "ffsim.FermionAction.orb"]], "orbital_rotations (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.orbital_rotations"]], "orbital_rotations (ffsim.ucjoperator attribute)": [[0, "ffsim.UCJOperator.orbital_rotations"]], "orbital_symmetries (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.orbital_symmetries"]], "simulate_qdrift_double_factorized() (in module ffsim)": [[0, "ffsim.simulate_qdrift_double_factorized"]], "simulate_trotter_double_factorized() (in module ffsim)": [[0, "ffsim.simulate_trotter_double_factorized"]], "slater_determinant() (in module ffsim)": [[0, "ffsim.slater_determinant"]], "slater_determinant_one_rdm() (in module ffsim)": [[0, "ffsim.slater_determinant_one_rdm"]], "spin (ffsim.fermionaction attribute)": [[0, "ffsim.FermionAction.spin"]], "to_number_representation() (ffsim.doublefactorizedhamiltonian method)": [[0, "ffsim.DoubleFactorizedHamiltonian.to_number_representation"]], "to_parameters() (ffsim.ucjoperator method)": [[0, "ffsim.UCJOperator.to_parameters"]], "to_t_amplitudes() (ffsim.ucjoperator method)": [[0, "ffsim.UCJOperator.to_t_amplitudes"]], "to_z_representation() (ffsim.doublefactorizedhamiltonian method)": [[0, "ffsim.DoubleFactorizedHamiltonian.to_z_representation"]], "trace() (in module ffsim)": [[0, "ffsim.trace"]], "two_body_tensor (ffsim.moleculardata attribute)": [[0, "ffsim.MolecularData.two_body_tensor"]], "two_body_tensor (ffsim.molecularhamiltonian attribute)": [[0, "ffsim.MolecularHamiltonian.two_body_tensor"]], "z_representation (ffsim.doublefactorizedhamiltonian attribute)": [[0, "ffsim.DoubleFactorizedHamiltonian.z_representation"]], "contract_diag_coulomb() (in module ffsim.contract)": [[1, "ffsim.contract.contract_diag_coulomb"]], "contract_num_op_sum() (in module ffsim.contract)": [[1, "ffsim.contract.contract_num_op_sum"]], "diag_coulomb_linop() (in module ffsim.contract)": [[1, "ffsim.contract.diag_coulomb_linop"]], "ffsim.contract": [[1, "module-ffsim.contract"]], "num_op_sum_linop() (in module ffsim.contract)": [[1, "ffsim.contract.num_op_sum_linop"]], "one_body_linop() (in module ffsim.contract)": [[1, "ffsim.contract.one_body_linop"]], "apply_matrix_to_slices() (in module ffsim.linalg)": [[2, "ffsim.linalg.apply_matrix_to_slices"]], "double_factorized() (in module ffsim.linalg)": [[2, "ffsim.linalg.double_factorized"]], "double_factorized_t2() (in module ffsim.linalg)": [[2, "ffsim.linalg.double_factorized_t2"]], "expm_multiply_taylor() (in module ffsim.linalg)": [[2, "ffsim.linalg.expm_multiply_taylor"]], "ffsim.linalg": [[2, "module-ffsim.linalg"]], "givens_decomposition() (in module ffsim.linalg)": [[2, "ffsim.linalg.givens_decomposition"]], "is_antihermitian() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_antihermitian"]], "is_hermitian() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_hermitian"]], "is_orthogonal() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_orthogonal"]], "is_real_symmetric() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_real_symmetric"]], "is_special_orthogonal() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_special_orthogonal"]], "is_unitary() (in module ffsim.linalg)": [[2, "ffsim.linalg.is_unitary"]], "lup() (in module ffsim.linalg)": [[2, "ffsim.linalg.lup"]], "modified_cholesky() (in module ffsim.linalg)": [[2, "ffsim.linalg.modified_cholesky"]], "reduced_matrix() (in module ffsim.linalg)": [[2, "ffsim.linalg.reduced_matrix"]], "ffsim.random": [[3, "module-ffsim.random"]], "random_antihermitian() (in module ffsim.random)": [[3, "ffsim.random.random_antihermitian"]], "random_hermitian() (in module ffsim.random)": [[3, "ffsim.random.random_hermitian"]], "random_orthogonal() (in module ffsim.random)": [[3, "ffsim.random.random_orthogonal"]], "random_real_symmetric_matrix() (in module ffsim.random)": [[3, "ffsim.random.random_real_symmetric_matrix"]], "random_special_orthogonal() (in module ffsim.random)": [[3, "ffsim.random.random_special_orthogonal"]], "random_statevector() (in module ffsim.random)": [[3, "ffsim.random.random_statevector"]], "random_t2_amplitudes() (in module ffsim.random)": [[3, "ffsim.random.random_t2_amplitudes"]], "random_two_body_tensor_real() (in module ffsim.random)": [[3, "ffsim.random.random_two_body_tensor_real"]], "random_unitary() (in module ffsim.random)": [[3, "ffsim.random.random_unitary"]], "ffsim.testing": [[4, "module-ffsim.testing"]], "random_nelec() (in module ffsim.testing)": [[4, "ffsim.testing.random_nelec"]], "random_occupied_orbitals() (in module ffsim.testing)": [[4, "ffsim.testing.random_occupied_orbitals"]]}}) \ No newline at end of file diff --git a/tutorials/01-introduction.ipynb b/tutorials/01-introduction.ipynb index d5ba19349..3797ae9e6 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-27T02:10:56.876770Z", - "iopub.status.busy": "2023-10-27T02:10:56.876313Z", - "iopub.status.idle": "2023-10-27T02:10:57.234710Z", - "shell.execute_reply": "2023-10-27T02:10:57.233997Z" + "iopub.execute_input": "2023-10-27T03:04:57.255539Z", + "iopub.status.busy": "2023-10-27T03:04:57.255034Z", + "iopub.status.idle": "2023-10-27T03:04:57.653213Z", + "shell.execute_reply": "2023-10-27T03:04:57.652569Z" } }, "outputs": [], @@ -62,10 +62,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:57.238646Z", - "iopub.status.busy": "2023-10-27T02:10:57.238253Z", - "iopub.status.idle": "2023-10-27T02:10:57.243775Z", - "shell.execute_reply": "2023-10-27T02:10:57.243164Z" + "iopub.execute_input": "2023-10-27T03:04:57.657905Z", + "iopub.status.busy": "2023-10-27T03:04:57.656590Z", + "iopub.status.idle": "2023-10-27T03:04:57.662682Z", + "shell.execute_reply": "2023-10-27T03:04:57.662136Z" } }, "outputs": [], @@ -93,10 +93,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:57.246706Z", - "iopub.status.busy": "2023-10-27T02:10:57.246424Z", - "iopub.status.idle": "2023-10-27T02:10:57.250646Z", - "shell.execute_reply": "2023-10-27T02:10:57.250044Z" + "iopub.execute_input": "2023-10-27T03:04:57.667736Z", + "iopub.status.busy": "2023-10-27T03:04:57.666400Z", + "iopub.status.idle": "2023-10-27T03:04:57.671189Z", + "shell.execute_reply": "2023-10-27T03:04:57.670658Z" } }, "outputs": [], diff --git a/tutorials/02-orbital-rotation.ipynb b/tutorials/02-orbital-rotation.ipynb index f9f1f6346..7699c0f29 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-27T02:10:58.972368Z", - "iopub.status.busy": "2023-10-27T02:10:58.971701Z", - "iopub.status.idle": "2023-10-27T02:10:59.327235Z", - "shell.execute_reply": "2023-10-27T02:10:59.326526Z" + "iopub.execute_input": "2023-10-27T03:04:59.630059Z", + "iopub.status.busy": "2023-10-27T03:04:59.629560Z", + "iopub.status.idle": "2023-10-27T03:05:00.024476Z", + "shell.execute_reply": "2023-10-27T03:05:00.023597Z" } }, "outputs": [], @@ -111,10 +111,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:59.331910Z", - "iopub.status.busy": "2023-10-27T02:10:59.331556Z", - "iopub.status.idle": "2023-10-27T02:10:59.363811Z", - "shell.execute_reply": "2023-10-27T02:10:59.363117Z" + "iopub.execute_input": "2023-10-27T03:05:00.028824Z", + "iopub.status.busy": "2023-10-27T03:05:00.028106Z", + "iopub.status.idle": "2023-10-27T03:05:00.061962Z", + "shell.execute_reply": "2023-10-27T03:05:00.061268Z" } }, "outputs": [], @@ -158,10 +158,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:59.367924Z", - "iopub.status.busy": "2023-10-27T02:10:59.367666Z", - "iopub.status.idle": "2023-10-27T02:10:59.380003Z", - "shell.execute_reply": "2023-10-27T02:10:59.379403Z" + "iopub.execute_input": "2023-10-27T03:05:00.067442Z", + "iopub.status.busy": "2023-10-27T03:05:00.066016Z", + "iopub.status.idle": "2023-10-27T03:05:00.079662Z", + "shell.execute_reply": "2023-10-27T03:05:00.079034Z" } }, "outputs": [], @@ -201,10 +201,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:10:59.383243Z", - "iopub.status.busy": "2023-10-27T02:10:59.382787Z", - "iopub.status.idle": "2023-10-27T02:10:59.387977Z", - "shell.execute_reply": "2023-10-27T02:10:59.387405Z" + "iopub.execute_input": "2023-10-27T03:05:00.084489Z", + "iopub.status.busy": "2023-10-27T03:05:00.083296Z", + "iopub.status.idle": "2023-10-27T03:05:00.090411Z", + "shell.execute_reply": "2023-10-27T03:05:00.089817Z" } }, "outputs": [], diff --git a/tutorials/03-double-factorized.ipynb b/tutorials/03-double-factorized.ipynb index 793d55de6..c061160c4 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-27T02:11:01.239526Z", - "iopub.status.busy": "2023-10-27T02:11:01.239298Z", - "iopub.status.idle": "2023-10-27T02:11:01.672486Z", - "shell.execute_reply": "2023-10-27T02:11:01.671867Z" + "iopub.execute_input": "2023-10-27T03:05:01.960181Z", + "iopub.status.busy": "2023-10-27T03:05:01.959717Z", + "iopub.status.idle": "2023-10-27T03:05:02.404039Z", + "shell.execute_reply": "2023-10-27T03:05:02.403342Z" } }, "outputs": [ @@ -92,10 +92,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.676217Z", - "iopub.status.busy": "2023-10-27T02:11:01.675393Z", - "iopub.status.idle": "2023-10-27T02:11:01.682498Z", - "shell.execute_reply": "2023-10-27T02:11:01.681935Z" + "iopub.execute_input": "2023-10-27T03:05:02.408011Z", + "iopub.status.busy": "2023-10-27T03:05:02.407295Z", + "iopub.status.idle": "2023-10-27T03:05:02.417935Z", + "shell.execute_reply": "2023-10-27T03:05:02.417313Z" } }, "outputs": [ @@ -226,10 +226,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.685379Z", - "iopub.status.busy": "2023-10-27T02:11:01.684954Z", - "iopub.status.idle": "2023-10-27T02:11:01.690254Z", - "shell.execute_reply": "2023-10-27T02:11:01.689707Z" + "iopub.execute_input": "2023-10-27T03:05:02.423483Z", + "iopub.status.busy": "2023-10-27T03:05:02.421763Z", + "iopub.status.idle": "2023-10-27T03:05:02.431334Z", + "shell.execute_reply": "2023-10-27T03:05:02.430699Z" } }, "outputs": [], @@ -284,10 +284,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.693242Z", - "iopub.status.busy": "2023-10-27T02:11:01.692815Z", - "iopub.status.idle": "2023-10-27T02:11:01.697021Z", - "shell.execute_reply": "2023-10-27T02:11:01.696463Z" + "iopub.execute_input": "2023-10-27T03:05:02.434936Z", + "iopub.status.busy": "2023-10-27T03:05:02.434685Z", + "iopub.status.idle": "2023-10-27T03:05:02.439093Z", + "shell.execute_reply": "2023-10-27T03:05:02.438396Z" } }, "outputs": [], @@ -324,10 +324,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.798461Z", - "iopub.status.busy": "2023-10-27T02:11:01.797539Z", - "iopub.status.idle": "2023-10-27T02:11:01.804011Z", - "shell.execute_reply": "2023-10-27T02:11:01.803354Z" + "iopub.execute_input": "2023-10-27T03:05:02.559009Z", + "iopub.status.busy": "2023-10-27T03:05:02.558102Z", + "iopub.status.idle": "2023-10-27T03:05:02.564371Z", + "shell.execute_reply": "2023-10-27T03:05:02.563761Z" } }, "outputs": [ @@ -363,10 +363,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.807404Z", - "iopub.status.busy": "2023-10-27T02:11:01.806733Z", - "iopub.status.idle": "2023-10-27T02:11:01.818517Z", - "shell.execute_reply": "2023-10-27T02:11:01.817866Z" + "iopub.execute_input": "2023-10-27T03:05:02.567736Z", + "iopub.status.busy": "2023-10-27T03:05:02.567083Z", + "iopub.status.idle": "2023-10-27T03:05:02.584110Z", + "shell.execute_reply": "2023-10-27T03:05:02.583071Z" } }, "outputs": [ @@ -405,10 +405,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.821521Z", - "iopub.status.busy": "2023-10-27T02:11:01.821296Z", - "iopub.status.idle": "2023-10-27T02:11:01.831674Z", - "shell.execute_reply": "2023-10-27T02:11:01.831110Z" + "iopub.execute_input": "2023-10-27T03:05:02.587264Z", + "iopub.status.busy": "2023-10-27T03:05:02.586808Z", + "iopub.status.idle": "2023-10-27T03:05:02.600814Z", + "shell.execute_reply": "2023-10-27T03:05:02.599564Z" } }, "outputs": [ @@ -446,10 +446,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.835578Z", - "iopub.status.busy": "2023-10-27T02:11:01.835146Z", - "iopub.status.idle": "2023-10-27T02:11:01.879635Z", - "shell.execute_reply": "2023-10-27T02:11:01.878876Z" + "iopub.execute_input": "2023-10-27T03:05:02.604427Z", + "iopub.status.busy": "2023-10-27T03:05:02.603969Z", + "iopub.status.idle": "2023-10-27T03:05:02.648867Z", + "shell.execute_reply": "2023-10-27T03:05:02.648260Z" } }, "outputs": [ @@ -457,14 +457,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Fidelity of Trotter-evolved state with exact state: 0.9999906233109686" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" + "Fidelity of Trotter-evolved state with exact state: 0.9999906233109686\n" ] } ], @@ -496,10 +489,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.882831Z", - "iopub.status.busy": "2023-10-27T02:11:01.882543Z", - "iopub.status.idle": "2023-10-27T02:11:01.913639Z", - "shell.execute_reply": "2023-10-27T02:11:01.913025Z" + "iopub.execute_input": "2023-10-27T03:05:02.654063Z", + "iopub.status.busy": "2023-10-27T03:05:02.652939Z", + "iopub.status.idle": "2023-10-27T03:05:02.679846Z", + "shell.execute_reply": "2023-10-27T03:05:02.679254Z" } }, "outputs": [ @@ -538,10 +531,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2023-10-27T02:11:01.916639Z", - "iopub.status.busy": "2023-10-27T02:11:01.916394Z", - "iopub.status.idle": "2023-10-27T02:11:01.932237Z", - "shell.execute_reply": "2023-10-27T02:11:01.931529Z" + "iopub.execute_input": "2023-10-27T03:05:02.684588Z", + "iopub.status.busy": "2023-10-27T03:05:02.683495Z", + "iopub.status.idle": "2023-10-27T03:05:02.697257Z", + "shell.execute_reply": "2023-10-27T03:05:02.696649Z" } }, "outputs": [ diff --git a/tutorials/04-lucj.html b/tutorials/04-lucj.html index 398083bbb..63957239b 100644 --- a/tutorials/04-lucj.html +++ b/tutorials/04-lucj.html @@ -95,8 +95,8 @@
-converged SCF energy = -77.4456267643961
-CASCI E = -77.6290254326717 E(CI) = -3.57322412553863 S^2 = 0.0000000
+converged SCF energy = -77.4456267643962
+CASCI E = -77.6290254326717 E(CI) = -3.57322412553862 S^2 = 0.0000000
-E(CCSD) = -77.49387212754469 E_corr = -0.0482453631485175
-Energy at initialialization: -77.46975600021719
+E(CCSD) = -77.49387212754471 E_corr = -0.04824536314851448
+Energy at initialialization: -77.46975600021672
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.)
-Energy at initialialization: -75.6836617444762
+Energy at initialialization: -75.68366174447618
FermionOperator({ (cre_a(3), des_a(0)): -0.25, - (cre_b(1), des_b(5), cre_a(4)): 1+1j, - (cre_a(0), des_a(3)): 0.5 + (cre_a(0), des_a(3)): 0.5, + (cre_b(1), des_b(5), cre_a(4)): 1+1j })@@ -99,7 +99,7 @@
-'FermionOperator({((True, False, 3), (False, False, 0)): -0.25+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j, ((True, False, 0), (False, False, 3)): 0.5+0j})'
+'FermionOperator({((True, False, 3), (False, False, 0)): -0.25+0j, ((True, False, 0), (False, False, 3)): 0.5+0j, ((True, True, 1), (False, True, 5), (True, False, 4)): 1+1j})'
FermionOperators support arithmetic operations. Note that when multiplying a FermionOperator by a scalar, the scalar must go on the left, i.e. 2 * op
and not op * 2
.
FermionOperator({ (cre_a(3), des_a(0), cre_b(2)): 0-0.25j, - (cre_a(0), des_a(3), cre_b(2)): 0+0.5j, - (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)): 2+2j, + (cre_b(2)): 0-0.25j, (cre_a(3), des_a(0)): -0.5, - (cre_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j, - (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_b(2)): 0-0.25j, - (cre_a(3), des_a(0), des_a(3), des_b(3)): 0.0625 + (cre_a(0), des_a(3)): 1, + (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_b(1), des_b(5), cre_a(4), cre_b(2)): -1+1j, + (cre_b(1), des_b(5), cre_a(4)): 2+2j, + (cre_a(0), des_a(3), cre_b(2)): 0+0.5j })@@ -163,16 +163,16 @@
FermionOperator({ (cre_a(3), des_a(0), cre_b(2)): -1, - (cre_a(0), des_a(3), cre_b(2)): 2, - (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)): 12-12j, + (cre_b(2)): -5, (cre_a(3), des_a(0)): 0+3j, - (cre_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j, - (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_b(2)): -5, - (cre_a(3), des_a(0), des_a(3), des_b(3)): 0-0.25j + (cre_a(0), des_a(3)): 0-6j, + (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_b(1), des_b(5), cre_a(4), cre_b(2)): 4+4j, + (cre_b(1), des_b(5), cre_a(4)): 12-12j, + (cre_a(0), des_a(3), cre_b(2)): 2 })@@ -193,16 +193,16 @@
FermionOperator({
- (cre_a(3), des_b(3), des_a(3), des_a(0)): 0+0.25j,
- (cre_b(2)): -5,
- (cre_b(1), cre_a(4), des_b(5)): -12+12j,
- (cre_a(3), des_a(0)): 0+3j,
- (cre_b(2), cre_a(0), des_a(3)): 2,
(des_b(3), des_a(3)): 0+1.25j,
+ (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_a(0), des_a(3)): 0-6j,
(cre_b(2), cre_b(1), cre_a(4), des_b(5)): 4+4j,
- (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j
+ (cre_b(2), cre_a(0), des_a(3)): 2,
+ (cre_b(1), cre_a(4), des_b(5), des_b(3), des_a(3)): -1+1j,
+ (cre_b(2)): -5,
+ (cre_b(1), cre_a(4), des_b(5)): -12+12j,
+ (cre_a(3), des_a(0)): 0+3j
})
-array([0. +0.j , 0. +0.j ,
- 0. +0.j , 0. +0.j ,
- 0.09345703-0.26351017j, 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.04860684-0.04058205j, 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
.