Skip to content

Commit

Permalink
Merge pull request #47 from dseuss/feat-docs
Browse files Browse the repository at this point in the history
Add images to example notebook
  • Loading branch information
dsuess committed Dec 13, 2017
2 parents 08e40cb + 89aebc1 commit a9a214b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions examples/mpnum_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Because the MPA has one physical leg per site, we have created a matrix product *state* (i.e. a tensor train). \n",
"Because the MPA has one physical leg per site, we have created a matrix product *state* (i.e. a tensor train). In the [graphical notation](http://mpnum.readthedocs.io/en/latest/intro.html#graphical-notation), this MPS looks like this\n",
"\n",
"![](http://mpnum.readthedocs.io/en/latest/_images/tensors_mps_no_names.png)\n",
"\n",
"Note that `mpnum` internally stores the local tensors of the matrix product representation on the right hand side. We see below how to obtain the \"dense\" tensor from an `MPArray`.\n",
"Dimension of each physical leg:"
]
},
Expand Down Expand Up @@ -585,7 +588,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Basic properties:"
"In graphical notation, `mpo` looks like this\n",
"\n",
"![](http://mpnum.readthedocs.io/en/latest/_images/notebook_mpo.png)\n",
"\n",
"It's basic properties are:"
]
},
{
Expand Down Expand Up @@ -853,7 +860,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The result is a new MPS, with local dimension changed by ``mpo``. The ``axes`` argument is optional and defaults to ``axes=(-1, 0)`` -- i.e. contracting, at each site, the last pyhsical index of the first factor with the first physical index of the second factor. More specifically, the ``axes`` argument specifies which _physical legs_ should be contracted: ``axes[0]`` specifies the physical in the first argument, and ``axes[1]`` specifies the physical leg in the second argument. This means that the same product can be achieved with"
"The result is a new MPS, with local dimension changed by ``mpo`` and looks like this:\n",
"\n",
"![](http://mpnum.readthedocs.io/en/latest/_images/notebook_mpo_mps.png)\n",
"\n",
"The ``axes`` argument is optional and defaults to ``axes=(-1, 0)`` -- i.e. contracting, at each site, the last pyhsical index of the first factor with the first physical index of the second factor. More specifically, the ``axes`` argument specifies which _physical legs_ should be contracted: ``axes[0]`` specifies the physical in the first argument, and ``axes[1]`` specifies the physical leg in the second argument. This means that the same product can be achieved with"
]
},
{
Expand Down

0 comments on commit a9a214b

Please sign in to comment.