Skip to content

Commit

Permalink
update docs examples, remove examples directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Nov 27, 2023
1 parent bdbaf42 commit dd1efdd
Show file tree
Hide file tree
Showing 14 changed files with 369 additions and 399 deletions.
3 changes: 2 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
### Week 2: (27 Nov 23)

- [x] Qmatrix
- [ ] Move all examples to doc
- [x] Hash function preimage attack notebook
- [x] Move all examples to doc
- [ ] Improve documentation
- [ ] First stable release

Expand Down
114 changes: 114 additions & 0 deletions docs/source/example_unitary_of_f.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Unitary of qlasskit function"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"QlassF<f>(a:bool, b:bool) -> bool:\n",
"\t_ret = a ^ ~b\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAATEAAAEvCAYAAAAtufaDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAbfElEQVR4nO3de3RU5b3/8feeBHKPEAIN5AIECIRb8CRSw6lCqBcoolK1aim1/vits6xaspYcYi/LRbu6Vike1FP0tIWKP6tdYlqLlhI5ehQ8RkQNN0tN5B7MbdCRQEhIIJnZvz9GkEgCyWRuz+TzWmtWYPbl+e4k88mzn/3MHsu2bRsREUM5Ql2AiEhfKMRExGgKMRExmkJMRIymEBMRoynERMRoCjERMZpCTESMphATEaMpxETEaAoxETGaQkxEjKYQExGjKcRExGgKMRExmkJMRIymEBMRoynERMRoCjERMZpCTESMphATEaMpxETEaAoxETGaQkxEjKYQExGjKcRExGgKMRExmkJMRI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0RRiImI0hZiIGE0hJiJGU4iJiNEUYiJiNIWYiBhNISYiRlOIiYjRFGIiYjSFmIgYTSEmIkZTiImI0RRiImI0hZiIGE0hJiJGU4iJiNEUYiJiNIWYiBhNISYiRlOIiYjRFGIiYjSFmIgYTSEmIkZTiImI0RRiImI0hZiIGE0hJiJGU4iJiNEUYiJiNIWYiBhNISYiRlOIiYjR/j8N3ztAInu47AAAAABJRU5ErkJggg==",
"text/plain": [
"<Figure size 371.107x367.889 with 1 Axes>"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from qiskit import Aer, QuantumCircuit, transpile, execute\n",
"from qiskit.visualization import array_to_latex\n",
"from qlasskit import qlassf\n",
"\n",
"@qlassf\n",
"def f(a: bool, b: bool) -> bool:\n",
" return a ^ (not b)\n",
"\n",
"print(f\"\\n{f}\\n\")\n",
"\n",
"qc = QuantumCircuit(f.num_qubits, f.num_qubits)\n",
"qc.append(f.gate(), f.qubits)\n",
"\n",
"qc.decompose().draw('mpl')\n"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$$\n",
"\n",
"\\begin{bmatrix}\n",
"0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\\\\n",
" 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n",
" 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\\\\n",
" 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\\\\n",
" 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n",
" 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\\\\n",
" 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\\\\n",
" 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\\\\n",
" \\end{bmatrix}\n",
"$$"
],
"text/plain": [
"<IPython.core.display.Latex object>"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simulator = Aer.get_backend('unitary_simulator')\n",
"job = execute(qc, simulator, shots=8192)\n",
"result = job.result()\n",
"array_to_latex(result.get_unitary(qc,3), max_size=16)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "qlasskit_310-env",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
251 changes: 251 additions & 0 deletions docs/source/how_it_works.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit dd1efdd

Please sign in to comment.