From 490b9694d6e82b7cb102c8bfb64c006cdb7ebb90 Mon Sep 17 00:00:00 2001 From: quantumjim Date: Tue, 15 Oct 2024 09:53:57 +0200 Subject: [PATCH] add ex2 --- README.md | 1 + exercises/Exercise2.ipynb | 95 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 exercises/Exercise2.ipynb diff --git a/README.md b/README.md index d4e83bd..de995b3 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ For some lectures there is also some extra content. We'll cover it if there is t Four sets of take-home exercises set throughout the course. There will be hints sessions at 16:15 on the dates that these are set. Solutions will be presented after the exercises have been graded. * [Exercise 1](exercises/Exercise1.ipynb): Set 01/10/2024, due 15/10/2024. +* [Exercise 2](exercises/Exercise2.ipynb): Set 15/10/2024, due 29/10/2024. **Note: These exercises form 50% of your final grade** diff --git a/exercises/Exercise2.ipynb b/exercises/Exercise2.ipynb new file mode 100644 index 0000000..c22d9dd --- /dev/null +++ b/exercises/Exercise2.ipynb @@ -0,0 +1,95 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exercise 2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Delayed measurement with Clifford only circuits\n", + "\n", + "In general, we can consider quantum circuits with classically-controlled operations: this is when measurements are made throught the circuit, with the outcomes being used to determine what gates are subsequently applied.\n", + "\n", + "Nevertheless, when reasoning about what kind of computations we can do with quantum circuits, it is simplest to consider only circuits of the form represented below.\n", + "\n", + "![](circuit_model.png)\n", + "\n", + "Here all measurements are deferred to the end, and so there are no classically-controlled operations.\n", + "\n", + "Remarkably, this comes with no loss of generality. This is because all classically-controlled operations (with measurement) can be replaced by fully quantum controlled gates (unitary and without measurement). For example\n", + "\n", + "
\n", + "\n", + "
\n", + "\n", + "Any circuit with classically-controlled gates can therefore be replaced by an equivalent one with only fully quantum gates and with all measurements deferred to the end. However, the gate set required for the latter will typically need to be more powerful that the set of unitary gates used in the former." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To show this, consider circuits for which classical-control is allowed, but for which the unitary part of all gates must be Clifford. Show that, in general, the equivalent circuit without classically-controlled gates requires non-Clifford gates." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Unitarity of the order-finding operator\n", + "\n", + "For integers $x$, $N$ and $L$ with $x < N \\leq 2^L-1$ and $\\rm { gcd} (x,N) = 1$, consider the following operation,\n", + "\n", + "$$\n", + "U = \\sum_{y=0}^{2^L-1} \\left| \\, f(y) \\, \\right\\rangle \\left\\langle \\,y \\, \\right|,\n", + "$$\n", + "\n", + "Where $f(y) = x \\times y \\,\\,\\, {\\rm mod}\\, N$ for $0 \\leq y