Skip to content

Commit

Permalink
update ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
Jue-Xu committed Aug 14, 2024
1 parent 4ef4eea commit e7955ca
Show file tree
Hide file tree
Showing 87 changed files with 1,662 additions and 758 deletions.
Binary file modified _build/.doctrees/average.doctree
Binary file not shown.
Binary file modified _build/.doctrees/basic.doctree
Binary file not shown.
Binary file modified _build/.doctrees/channel.doctree
Binary file not shown.
Binary file modified _build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified _build/.doctrees/fermion.doctree
Binary file not shown.
Binary file modified _build/.doctrees/field.doctree
Binary file not shown.
Binary file modified _build/.doctrees/ground.doctree
Binary file not shown.
Binary file modified _build/.doctrees/grouping.doctree
Binary file not shown.
Binary file modified _build/.doctrees/hamiltonian.doctree
Binary file not shown.
Binary file modified _build/.doctrees/interference.doctree
Binary file not shown.
Binary file modified _build/.doctrees/intro.doctree
Binary file not shown.
Binary file modified _build/.doctrees/lcu.doctree
Binary file not shown.
Binary file modified _build/.doctrees/localization.doctree
Binary file not shown.
Binary file modified _build/.doctrees/open.doctree
Binary file not shown.
Binary file modified _build/.doctrees/operator.doctree
Binary file not shown.
Binary file modified _build/.doctrees/ordering.doctree
Binary file not shown.
Binary file modified _build/.doctrees/path_integral.doctree
Binary file not shown.
Binary file modified _build/.doctrees/phase_transition.doctree
Binary file not shown.
Binary file modified _build/.doctrees/post_trotter.doctree
Binary file not shown.
Binary file modified _build/.doctrees/qsp.doctree
Binary file not shown.
Binary file modified _build/.doctrees/simulation.doctree
Binary file not shown.
Binary file modified _build/.doctrees/spin.doctree
Binary file not shown.
Binary file modified _build/.doctrees/state.doctree
Binary file not shown.
Binary file modified _build/.doctrees/tensor_network.doctree
Binary file not shown.
Binary file modified _build/.doctrees/trotter.doctree
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"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.spin import *"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "8032a8eb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"SparsePauliOp(['IIXX', 'IXXI', 'XXII', 'IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
" 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])"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H = Nearest_Neighbour_1d(4, Jx=1, hz=0.2)\n",
"H.ham"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "a3914396",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[SparsePauliOp(['IIXX', 'XXII', 'IIIZ', 'IZII'],\n",
" coeffs=[1. +0.j, 1. +0.j, 0.2+0.j, 0.2+0.j]),\n",
" SparsePauliOp(['IXXI', 'IIZI', 'ZIII'],\n",
" coeffs=[1. +0.j, 0.2+0.j, 0.2+0.j])]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H.ham_par"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "5c75d90b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"SparsePauliOp(['IIXX', 'IXIX', 'XIIX', 'IXXI', 'XIXI', 'XXII', 'IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
" coeffs=[1. +0.j, 0.0625 +0.j, 0.012346+0.j, 1. +0.j, 0.0625 +0.j,\n",
" 1. +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j])"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H = Power_Law(4, alpha=4, Jx=1, hz=0.2)\n",
"H.ham"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "5cbde227",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[SparsePauliOp(['IIXX', 'IXIX', 'XIIX', 'IXXI', 'XIXI', 'XXII'],\n",
" coeffs=[1. +0.j, 0.0625 +0.j, 0.012346+0.j, 1. +0.j, 0.0625 +0.j,\n",
" 1. +0.j]),\n",
" SparsePauliOp(['IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
" coeffs=[0.2+0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j])]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H.ham_xyz"
]
}
],
"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
}
Binary file modified _build/.jupyter_cache/global.db
Binary file not shown.
2 changes: 1 addition & 1 deletion _build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3753b484dde52448cad52d4ef3c998dc
config: 37d0df7ac0f74f6be2523376967601d2
tags: 645f666f9bcd5a90fca523b33c5a78b7
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.
56 changes: 26 additions & 30 deletions _build/html/_sources/interference.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions _build/html/_sources/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<!-- Table of Content -->

This is a pedagogic tutorial on quantum simulation with code.
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.

[Qiskit tutorial](https://youtu.be/QDPtcwhpQkE?si=_utI2VstkFiJfvxR)

```{tableofcontents}
```
Expand Down
2 changes: 1 addition & 1 deletion _build/html/_sources/lcu.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "93e1e53b",
"metadata": {},
"source": [
"## LCU"
"# LCU"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions _build/html/_sources/operator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@
"### Rotation (real-time evolution) of a Pauli string\n",
"\n",
"https://github.com/DavitKhach/quantum-algorithms-tutorials/blob/master/Hamiltonian_simulation.ipynb\n",
"\n",
"$$\n",
"e^{-i XX t} = \\text{CNOT} (I\\otimes e^{-i X t}) \\text{CNOT}\n",
"$$\n",
"\n",
"[1] J.D. Whitfield, J. Biamonte and A. Aspuru-Guzik, Molecular Physics, \"Simulation of electronic structure Hamiltonians using quantum computers\" (2011)"
]
},
Expand Down
22 changes: 3 additions & 19 deletions _build/html/_sources/post_trotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,28 @@
"from quantum_simulation_recipe import spin_ham"
]
},
{
"cell_type": "markdown",
"id": "93e1e53b",
"metadata": {},
"source": [
"## LCU"
]
},
{
"cell_type": "markdown",
"id": "ed26007b",
"metadata": {},
"source": [
"### Block encoding"
"## Block encoding"
]
},
{
"cell_type": "markdown",
"id": "e4dfa4db",
"metadata": {},
"source": [
"### Amplitude amplification"
]
},
{
"cell_type": "markdown",
"id": "e704fe72",
"metadata": {},
"source": [
"## QSP"
"## Amplitude amplification"
]
},
{
"cell_type": "markdown",
"id": "9f801c1c",
"metadata": {},
"source": [
"### Oblivious amplitude amplification"
"## Oblivious amplitude amplification"
]
}
],
Expand Down
84 changes: 75 additions & 9 deletions _build/html/_sources/spin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"from qiskit.quantum_info import SparsePauliOp, Statevector\n",
"\n",
"import quantum_simulation_recipe as qsr\n",
"from quantum_simulation_recipe import spin"
"from quantum_simulation_recipe.spin import *"
]
},
{
Expand All @@ -36,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"id": "8032a8eb",
"metadata": {},
"outputs": [
Expand All @@ -47,30 +47,63 @@
" 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])"
]
},
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H = spin.Nearest_Neighbour_1d(4, Jx=1, hz=0.2)\n",
"H = Nearest_Neighbour_1d(4, Jx=1, hz=0.2)\n",
"H.ham"
]
},
{
"cell_type": "markdown",
"id": "2cf6b1bb",
"metadata": {},
"source": [
"### Parity grouping"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "a3914396",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[SparsePauliOp(['IIXX', 'XXII', 'IIIZ', 'IZII'],\n",
" coeffs=[1. +0.j, 1. +0.j, 0.2+0.j, 0.2+0.j]),\n",
" SparsePauliOp(['IXXI', 'IIZI', 'ZIII'],\n",
" coeffs=[1. +0.j, 0.2+0.j, 0.2+0.j])]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H.ham_par"
]
},
{
"cell_type": "markdown",
"id": "efde70d6",
"metadata": {},
"source": [
"## Power-law interaction\n",
"```{math}\n",
"\n",
"$$\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",
"```"
"$$"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"id": "5c75d90b",
"metadata": {},
"outputs": [
Expand All @@ -82,16 +115,49 @@
" 1. +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j, 0.2 +0.j])"
]
},
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H = spin.Power_Law(4, alpha=4, Jx=1, hz=0.2)\n",
"H = Power_Law(4, alpha=4, Jx=1, hz=0.2)\n",
"H.ham"
]
},
{
"cell_type": "markdown",
"id": "86aeee6d",
"metadata": {},
"source": [
"### XYZ grouping"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "5cbde227",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[SparsePauliOp(['IIXX', 'IXIX', 'XIIX', 'IXXI', 'XIXI', 'XXII'],\n",
" coeffs=[1. +0.j, 0.0625 +0.j, 0.012346+0.j, 1. +0.j, 0.0625 +0.j,\n",
" 1. +0.j]),\n",
" SparsePauliOp(['IIIZ', 'IIZI', 'IZII', 'ZIII'],\n",
" coeffs=[0.2+0.j, 0.2+0.j, 0.2+0.j, 0.2+0.j])]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H.ham_xyz"
]
},
{
"cell_type": "markdown",
"id": "14bd5369",
Expand Down
Loading

0 comments on commit e7955ca

Please sign in to comment.