diff --git a/docs/tutorials/binary_code_transforms.ipynb b/docs/tutorials/binary_code_transforms.ipynb index c6f37d268..a799fcbf4 100644 --- a/docs/tutorials/binary_code_transforms.ipynb +++ b/docs/tutorials/binary_code_transforms.ipynb @@ -95,7 +95,7 @@ "source": [ "## Introduction\n", "\n", - "Molecular Hamiltonians are known to have certain symmetries that are not taken into account by mappings like the Jordan-Wigner or Bravyi-Kitaev transform. The most notable of such symmetries is the conservation of the total number of particles in the system. Since those symmetries effectively reduce the degrees of freedom of the system, one is able to reduce the number of qubits required for simulation by utilizing binary codes (arXiv:1712.07067). \n", + "Molecular Hamiltonians are known to have certain symmetries that are not taken into account by mappings like the Jordan-Wigner or Bravyi-Kitaev transform. The most notable of such symmetries is the conservation of the total number of particles in the system. Since those symmetries effectively reduce the degrees of freedom of the system, one is able to reduce the number of qubits required for simulation by utilizing binary codes ([arXiv:1712.07067](https://arxiv.org/abs/1712.07067)). \n", "\n", "We can represent the symmetry-reduced Fermion basis by binary vectors of a set $\\mathcal{V} \\ni \\boldsymbol{\\nu}$, with $ \\boldsymbol{\\nu} = (\\nu_0, \\, \\nu_1, \\dots, \\, \\nu_{N-1} ) $, where every component $\\nu_i \\in \\lbrace 0, 1 \\rbrace $ and $N$ is the total number of Fermion modes. These binary vectors $ \\boldsymbol{\\nu}$ are related to the actual basis states by: $$\n", "\\left[\\prod_{i=0}^{N-1} (a_i^{\\dagger})^{\\nu_i} \\right] \\left|{\\text{vac}}\\right\\rangle \\, ,\n", @@ -175,7 +175,7 @@ "id": "03e9717ebd49" }, "source": [ - "The code used in the example above, is in fact the (odd) Checksum code, and is implemented already - along with a few other examples from arxiv:1712.07067. In addition to the $\\text{checksum_code}$ the functions $\\text{weight_one_segment_code}$, $\\text{weight_two_segment_code}$, that output a subcode each, as well as $\\text{weight_one_binary_addressing_code}$ can be found under openfermion.transforms._code_transform_functions.\n", + "The code used in the example above, is in fact the (odd) Checksum code, and is implemented already - along with a few other examples from [arxiv:1712.07067](https://arxiv.org/abs/1712.07067). In addition to the $\\text{checksum_code}$ the functions $\\text{weight_one_segment_code}$, $\\text{weight_two_segment_code}$, that output a subcode each, as well as $\\text{weight_one_binary_addressing_code}$ can be found under openfermion.transforms._code_transform_functions.\n", "\n", "There are two other ways to construct new codes from the ones given - both of them can be done conveniently with symbolic operations between two code objects $(\\boldsymbol{e}, \\boldsymbol{d})$ and $(\\boldsymbol{e^\\prime}, \\boldsymbol{d^\\prime})$ to yield a new code $(\\boldsymbol{e^{\\prime\\prime}}, \\boldsymbol{d^{\\prime\\prime}})$:" ] diff --git a/docs/tutorials/bosonic_operators.ipynb b/docs/tutorials/bosonic_operators.ipynb index babb63208..84e4301ff 100644 --- a/docs/tutorials/bosonic_operators.ipynb +++ b/docs/tutorials/bosonic_operators.ipynb @@ -858,13 +858,15 @@ "source": [ "## Bose-Hubbard Hamiltonian\n", "\n", - "In addition to the bosonic operators discussed above, we also provide Bosonic Hamiltonians that describe specific models. The Bose-Hubbard Hamiltonian over a discrete lattice or grid described by nodes $V=\\{0,1,\\dots,N-1\\}$ is described by:\n", + "In addition to the bosonic operators discussed above, we also provide Bosonic Hamiltonians that describe specific models. The Bose-Hubbard Hamiltonian over a discrete lattice or grid described by nodes $\\{0,1,\\dots,N-1\\}$ is described by:\n", + "\n", + "$$\n", + "H = - t \\sum_{\\langle i, j \\rangle} (b_i^\\dagger b_{j} + b_j^\\dagger b_i) +\n", + " \\frac{U}{2} \\sum_{k=0}^{N-1} b_k^\\dagger b_k (b_k^\\dagger b_k - 1) -\n", + " \\mu \\sum_{k=0}^{N-1} b_k^\\dagger b_k +\n", + " V \\sum_{\\langle i, j \\rangle} b_i^\\dagger b_i b_j^\\dagger b_j.\n", + "$$\n", "\n", - "$$H = - t \\sum_{\\langle i, j \\rangle} b_i^\\dagger b_{j + 1}\n", - " + \\frac{U}{2} \\sum_{k=1}^{N-1} b_k^\\dagger b_k (b_k^\\dagger b_k - 1)\n", - " - \\mu \\sum_{k=1}^N b_k^\\dagger b_k\n", - " + V \\sum_{\\langle i, j \\rangle} b_i^\\dagger b_i b_j^\\dagger b_j.$$\n", - " \n", "where\n", "\n", "- The indices $\\langle i, j \\rangle$ run over pairs\n", @@ -921,7 +923,7 @@ "id": "04673b1d4a9c" }, "source": [ - "Like the fermionic operators, OpenFermion contains the capability to represent bosonic operators as a sparse matrix (`sparse.csc_matrix`). However, as the fermionic operators can be represented as finite matrices, this is not the case of bosonic systems, as they inhabit a infinite-dimensional Fock space. Instead, a integer truncation value $N$ need to be provided - the returned sparse operator will be of size $N^{M}\\times N^{M}$, where $M$ is the number of modes in the system, and acts on the truncated Fock basis $\\{\\left|{0}\\right\\rangle, \\left|{1}\\right\\rangle, \\dots, \\left|{N-1}\\right\\rangle\\}$." + "Like the fermionic operators, OpenFermion contains the capability to represent bosonic operators as a sparse matrix (`sparse.csc_matrix`). However, while the fermionic operators can be represented as finite matrices, this is not the case for bosonic systems, as they inhabit a infinite-dimensional Fock space. Instead, an integer truncation value $N$ needs to be provided - the returned sparse operator will be of size $N^{M}\\times N^{M}$, where $M$ is the number of modes in the system, and acts on the truncated Fock basis $\\{\\left|{0}\\right\\rangle, \\left|{1}\\right\\rangle, \\dots, \\left|{N-1}\\right\\rangle\\}$." ] }, { diff --git a/docs/tutorials/jordan_wigner_and_bravyi_kitaev_transforms.ipynb b/docs/tutorials/jordan_wigner_and_bravyi_kitaev_transforms.ipynb index 740bcfd88..0cb2bb352 100644 --- a/docs/tutorials/jordan_wigner_and_bravyi_kitaev_transforms.ipynb +++ b/docs/tutorials/jordan_wigner_and_bravyi_kitaev_transforms.ipynb @@ -364,8 +364,7 @@ "\n", "Under the JWT, Steps 1, 2, and 3 are represented by the operator $(\\lvert{0}\\rangle\\langle{1}\\rvert)_p$ and Step 4 is accomplished by the operator $Z_{0} \\cdots Z_{p-1}$ (Step 3 actually requires no action).\n", "Under the parity transform, Steps 1, 2, and 4 are represented by the operator\n", - "$(\\lvert{0}\\rangle\\langle{1}\\rvert)_p (\\lvert{0}\\rangle\\langle{0}\\rvert)_{p - 1} -\n", - "(\\lvert{0}\\rangle\\langle{1}\\rvert)_p (\\lvert{1}\\rangle\\langle{1}\\rvert)_{p - 1}$ and Step 3 is accomplished by the operator $X_{p+1} \\cdots X_{N-1}$.\n", + "$(\\lvert{0}\\rangle\\langle{1}\\rvert)_p (\\lvert{0}\\rangle\\langle{0}\\rvert)_{p - 1} - (\\lvert{0}\\rangle\\langle{1}\\rvert)_p (\\lvert{1}\\rangle\\langle{1}\\rvert)_{p - 1}$ and Step 3 is accomplished by the operator $X_{p+1} \\cdots X_{N-1}$.\n", "\n", "To obtain a simpler description of these and other transforms (with an aim at generalizing), it is better to put aside the ladder operators and work with an alternative set of $2N$ operators defined by\n", "$$c_p = a_p + a_p^\\dagger\\,, \\qquad d_p = -\\mathrm{i} (a_p - a_p^\\dagger)\\,.$$\n",