Skip to content

Instantly share code, notes, and snippets.

@quantumjim
Created April 29, 2021 13:41
Show Gist options
  • Save quantumjim/bfa81091b94ec42aab9353882d39b637 to your computer and use it in GitHub Desktop.
Save quantumjim/bfa81091b94ec42aab9353882d39b637 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Effects of garbage in quantum circuits\n",
"\n",
"The CX gate performs the mapping $(i,j) \\rightarrow (i,i+j \\mod 2)$ from an input on two bits to an output on two bits It is interesting to note (though not relevant to the problem) that this mapping is not of the form $(z,0) \\rightarrow (z,f(z))$, as considered last week, since the function $f(i,j) = i+j \\mod 2$ does not require the whole input to be present for reversibility.\n",
"\n",
"Here are two circuits with a CX gate."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](circuits.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* (a) The first circuit is composed of both a quantum part and an irreversible classical part. Determine the final output bit $b$.\n",
"\n",
"* (b) Show that the second circuit effectively acts as a CX between the first and third qubits, but with the additional effect of producting a garbage qubit on the second.\n",
"\n",
"* (c) Replace the true CX in the first circuit with the garbage producing one from the second. Show that this changes the output bit.\n",
"\n",
"* (d) Show how the garbage producing CX can be corrected by uncomputation."
]
},
{
"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.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment