Skip to content

Commit

Permalink
Fix some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jotterbach committed Oct 11, 2017
1 parent 0d28b5d commit f8c5026
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
4 changes: 3 additions & 1 deletion grove/amplification/amplification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<https://arxiv.org/abs/quant-ph/0301079>`_ 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
Expand Down
23 changes: 12 additions & 11 deletions grove/simon/simon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f8c5026

Please sign in to comment.