Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Josh Izaac <josh146@gmail.com>
  • Loading branch information
nquesada and josh146 authored Jul 18, 2019
1 parent df4f70f commit 36c2c00
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/gbs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ where :math:`\Gamma` is hermitian and positive definite, while :math:`C` is symm
Gaussian states in the quadrature basis
***************************************

Historically, Gaussian states are parametrized not in terms of the covariance matrix :math:`\sigma` of the complex amplitudes :math:`\alpha_j` but rather in terms of its quadrature components, the canonical positions :math:`q_j` and canonical momenta :math:`p_j` as follows
Historically, Gaussian states are parametrized not in terms of the covariance matrix :math:`\sigma` of the complex amplitudes :math:`\alpha_j`, but rather in terms of its quadrature components, the canonical positions :math:`q_j` and canonical momenta :math:`p_j`,

.. math::
\alpha_j = \frac{1}{\sqrt{2 \hbar}} \left( q_j+ i p_j \right),
Expand Down
2 changes: 1 addition & 1 deletion docs/gbs_sampling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where :math:`p(N_{k-1}=n_{k-1},\ldots,N_0=n_0)` has already been calculated from

* To generate samples from a gaussian state specified by a quadrature covariance matrix use :func:`hafnian.samples.generate_hafnian_sample`.

Note that the above algorithm can also be generalized to states with finite means for which one only needs to provide the mean with the optional argument ``mean``.
Note that the above algorithm can also be generalized to states with finite means for which one only needs to provide the mean with the optional argument ``mean``.


Threshold detection samples
Expand Down
8 changes: 4 additions & 4 deletions docs/hermite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ In the next section, where we discuss Gaussian states we will explain how these

Generating function definition
******************************
Given two complex vectors :math:`\alpha,\beta \in \mathbb{C}^\ell` and a symmetric matrix :math:`\mathbf{B} = \mathbf{B}^T \in \mathbb{C}^{\ell \times \ell}`
Given two complex vectors :math:`\alpha,\beta \in \mathbb{C}^\ell` and a symmetric matrix :math:`\mathbf{B} = \mathbf{B}^T \in \mathbb{C}^{\ell \times \ell}`,

.. math::
G_B(\alpha,\beta) = \exp\left( \alpha \mathbf{B} \beta^T - \tfrac{1}{2}\beta \mathbf{B} \beta^T\right) = \sum_{\mathbf{m} \geq \mathbf{0}} \prod_{i=1}^{\ell} \frac{\beta_i^{n_i}}{n_i} H_{\mathbf{m}}^{(\mathbf{B})}(\alpha),
where the notation :math:`\mathbf{m} \geq 0` is used to indicate that the sum goes over all vectors in :math:` \mathbb{N}^{\ell}_0`, the set of vectors of nonnegative integers of size :math:`\ell`. This generating function provides an implicit definition of the multidimensional Hermite polynomials.
where the notation :math:`\mathbf{m} \geq 0` is used to indicate that the sum goes over all vectors in :math:` \mathbb{N}^{\ell}_0` (the set of vectors of nonnegative integers of size :math:`\ell`). This generating function provides an implicit definition of the multidimensional Hermite polynomials.
It is also straightforward to verify that :math:`H_{\mathbf{0}}^{(\mathbf{B})}(\alpha) = 1`.

In the one dimensional case, :math:`\ell=1`, one can compare the generating function above with the ones for the "probabilists' Hermite polynomials" :math:`He_n(x)` and "physicists' Hermite polynomials" :math:`H_n(x)` to find
Expand All @@ -42,7 +42,7 @@ Based on the generating function introduced in the previous section one can deri
H_{\mathbf{m}+\mathbf{e}_i}^{(\mathbf{B})}(\alpha) - \sum_{j=1}^\ell B_{i,j} \alpha_j H_{\mathbf{m}}^{(\mathbf{B})}(\alpha) + \sum_{j=1}^\ell B_{i,j} m_j H_{\mathbf{m}-\mathbf{e}_j}^{(\mathbf{B})}(\alpha) = 0,
where :math:`\mathbf{e}_j` is a vector with zeros in all its entries except in the :math:`i^{\text{th}}` one.
where :math:`\mathbf{e}_j` is a vector with zeros in all its entries except in the :math:`i^{\text{th}}` element.



Expand All @@ -57,4 +57,4 @@ Using this recursion relation one can calculate all the multidimensional Hermite


The connection between the multidimensional Hermite polynomials and **pure** Gaussian states was reported by Wolf :cite:`wolf1974canonical`, and later by Kramer, Moshinsky and Seligman :cite:`kramer1975group`. This same connection was also pointed out by Doktorov, Malkin and Man'ko in the context of vibrational modes of molecules :cite:`doktorov1977dynamical`.
Furthermore, this connection was later generalized to **mixed** Gaussian states by Dodonov, Man'ko and Man'ko :cite:`dodonov1994multidimensional`.
Furthermore, this connection was later generalized to **mixed** Gaussian states by Dodonov, Man'ko and Man'ko :cite:`dodonov1994multidimensional`.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Features

* An easy to use interface to use the loop hafnian for Gaussian quantum state calculations

* State of the art algorithms to sample from (loop)hafnian and torontonians of graphs.
* State of the art algorithms to sample from (loop) hafnian and torontonians of graphs.

* Efficient classical methods for approximating the hafnian of non-negative matrices.

Expand Down

0 comments on commit 36c2c00

Please sign in to comment.