mirror of
https://github.com/quantumjim/Quantum-Computation-course-Basel.git
synced 2025-11-08 16:14:25 +01:00
add ex2
This commit is contained in:
parent
2c850be70e
commit
490b9694d6
@ -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**
|
||||
|
||||
|
||||
95
exercises/Exercise2.ipynb
Normal file
95
exercises/Exercise2.ipynb
Normal file
@ -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",
|
||||
"\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",
|
||||
"<div>\n",
|
||||
"<img src=\"delayed.png\" width=\"500\"/>\n",
|
||||
"</div>\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 <N$ and $f(y)=y$ otherwise. Show that $U$ is unitary."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 3. Eigenstates of the order-finding operator\n",
|
||||
"\n",
|
||||
"* (a) Show that the following states are eigenstates of $U$,\n",
|
||||
"\n",
|
||||
"$$\n",
|
||||
"\\left| u_s \\right\\rangle = \\frac{1}{\\sqrt{r}} \\sum_{k=0}^{r-1} \\exp \\left[ \\frac{-2 \\pi i s k}{r} \\right] \\left| x^k \\,\\,\\, {\\rm mod}\\, N \\right\\rangle.\n",
|
||||
"$$\n",
|
||||
"\n",
|
||||
"Here $0 \\leq s \\leq r-1$, where $r$ is the smallest integer such that $x^r = 1 \\,\\,\\, {\\rm mod}\\, N$. Show also that the corresponding eigenvalues are $u_s = \\exp ( {2 \\pi i s}/{r} )$.\n",
|
||||
"\n",
|
||||
"* (b) There are also many states with eigenvalue $1$. What are these?\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user