Skip to content

Commit 9feb9b7

Browse files
committed
fix readme and grover example
1 parent 77f1909 commit 9feb9b7

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ This tool will be useful for any algorithm that relies on a 'blackbox' function
1111

1212
Qlasskit implements circuit / gate exporters for Qiskit, Cirq, Qasm and Sympy.
1313

14-
14+
```bash
15+
pip install qlasskit
16+
```
1517

1618
```python
19+
from qlasskit import qlassf, Qint4
20+
1721
@qlassf
1822
def h(k: Qint4) -> bool:
1923
h = True

docs/source/example_grover_hash.ipynb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
{
3939
"cell_type": "code",
40-
"execution_count": 3,
40+
"execution_count": 6,
4141
"metadata": {},
4242
"outputs": [
4343
{
@@ -49,13 +49,10 @@
4949
}
5050
],
5151
"source": [
52-
"d = {}\n",
53-
"for x in range(2**4):\n",
54-
" for y in range(2**4):\n",
55-
" v = hex(hash_simp.original_f((x,y)))\n",
56-
" if v not in d:\n",
57-
" d[v] = 0\n",
58-
" d[v] += 1\n",
52+
"from collections import Counter\n",
53+
"\n",
54+
"d = Counter(hex(hash_simp.original_f((x, y))) for x in range(2**4) for y in range(2**4))\n",
55+
"\n",
5956
"print('Hash function output space:', len(d))"
6057
]
6158
},

0 commit comments

Comments
 (0)