Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jue-Xu committed Jul 20, 2024
1 parent eb83b03 commit fa28179
Show file tree
Hide file tree
Showing 53 changed files with 2,473 additions and 184 deletions.
7 changes: 6 additions & 1 deletion README.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,17 @@
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Product Formula</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="grouping.html">Grouping</a></li>
<li class="toctree-l1"><a class="reference internal" href="ordering.html">Ordering</a></li>
<li class="toctree-l1"><a class="reference internal" href="grouping.html">Grouping</a></li>
<li class="toctree-l1"><a class="reference internal" href="interference.html">Error interference</a></li>
<li class="toctree-l1"><a class="reference internal" href="localization.html">Error localization</a></li>
<li class="toctree-l1"><a class="reference internal" href="average.html">Average error</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Classical simulation</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="path_integral.html">Pauli Path Integral</a></li>
<li class="toctree-l1"><a class="reference internal" href="tensor_network.html">Tensor network</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Applications</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="ground.html">Ground state</a></li>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
398 changes: 396 additions & 2 deletions _sources/channel.ipynb

Large diffs are not rendered by default.

29 changes: 26 additions & 3 deletions _sources/fermion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,39 @@
"from quantum_simulation_recipe import spin_ham, fermion_ham"
]
},
{
"cell_type": "markdown",
"id": "1514eb4a",
"metadata": {},
"source": [
"## Basics"
]
},
{
"cell_type": "markdown",
"id": "c19aaffa",
"metadata": {},
"source": [
"### Jordan-Wigner transformation"
"### Fermion anti-commutation relation"
]
},
{
"cell_type": "markdown",
"id": "f8592aaf",
"metadata": {},
"source": [
"### Jordan-Wigner transformation: convert between fermion and spin (qubit)"
]
},
{
"cell_type": "markdown",
"id": "9dd417bb",
"metadata": {},
"source": [
"## Chemical molecules"
"## Chemical molecules\n",
"```{math}\n",
"H=H_0 + \\sum_{pq}h_{pq} a_p^\\dagger a_q + \\frac{1}{2}\\sum_{pqrs} h_{pqrs} a_p^\\dagger a_q^\\dagger a_r a_s,\n",
"```"
]
},
{
Expand Down Expand Up @@ -79,7 +98,11 @@
"id": "60709827",
"metadata": {},
"source": [
"## SYK model"
"## SYK model\n",
"$$\n",
"H=\\frac{1}{4\\cdot 4!} \\sum_{i,j,k,l=1}^n J_{ijkl}\\; \\chi_i \\chi_j\\chi_k \\chi_l,\n",
"$$\n",
"where $\\chi_i$ are majorana fermions with $\\{\\chi_i,\\chi_j\\}=2\\delta_{ij}$ and the coefficients $J_{ijkl}$ are sampled from a Gaussian distribution $N(0,\\frac{3!}{n^3}J^2)$ with zero mean and variance.."
]
},
{
Expand Down
23 changes: 22 additions & 1 deletion _sources/field.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
"source": [
"## 1+1 (QED) Lattice field\n",
"\n",
"Schwinger model"
"The lattice Schwinger model of 1+1D quantum electrodynamics (QED) can be described by the Hamiltonian (with spin system) $H_{sm}=H_{\\pm}+H_Z$ where\n",
"\n",
"$$\n",
"H_{\\pm} = \\sum_{l=1}^{n-1} H_{\\pm}^l, \\; H_{\\pm}^l = \\frac{w}{2} [X_l X_{l+1}+ Y_l Y_{l+1}]\n",
"$$\n",
"\n",
"and \n",
"\n",
"$$\n",
"H_Z = \\frac{m}{2} \\sum_{l=1}^n (-1)^l Z_l + J \\sum_{l=1}^n L_l^2, \\; L_n = \\frac{1}{2} [Z_l + (-1)^l]\n",
"$$\n",
"\n",
"Here, $m$ is the rest mass of the fermionic particles and anti-particles, and $w$ describes their kinetic energy. The term proportional to $J$ is the energy of the U(1) gauge fields."
]
},
{
Expand All @@ -29,6 +41,15 @@
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "f60190e1",
"metadata": {},
"source": [
"## QCD \n",
"todo"
]
}
],
"metadata": {
Expand Down
5 changes: 3 additions & 2 deletions _sources/interference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"id": "ad7989ef",
"metadata": {},
"source": [
"## First-Order Trotter Error from a Second-Order Perspective\n",
"http://arxiv.org/abs/2107.08032"
"- Destructive Error Interference in Product-Formula Lattice Simulation http://arxiv.org/abs/1912.11047\n",
"- First-Order Trotter Error from a Second-Order Perspective http://arxiv.org/abs/2107.08032\n",
"- Self-healing of Trotter error in digital adiabatic state preparation http://arxiv.org/abs/2209.06242"
]
},
{
Expand Down
51 changes: 51 additions & 0 deletions _sources/jax.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "8b24f5d3",
"metadata": {},
"source": [
"# JAX and multi-processing"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "2763848a",
"metadata": {},
"outputs": [],
"source": [
"from qiskit.quantum_info import SparsePauliOp, Statevector\n",
"\n",
"import quantum_simulation_recipe as qsr\n",
"from quantum_simulation_recipe import spin_ham"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.8 ('base')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
},
"vscode": {
"interpreter": {
"hash": "4e8ef2f9fcac0817bca9a7ca376f64f20b4df5ea3bf7af756a50bda7d3557ea6"
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}
8 changes: 8 additions & 0 deletions _sources/ordering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
"H.ham"
]
},
{
"cell_type": "markdown",
"id": "b45a921c",
"metadata": {},
"source": [
"## Lie-Trotter-Suzuki product formula"
]
},
{
"cell_type": "markdown",
"id": "d2c55840",
Expand Down
42 changes: 42 additions & 0 deletions _sources/path_integral.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "8b24f5d3",
"metadata": {},
"source": [
"# Pauli Path Integral\n",
"\n",
"Main Reference:\n",
"- A Polynomial-Time Classical Algorithm for Noisy Random Circuit Sampling https://arxiv.org/abs/2211.03999\n",
"- A polynomial-time classical algorithm for noisy quantum circuits http://arxiv.org/abs/2407.12768"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.8 ('base')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
},
"vscode": {
"interpreter": {
"hash": "4e8ef2f9fcac0817bca9a7ca376f64f20b4df5ea3bf7af756a50bda7d3557ea6"
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}
42 changes: 41 additions & 1 deletion _sources/quantities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 4,
"id": "098ce6c5",
"metadata": {},
"outputs": [],
"source": [
"from qiskit.quantum_info import SparsePauliOp, commutator, anti_commutator, entropy, Statevector, random_statevector, random_density_matrix, partial_trace\n",
"import numpy as np\n",
"from numpy.linalg import norm "
]
},
Expand Down Expand Up @@ -201,6 +202,14 @@
"## Different norms"
]
},
{
"cell_type": "markdown",
"id": "1316370b",
"metadata": {},
"source": [
"### Vector induced norm"
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand All @@ -227,6 +236,37 @@
"print('Frobenius norm: ', norm(op, ord='fro'))\n",
"# print(norm(SparsePauliOp.from_list([(\"XYZI\", 1)]), ord='nuc'))"
]
},
{
"cell_type": "markdown",
"id": "a987b947",
"metadata": {},
"source": [
"### Schatten p norm"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c3aa71a2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.605551275463989"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"test = SparsePauliOp.from_list([('XX', 2), ('YX', 3)])\n",
"np.linalg.norm(test.to_matrix(), ord='nuc')\n",
"np.linalg.norm(test.to_matrix(), ord=1)"
]
}
],
"metadata": {
Expand Down
15 changes: 10 additions & 5 deletions _sources/spin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"id": "0ee355f6",
"metadata": {},
"source": [
"## Nearest-neighbor interaction\n",
"## 1D Nearest-neighbor interaction\n",
"\n",
"```{math}\n",
"H=\\sum_{j=1}^{n-1} J_j Z_j Z_{j+1} + \\sum_{j=1}^{n} h_j X_j,\n",
"H=\\sum_{j=1}^{n-1} J_j^x X_j X_{j+1} + J_j^y Y_j Y_{j+1} + J_j^z Z_j Z_{j+1} + \\sum_{j=1}^{n} h_j^x X_j + h_j^y Y_j + h_j^z Z_j,\n",
"```\n",
"where $J$ is the interaction strength and $h_j$ is the strength of the external field."
"where $J$ is the interaction strength and $h_j$ is the strength of the external field (random disorder)."
]
},
{
Expand Down Expand Up @@ -63,7 +63,10 @@
"id": "efde70d6",
"metadata": {},
"source": [
"## Power-law interaction"
"## Power-law interaction\n",
"```{math}\n",
"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",
"```"
]
},
{
Expand Down Expand Up @@ -99,7 +102,9 @@
"id": "14bd5369",
"metadata": {},
"source": [
"## Higher dimension lattice"
"## Higher dimension lattice\n",
"\n",
"todo"
]
}
],
Expand Down
Loading

0 comments on commit fa28179

Please sign in to comment.