mirror of
https://github.com/quantumjim/Quantum-Computation-course-Basel.git
synced 2025-11-08 23:54:27 +01:00
ex9
This commit is contained in:
parent
409dc4b8c1
commit
d9353dc4af
61
exercises/Exercise9.ipynb
Normal file
61
exercises/Exercise9.ipynb
Normal file
@ -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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user