From 36c2c0012d2d45fd23543882968640a23fa37f85 Mon Sep 17 00:00:00 2001 From: Nicolas Quesada Date: Thu, 18 Jul 2019 11:49:01 -0400 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Josh Izaac --- docs/gbs.rst | 2 +- docs/gbs_sampling.rst | 2 +- docs/hermite.rst | 8 ++++---- docs/index.rst | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/gbs.rst b/docs/gbs.rst index 9e892d755..fdb2ed6e7 100644 --- a/docs/gbs.rst +++ b/docs/gbs.rst @@ -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), diff --git a/docs/gbs_sampling.rst b/docs/gbs_sampling.rst index cbfd0a8c7..dc1a382da 100644 --- a/docs/gbs_sampling.rst +++ b/docs/gbs_sampling.rst @@ -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 diff --git a/docs/hermite.rst b/docs/hermite.rst index f72b73319..60775b269 100644 --- a/docs/hermite.rst +++ b/docs/hermite.rst @@ -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 @@ -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. @@ -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`. \ No newline at end of file +Furthermore, this connection was later generalized to **mixed** Gaussian states by Dodonov, Man'ko and Man'ko :cite:`dodonov1994multidimensional`. diff --git a/docs/index.rst b/docs/index.rst index ee258b9f9..ff3f7a2d5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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.