From f8c5026810fd27a0f6e9e9ee83c8687d40a96b38 Mon Sep 17 00:00:00 2001 From: Johannes Otterbach Date: Wed, 11 Oct 2017 01:08:07 -0700 Subject: [PATCH] Fix some docstrings --- grove/amplification/amplification.py | 4 +++- grove/simon/simon.py | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/grove/amplification/amplification.py b/grove/amplification/amplification.py index 2a0bce0..559a39c 100644 --- a/grove/amplification/amplification.py +++ b/grove/amplification/amplification.py @@ -60,7 +60,9 @@ def diffusion_program(qubits): operator is diag(1, -1, ..., -1). See C. Lavor, L.R.U. Manssur, and R. Portugal (2003) `Grover's Algorithm: Quantum Database - Search`_ for more information. + Search`_ for more information. + + .. _`Grover's Algorithm: Quantum Database Search`: https://arxiv.org/abs/quant-ph/0301079 :param qubits: A list of ints corresponding to the qubits to operate on. The operator operates on bistrings of the form diff --git a/grove/simon/simon.py b/grove/simon/simon.py index 50326ff..b4230d5 100644 --- a/grove/simon/simon.py +++ b/grove/simon/simon.py @@ -83,17 +83,18 @@ def create_valid_2to1_bitmap(mask, random_seed=None): where :math:`m` is a bit mask and :math:`\oplus` denotes the bit wise XOR operation. An example of such a function is the truth-table - ==== ==== - x f(x) - ==== ==== - 000 101 - 001 010 - 010 000 - 011 110 - 100 000 - 101 110 - 110 101 - 111 010 + ==== ==== + x f(x) + ==== ==== + 000 101 + 001 010 + 010 000 + 011 110 + 100 000 + 101 110 + 110 101 + 111 010 + ==== ==== Note that, e.g. both `000` and `110` map to the same value `101` and :math:`000 \oplus 110 = 110`. The same holds true for other pairs.