mirror of
https://github.com/quantumjim/Quantum-Computation-course-Basel.git
synced 2025-11-09 00:34:26 +01:00
62 lines
1.4 KiB
Plaintext
62 lines
1.4 KiB
Plaintext
{
|
|
"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
|
|
}
|