From d9353dc4afb82093dca6fd1598f5445c838f47fc Mon Sep 17 00:00:00 2001 From: James Wootton Date: Tue, 3 May 2022 09:38:26 +0200 Subject: [PATCH] ex9 --- exercises/Exercise9.ipynb | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 exercises/Exercise9.ipynb diff --git a/exercises/Exercise9.ipynb b/exercises/Exercise9.ipynb new file mode 100644 index 0000000..de95a78 --- /dev/null +++ b/exercises/Exercise9.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exercise 9\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Grover's algorithm for two qubits\n", + "\n", + "(a) Implement an oracle and diffusion operator to search all strings of two bits to find `01`.\n", + "\n", + "(b) Run the algorithm, and determine how many iterations are required to output `01` with high probability." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Grover's algorithm for three qubits\n", + "\n", + "(a) Implement an oracle and diffusion operator to search all strings of three bits to find `100`.\n", + "\n", + "(b) Run the algorithm, and determine how many iterations are required to output `100` with high probability." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "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.9.1" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}