Skip to content

Commit e7955ca

Browse files
committed
update ToC
1 parent 4ef4eea commit e7955ca

File tree

87 files changed

+1662
-758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1662
-758
lines changed

_build/.doctrees/average.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/basic.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/channel.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/environment.pickle

-8.49 MB
Binary file not shown.

_build/.doctrees/fermion.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/field.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/ground.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/grouping.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/hamiltonian.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/interference.doctree

1.53 KB
Binary file not shown.

_build/.doctrees/intro.doctree

1.36 KB
Binary file not shown.

_build/.doctrees/lcu.doctree

45 Bytes
Binary file not shown.

_build/.doctrees/localization.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/open.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/operator.doctree

-106 Bytes
Binary file not shown.

_build/.doctrees/ordering.doctree

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

_build/.doctrees/post_trotter.doctree

-86 Bytes
Binary file not shown.

_build/.doctrees/qsp.doctree

0 Bytes
Binary file not shown.

_build/.doctrees/simulation.doctree

381 Bytes
Binary file not shown.

_build/.doctrees/spin.doctree

2.92 KB
Binary file not shown.

_build/.doctrees/state.doctree

0 Bytes
Binary file not shown.
-11.3 KB
Binary file not shown.

_build/.doctrees/trotter.doctree

-19 Bytes
Binary file not shown.

_build/.jupyter_cache/executed/61bfd27e474095dbbe451c2b08e7298a/base.ipynb

+335
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "2763848a",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"from qiskit.quantum_info import SparsePauliOp, Statevector\n",
11+
"\n",
12+
"import quantum_simulation_recipe as qsr\n",
13+
"from quantum_simulation_recipe.spin import *"
14+
]
15+
},
16+
{
17+
"cell_type": "code",
18+
"execution_count": 2,
19+
"id": "8032a8eb",
20+
"metadata": {},
21+
"outputs": [
22+
{
23+
"data": {
24+
"text/plain": [
25+
"SparsePauliOp(['IIXX', 'IXXI', 'XXII', 'IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
26+
" coeffs=[1. +0.j, 1. +0.j, 1. +0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j])"
27+
]
28+
},
29+
"execution_count": 2,
30+
"metadata": {},
31+
"output_type": "execute_result"
32+
}
33+
],
34+
"source": [
35+
"H = Nearest_Neighbour_1d(4, Jx=1, hz=0.2)\n",
36+
"H.ham"
37+
]
38+
},
39+
{
40+
"cell_type": "code",
41+
"execution_count": 3,
42+
"id": "a3914396",
43+
"metadata": {},
44+
"outputs": [
45+
{
46+
"data": {
47+
"text/plain": [
48+
"[SparsePauliOp(['IIXX', 'XXII', 'IIIZ', 'IZII'],\n",
49+
" coeffs=[1. +0.j, 1. +0.j, 0.2+0.j, 0.2+0.j]),\n",
50+
" SparsePauliOp(['IXXI', 'IIZI', 'ZIII'],\n",
51+
" coeffs=[1. +0.j, 0.2+0.j, 0.2+0.j])]"
52+
]
53+
},
54+
"execution_count": 3,
55+
"metadata": {},
56+
"output_type": "execute_result"
57+
}
58+
],
59+
"source": [
60+
"H.ham_par"
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": 4,
66+
"id": "5c75d90b",
67+
"metadata": {},
68+
"outputs": [
69+
{
70+
"data": {
71+
"text/plain": [
72+
"SparsePauliOp(['IIXX', 'IXIX', 'XIIX', 'IXXI', 'XIXI', 'XXII', 'IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
73+
" coeffs=[1. +0.j, 0.0625 +0.j, 0.012346+0.j, 1. +0.j, 0.0625 +0.j,\n",
74+
" 1. +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j])"
75+
]
76+
},
77+
"execution_count": 4,
78+
"metadata": {},
79+
"output_type": "execute_result"
80+
}
81+
],
82+
"source": [
83+
"H = Power_Law(4, alpha=4, Jx=1, hz=0.2)\n",
84+
"H.ham"
85+
]
86+
},
87+
{
88+
"cell_type": "code",
89+
"execution_count": 5,
90+
"id": "5cbde227",
91+
"metadata": {},
92+
"outputs": [
93+
{
94+
"data": {
95+
"text/plain": [
96+
"[SparsePauliOp(['IIXX', 'IXIX', 'XIIX', 'IXXI', 'XIXI', 'XXII'],\n",
97+
" coeffs=[1. +0.j, 0.0625 +0.j, 0.012346+0.j, 1. +0.j, 0.0625 +0.j,\n",
98+
" 1. +0.j]),\n",
99+
" SparsePauliOp(['IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
100+
" coeffs=[0.2+0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j])]"
101+
]
102+
},
103+
"execution_count": 5,
104+
"metadata": {},
105+
"output_type": "execute_result"
106+
}
107+
],
108+
"source": [
109+
"H.ham_xyz"
110+
]
111+
}
112+
],
113+
"metadata": {
114+
"kernelspec": {
115+
"display_name": "Python 3.8.8 ('base')",
116+
"language": "python",
117+
"name": "python3"
118+
},
119+
"language_info": {
120+
"codemirror_mode": {
121+
"name": "ipython",
122+
"version": 3
123+
},
124+
"file_extension": ".py",
125+
"mimetype": "text/x-python",
126+
"name": "python",
127+
"nbconvert_exporter": "python",
128+
"pygments_lexer": "ipython3",
129+
"version": "3.10.14"
130+
},
131+
"vscode": {
132+
"interpreter": {
133+
"hash": "4e8ef2f9fcac0817bca9a7ca376f64f20b4df5ea3bf7af756a50bda7d3557ea6"
134+
}
135+
}
136+
},
137+
"nbformat": 4,
138+
"nbformat_minor": 5
139+
}

_build/.jupyter_cache/global.db

4 KB
Binary file not shown.

_build/html/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 3753b484dde52448cad52d4ef3c998dc
3+
config: 37d0df7ac0f74f6be2523376967601d2
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading
Loading
Loading
Loading
Loading

_build/html/_sources/interference.ipynb

+26-30
Large diffs are not rendered by default.

_build/html/_sources/intro.md

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<!-- Table of Content -->
99

1010
This is a pedagogic tutorial on quantum simulation with code.
11+
The package [quantum-simulation-recipe](https://youtu.be/QDPtcwhpQkE?si=_utI2VstkFiJfvxR) built with [qiskit](https://www.ibm.com/quantum/qiskit), [openfermion](https://quantumai.google/openfermion) etc.
12+
13+
[Qiskit tutorial](https://youtu.be/QDPtcwhpQkE?si=_utI2VstkFiJfvxR)
1114

1215
```{tableofcontents}
1316
```

_build/html/_sources/lcu.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "93e1e53b",
66
"metadata": {},
77
"source": [
8-
"## LCU"
8+
"# LCU"
99
]
1010
},
1111
{

_build/html/_sources/operator.ipynb

+2
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,11 @@
181181
"### Rotation (real-time evolution) of a Pauli string\n",
182182
"\n",
183183
"https://github.com/DavitKhach/quantum-algorithms-tutorials/blob/master/Hamiltonian_simulation.ipynb\n",
184+
"\n",
184185
"$$\n",
185186
"e^{-i XX t} = \\text{CNOT} (I\\otimes e^{-i X t}) \\text{CNOT}\n",
186187
"$$\n",
188+
"\n",
187189
"[1] J.D. Whitfield, J. Biamonte and A. Aspuru-Guzik, Molecular Physics, \"Simulation of electronic structure Hamiltonians using quantum computers\" (2011)"
188190
]
189191
},

_build/html/_sources/post_trotter.ipynb

+3-19
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,28 @@
2525
"from quantum_simulation_recipe import spin_ham"
2626
]
2727
},
28-
{
29-
"cell_type": "markdown",
30-
"id": "93e1e53b",
31-
"metadata": {},
32-
"source": [
33-
"## LCU"
34-
]
35-
},
3628
{
3729
"cell_type": "markdown",
3830
"id": "ed26007b",
3931
"metadata": {},
4032
"source": [
41-
"### Block encoding"
33+
"## Block encoding"
4234
]
4335
},
4436
{
4537
"cell_type": "markdown",
4638
"id": "e4dfa4db",
4739
"metadata": {},
4840
"source": [
49-
"### Amplitude amplification"
50-
]
51-
},
52-
{
53-
"cell_type": "markdown",
54-
"id": "e704fe72",
55-
"metadata": {},
56-
"source": [
57-
"## QSP"
41+
"## Amplitude amplification"
5842
]
5943
},
6044
{
6145
"cell_type": "markdown",
6246
"id": "9f801c1c",
6347
"metadata": {},
6448
"source": [
65-
"### Oblivious amplitude amplification"
49+
"## Oblivious amplitude amplification"
6650
]
6751
}
6852
],

_build/html/_sources/spin.ipynb

+75-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"from qiskit.quantum_info import SparsePauliOp, Statevector\n",
1919
"\n",
2020
"import quantum_simulation_recipe as qsr\n",
21-
"from quantum_simulation_recipe import spin"
21+
"from quantum_simulation_recipe.spin import *"
2222
]
2323
},
2424
{
@@ -36,7 +36,7 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 5,
39+
"execution_count": 3,
4040
"id": "8032a8eb",
4141
"metadata": {},
4242
"outputs": [
@@ -47,30 +47,63 @@
4747
" coeffs=[1. +0.j, 1. +0.j, 1. +0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j])"
4848
]
4949
},
50-
"execution_count": 5,
50+
"execution_count": 3,
5151
"metadata": {},
5252
"output_type": "execute_result"
5353
}
5454
],
5555
"source": [
56-
"H = spin.Nearest_Neighbour_1d(4, Jx=1, hz=0.2)\n",
56+
"H = Nearest_Neighbour_1d(4, Jx=1, hz=0.2)\n",
5757
"H.ham"
5858
]
5959
},
60+
{
61+
"cell_type": "markdown",
62+
"id": "2cf6b1bb",
63+
"metadata": {},
64+
"source": [
65+
"### Parity grouping"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": 4,
71+
"id": "a3914396",
72+
"metadata": {},
73+
"outputs": [
74+
{
75+
"data": {
76+
"text/plain": [
77+
"[SparsePauliOp(['IIXX', 'XXII', 'IIIZ', 'IZII'],\n",
78+
" coeffs=[1. +0.j, 1. +0.j, 0.2+0.j, 0.2+0.j]),\n",
79+
" SparsePauliOp(['IXXI', 'IIZI', 'ZIII'],\n",
80+
" coeffs=[1. +0.j, 0.2+0.j, 0.2+0.j])]"
81+
]
82+
},
83+
"execution_count": 4,
84+
"metadata": {},
85+
"output_type": "execute_result"
86+
}
87+
],
88+
"source": [
89+
"H.ham_par"
90+
]
91+
},
6092
{
6193
"cell_type": "markdown",
6294
"id": "efde70d6",
6395
"metadata": {},
6496
"source": [
6597
"## Power-law interaction\n",
66-
"```{math}\n",
98+
"\n",
99+
"$$\n",
67100
"H=\\sum_{j=1}^{n} \\sum_{k=j+1}^n \\frac{1}{(j-k)^\\alpha} (J^x X_j X_{k} + J^y Y_j Y_{k} + J^z Z_j Z_{k}) + \\sum_{j=1}^{n} h_j^x X_j + h_j^y Y_j + h_j^z Z_j,\n",
68-
"```"
101+
"$$"
69102
]
70103
},
71104
{
72105
"cell_type": "code",
73-
"execution_count": 6,
106+
"execution_count": 5,
74107
"id": "5c75d90b",
75108
"metadata": {},
76109
"outputs": [
@@ -82,16 +115,49 @@
82115
" 1. +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j])"
83116
]
84117
},
85-
"execution_count": 6,
118+
"execution_count": 5,
86119
"metadata": {},
87120
"output_type": "execute_result"
88121
}
89122
],
90123
"source": [
91-
"H = spin.Power_Law(4, alpha=4, Jx=1, hz=0.2)\n",
124+
"H = Power_Law(4, alpha=4, Jx=1, hz=0.2)\n",
92125
"H.ham"
93126
]
94127
},
128+
{
129+
"cell_type": "markdown",
130+
"id": "86aeee6d",
131+
"metadata": {},
132+
"source": [
133+
"### XYZ grouping"
134+
]
135+
},
136+
{
137+
"cell_type": "code",
138+
"execution_count": 6,
139+
"id": "5cbde227",
140+
"metadata": {},
141+
"outputs": [
142+
{
143+
"data": {
144+
"text/plain": [
145+
"[SparsePauliOp(['IIXX', 'IXIX', 'XIIX', 'IXXI', 'XIXI', 'XXII'],\n",
146+
" coeffs=[1. +0.j, 0.0625 +0.j, 0.012346+0.j, 1. +0.j, 0.0625 +0.j,\n",
147+
" 1. +0.j]),\n",
148+
" SparsePauliOp(['IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
149+
" coeffs=[0.2+0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j])]"
150+
]
151+
},
152+
"execution_count": 6,
153+
"metadata": {},
154+
"output_type": "execute_result"
155+
}
156+
],
157+
"source": [
158+
"H.ham_xyz"
159+
]
160+
},
95161
{
96162
"cell_type": "markdown",
97163
"id": "14bd5369",

0 commit comments

Comments
 (0)