Skip to content

Commit

Permalink
deploy: 6f5ae66
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Sep 22, 2023
1 parent 12ce248 commit 2b6b1a4
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 177 deletions.
Binary file modified .doctrees/api/generated/ffsim.slow.gates.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
24 changes: 12 additions & 12 deletions .doctrees/nbsphinx/tutorials/01-introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:01.841788Z",
"iopub.status.busy": "2023-09-22T19:53:01.841555Z",
"iopub.status.idle": "2023-09-22T19:53:02.149909Z",
"shell.execute_reply": "2023-09-22T19:53:02.149322Z"
"iopub.execute_input": "2023-09-22T21:03:16.279811Z",
"iopub.status.busy": "2023-09-22T21:03:16.279424Z",
"iopub.status.idle": "2023-09-22T21:03:16.582247Z",
"shell.execute_reply": "2023-09-22T21:03:16.581675Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -62,10 +62,10 @@
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:02.154247Z",
"iopub.status.busy": "2023-09-22T19:53:02.153104Z",
"iopub.status.idle": "2023-09-22T19:53:02.158287Z",
"shell.execute_reply": "2023-09-22T19:53:02.157766Z"
"iopub.execute_input": "2023-09-22T21:03:16.586628Z",
"iopub.status.busy": "2023-09-22T21:03:16.585111Z",
"iopub.status.idle": "2023-09-22T21:03:16.590572Z",
"shell.execute_reply": "2023-09-22T21:03:16.590118Z"
}
},
"outputs": [],
Expand All @@ -92,10 +92,10 @@
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:02.162309Z",
"iopub.status.busy": "2023-09-22T19:53:02.161369Z",
"iopub.status.idle": "2023-09-22T19:53:02.165438Z",
"shell.execute_reply": "2023-09-22T19:53:02.164973Z"
"iopub.execute_input": "2023-09-22T21:03:16.594310Z",
"iopub.status.busy": "2023-09-22T21:03:16.593415Z",
"iopub.status.idle": "2023-09-22T21:03:16.597294Z",
"shell.execute_reply": "2023-09-22T21:03:16.596845Z"
}
},
"outputs": [],
Expand Down
32 changes: 16 additions & 16 deletions .doctrees/nbsphinx/tutorials/02-orbital-rotation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:03.963576Z",
"iopub.status.busy": "2023-09-22T19:53:03.963166Z",
"iopub.status.idle": "2023-09-22T19:53:04.275473Z",
"shell.execute_reply": "2023-09-22T19:53:04.274918Z"
"iopub.execute_input": "2023-09-22T21:03:18.236148Z",
"iopub.status.busy": "2023-09-22T21:03:18.235765Z",
"iopub.status.idle": "2023-09-22T21:03:18.536110Z",
"shell.execute_reply": "2023-09-22T21:03:18.535486Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -111,10 +111,10 @@
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:04.279292Z",
"iopub.status.busy": "2023-09-22T19:53:04.278163Z",
"iopub.status.idle": "2023-09-22T19:53:04.305748Z",
"shell.execute_reply": "2023-09-22T19:53:04.305171Z"
"iopub.execute_input": "2023-09-22T21:03:18.539935Z",
"iopub.status.busy": "2023-09-22T21:03:18.539625Z",
"iopub.status.idle": "2023-09-22T21:03:18.566180Z",
"shell.execute_reply": "2023-09-22T21:03:18.565631Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -160,10 +160,10 @@
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:04.310108Z",
"iopub.status.busy": "2023-09-22T19:53:04.309134Z",
"iopub.status.idle": "2023-09-22T19:53:04.320725Z",
"shell.execute_reply": "2023-09-22T19:53:04.320159Z"
"iopub.execute_input": "2023-09-22T21:03:18.569585Z",
"iopub.status.busy": "2023-09-22T21:03:18.569376Z",
"iopub.status.idle": "2023-09-22T21:03:18.580624Z",
"shell.execute_reply": "2023-09-22T21:03:18.580075Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -203,10 +203,10 @@
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:04.324963Z",
"iopub.status.busy": "2023-09-22T19:53:04.324009Z",
"iopub.status.idle": "2023-09-22T19:53:04.329918Z",
"shell.execute_reply": "2023-09-22T19:53:04.329424Z"
"iopub.execute_input": "2023-09-22T21:03:18.583300Z",
"iopub.status.busy": "2023-09-22T21:03:18.583102Z",
"iopub.status.idle": "2023-09-22T21:03:18.588294Z",
"shell.execute_reply": "2023-09-22T21:03:18.587757Z"
}
},
"outputs": [],
Expand Down
80 changes: 40 additions & 40 deletions .doctrees/nbsphinx/tutorials/03-double-factorized.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:05.958249Z",
"iopub.status.busy": "2023-09-22T19:53:05.957793Z",
"iopub.status.idle": "2023-09-22T19:53:06.370275Z",
"shell.execute_reply": "2023-09-22T19:53:06.369691Z"
"iopub.execute_input": "2023-09-22T21:03:20.293237Z",
"iopub.status.busy": "2023-09-22T21:03:20.292688Z",
"iopub.status.idle": "2023-09-22T21:03:20.699547Z",
"shell.execute_reply": "2023-09-22T21:03:20.699005Z"
}
},
"outputs": [
Expand Down Expand Up @@ -93,10 +93,10 @@
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.384087Z",
"iopub.status.busy": "2023-09-22T19:53:06.383526Z",
"iopub.status.idle": "2023-09-22T19:53:06.389800Z",
"shell.execute_reply": "2023-09-22T19:53:06.389300Z"
"iopub.execute_input": "2023-09-22T21:03:20.713380Z",
"iopub.status.busy": "2023-09-22T21:03:20.712853Z",
"iopub.status.idle": "2023-09-22T21:03:20.719004Z",
"shell.execute_reply": "2023-09-22T21:03:20.718537Z"
}
},
"outputs": [
Expand Down Expand Up @@ -227,10 +227,10 @@
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.392672Z",
"iopub.status.busy": "2023-09-22T19:53:06.392253Z",
"iopub.status.idle": "2023-09-22T19:53:06.397053Z",
"shell.execute_reply": "2023-09-22T19:53:06.396553Z"
"iopub.execute_input": "2023-09-22T21:03:20.721657Z",
"iopub.status.busy": "2023-09-22T21:03:20.721273Z",
"iopub.status.idle": "2023-09-22T21:03:20.725738Z",
"shell.execute_reply": "2023-09-22T21:03:20.725283Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -285,10 +285,10 @@
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.399825Z",
"iopub.status.busy": "2023-09-22T19:53:06.399426Z",
"iopub.status.idle": "2023-09-22T19:53:06.403276Z",
"shell.execute_reply": "2023-09-22T19:53:06.402807Z"
"iopub.execute_input": "2023-09-22T21:03:20.728216Z",
"iopub.status.busy": "2023-09-22T21:03:20.727839Z",
"iopub.status.idle": "2023-09-22T21:03:20.731504Z",
"shell.execute_reply": "2023-09-22T21:03:20.731060Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -325,10 +325,10 @@
"execution_count": 5,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.406048Z",
"iopub.status.busy": "2023-09-22T19:53:06.405663Z",
"iopub.status.idle": "2023-09-22T19:53:06.410422Z",
"shell.execute_reply": "2023-09-22T19:53:06.409966Z"
"iopub.execute_input": "2023-09-22T21:03:20.734014Z",
"iopub.status.busy": "2023-09-22T21:03:20.733642Z",
"iopub.status.idle": "2023-09-22T21:03:20.738284Z",
"shell.execute_reply": "2023-09-22T21:03:20.737833Z"
}
},
"outputs": [
Expand Down Expand Up @@ -367,10 +367,10 @@
"execution_count": 6,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.413074Z",
"iopub.status.busy": "2023-09-22T19:53:06.412689Z",
"iopub.status.idle": "2023-09-22T19:53:06.423739Z",
"shell.execute_reply": "2023-09-22T19:53:06.423167Z"
"iopub.execute_input": "2023-09-22T21:03:20.740698Z",
"iopub.status.busy": "2023-09-22T21:03:20.740308Z",
"iopub.status.idle": "2023-09-22T21:03:20.753973Z",
"shell.execute_reply": "2023-09-22T21:03:20.753394Z"
}
},
"outputs": [
Expand Down Expand Up @@ -409,10 +409,10 @@
"execution_count": 7,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.426440Z",
"iopub.status.busy": "2023-09-22T19:53:06.426155Z",
"iopub.status.idle": "2023-09-22T19:53:06.434141Z",
"shell.execute_reply": "2023-09-22T19:53:06.433691Z"
"iopub.execute_input": "2023-09-22T21:03:20.756581Z",
"iopub.status.busy": "2023-09-22T21:03:20.756030Z",
"iopub.status.idle": "2023-09-22T21:03:20.763740Z",
"shell.execute_reply": "2023-09-22T21:03:20.763274Z"
}
},
"outputs": [
Expand Down Expand Up @@ -450,10 +450,10 @@
"execution_count": 8,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.436537Z",
"iopub.status.busy": "2023-09-22T19:53:06.436337Z",
"iopub.status.idle": "2023-09-22T19:53:06.471244Z",
"shell.execute_reply": "2023-09-22T19:53:06.470729Z"
"iopub.execute_input": "2023-09-22T21:03:20.766424Z",
"iopub.status.busy": "2023-09-22T21:03:20.765969Z",
"iopub.status.idle": "2023-09-22T21:03:20.802839Z",
"shell.execute_reply": "2023-09-22T21:03:20.802363Z"
}
},
"outputs": [
Expand Down Expand Up @@ -493,10 +493,10 @@
"execution_count": 9,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.474122Z",
"iopub.status.busy": "2023-09-22T19:53:06.473490Z",
"iopub.status.idle": "2023-09-22T19:53:06.496387Z",
"shell.execute_reply": "2023-09-22T19:53:06.495881Z"
"iopub.execute_input": "2023-09-22T21:03:20.805492Z",
"iopub.status.busy": "2023-09-22T21:03:20.805199Z",
"iopub.status.idle": "2023-09-22T21:03:20.838642Z",
"shell.execute_reply": "2023-09-22T21:03:20.838163Z"
}
},
"outputs": [
Expand Down Expand Up @@ -535,10 +535,10 @@
"execution_count": 10,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:06.499194Z",
"iopub.status.busy": "2023-09-22T19:53:06.498745Z",
"iopub.status.idle": "2023-09-22T19:53:06.509625Z",
"shell.execute_reply": "2023-09-22T19:53:06.509139Z"
"iopub.execute_input": "2023-09-22T21:03:20.842012Z",
"iopub.status.busy": "2023-09-22T21:03:20.841702Z",
"iopub.status.idle": "2023-09-22T21:03:20.856836Z",
"shell.execute_reply": "2023-09-22T21:03:20.856269Z"
}
},
"outputs": [
Expand Down
32 changes: 16 additions & 16 deletions .doctrees/nbsphinx/tutorials/04-lucj.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:08.522799Z",
"iopub.status.busy": "2023-09-22T19:53:08.522537Z",
"iopub.status.idle": "2023-09-22T19:53:08.905810Z",
"shell.execute_reply": "2023-09-22T19:53:08.905249Z"
"iopub.execute_input": "2023-09-22T21:03:22.734065Z",
"iopub.status.busy": "2023-09-22T21:03:22.733637Z",
"iopub.status.idle": "2023-09-22T21:03:23.108073Z",
"shell.execute_reply": "2023-09-22T21:03:23.107515Z"
}
},
"outputs": [
Expand Down Expand Up @@ -80,10 +80,10 @@
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:08.909247Z",
"iopub.status.busy": "2023-09-22T19:53:08.908621Z",
"iopub.status.idle": "2023-09-22T19:53:09.007711Z",
"shell.execute_reply": "2023-09-22T19:53:09.007181Z"
"iopub.execute_input": "2023-09-22T21:03:23.111168Z",
"iopub.status.busy": "2023-09-22T21:03:23.110704Z",
"iopub.status.idle": "2023-09-22T21:03:23.283244Z",
"shell.execute_reply": "2023-09-22T21:03:23.282713Z"
}
},
"outputs": [
Expand Down Expand Up @@ -145,10 +145,10 @@
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:09.011775Z",
"iopub.status.busy": "2023-09-22T19:53:09.010803Z",
"iopub.status.idle": "2023-09-22T19:53:09.141283Z",
"shell.execute_reply": "2023-09-22T19:53:09.140749Z"
"iopub.execute_input": "2023-09-22T21:03:23.287326Z",
"iopub.status.busy": "2023-09-22T21:03:23.286393Z",
"iopub.status.idle": "2023-09-22T21:03:23.432837Z",
"shell.execute_reply": "2023-09-22T21:03:23.432304Z"
}
},
"outputs": [
Expand Down Expand Up @@ -222,10 +222,10 @@
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-22T19:53:09.145944Z",
"iopub.status.busy": "2023-09-22T19:53:09.144498Z",
"iopub.status.idle": "2023-09-22T19:53:09.296696Z",
"shell.execute_reply": "2023-09-22T19:53:09.296176Z"
"iopub.execute_input": "2023-09-22T21:03:23.436955Z",
"iopub.status.busy": "2023-09-22T21:03:23.435969Z",
"iopub.status.idle": "2023-09-22T21:03:23.607950Z",
"shell.execute_reply": "2023-09-22T21:03:23.607426Z"
}
},
"outputs": [
Expand Down
3 changes: 2 additions & 1 deletion _modules/ffsim/gates/orbital_rotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ <h1>Source code for ffsim.gates.orbital_rotation</h1><div class="highlight"><pre
<span class="n">slice1</span> <span class="o">=</span> <span class="n">indices</span><span class="p">[:</span> <span class="nb">len</span><span class="p">(</span><span class="n">indices</span><span class="p">)</span> <span class="o">//</span> <span class="mi">2</span><span class="p">]</span>
<span class="n">slice2</span> <span class="o">=</span> <span class="n">indices</span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">indices</span><span class="p">)</span> <span class="o">//</span> <span class="mi">2</span> <span class="p">:]</span>
<span class="n">c</span><span class="p">,</span> <span class="n">s</span> <span class="o">=</span> <span class="n">mat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">apply_givens_rotation_in_place</span><span class="p">(</span><span class="n">vec</span><span class="p">,</span> <span class="n">c</span><span class="o">.</span><span class="n">real</span><span class="p">,</span> <span class="nb">abs</span><span class="p">(</span><span class="n">s</span><span class="p">),</span> <span class="n">s</span> <span class="o">/</span> <span class="nb">abs</span><span class="p">(</span><span class="n">s</span><span class="p">),</span> <span class="n">slice1</span><span class="p">,</span> <span class="n">slice2</span><span class="p">)</span>
<span class="n">c</span> <span class="o">=</span> <span class="n">c</span><span class="o">.</span><span class="n">real</span>
<span class="n">apply_givens_rotation_in_place</span><span class="p">(</span><span class="n">vec</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">slice1</span><span class="p">,</span> <span class="n">slice2</span><span class="p">)</span>


<span class="nd">@lru_cache</span><span class="p">(</span><span class="n">maxsize</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
Expand Down
10 changes: 3 additions & 7 deletions _modules/ffsim/slow/gates/orbital_rotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h1>Source code for ffsim.slow.gates.orbital_rotation</h1><div class="highlight"
<span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">scipy.linalg.blas</span> <span class="kn">import</span> <span class="n">zdrot</span><span class="p">,</span> <span class="n">zscal</span>
<span class="kn">from</span> <span class="nn">scipy.linalg.lapack</span> <span class="kn">import</span> <span class="n">zrot</span>


<div class="viewcode-block" id="gen_orbital_rotation_index_in_place_slow">
Expand Down Expand Up @@ -111,17 +111,13 @@ <h1>Source code for ffsim.slow.gates.orbital_rotation</h1><div class="highlight"
<span class="k">def</span> <span class="nf">apply_givens_rotation_in_place_slow</span><span class="p">(</span>
<span class="n">vec</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span>
<span class="n">c</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span>
<span class="n">s</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span>
<span class="n">phase</span><span class="p">:</span> <span class="nb">complex</span><span class="p">,</span>
<span class="n">s</span><span class="p">:</span> <span class="nb">complex</span><span class="p">,</span>
<span class="n">slice1</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span>
<span class="n">slice2</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Apply a Givens rotation to slices of a state vector.&quot;&quot;&quot;</span>
<span class="n">phase_conj</span> <span class="o">=</span> <span class="n">phase</span><span class="o">.</span><span class="n">conjugate</span><span class="p">()</span>
<span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">slice1</span><span class="p">,</span> <span class="n">slice2</span><span class="p">):</span>
<span class="n">zscal</span><span class="p">(</span><span class="n">phase_conj</span><span class="p">,</span> <span class="n">vec</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
<span class="n">vec</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">vec</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="n">zdrot</span><span class="p">(</span><span class="n">vec</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">vec</span><span class="p">[</span><span class="n">j</span><span class="p">],</span> <span class="n">c</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span>
<span class="n">zscal</span><span class="p">(</span><span class="n">phase</span><span class="p">,</span> <span class="n">vec</span><span class="p">[</span><span class="n">i</span><span class="p">])</span></div>
<span class="n">vec</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">vec</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="n">zrot</span><span class="p">(</span><span class="n">vec</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">vec</span><span class="p">[</span><span class="n">j</span><span class="p">],</span> <span class="n">c</span><span class="p">,</span> <span class="n">s</span><span class="p">)</span></div>

</pre></div>

Expand Down
Loading

0 comments on commit 2b6b1a4

Please sign in to comment.