Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "1098ddd2-2ed0-48c1-a27a-d96e0380e85c",
"metadata": {},
"source": [
"The following demo will exaplin the Oblivious Amplitude Amplification algorithm (OAA) [[2](#OAA)], which can be used as a building block in algorithms such as hamiltonian simulations. We start with a short recap, then show how to use it in conjunction with the Linear Combination of Unitaries (LCU) algorithm."
"This demo explains the Oblivious Amplitude Amplification algorithm (OAA) [[2](#OAA)], which can be used as a building block in algorithms such as Hamiltonian simulations. We start with a short recap, then show how to use it in conjunction with the Linear Combination of Unitaries (LCU) algorithm."
]
},
{
Expand Down Expand Up @@ -43,23 +43,23 @@
"id": "5a454632-6a75-4754-9efe-9d31fbd0a90f",
"metadata": {},
"source": [
"### Recap - Amplitude Amplification"
"### Recap: Amplitude Amplification"
]
},
{
"cell_type": "markdown",
"id": "38c674ef-ffb6-480e-9ee1-4c09773316e8",
"metadata": {},
"source": [
"Ref. [[1](#AA)] shows how to use the Grover operator in order to amplify specific state. In detail, given a unitary $A$ to prepare a state $|\\psi\\rangle$:\n",
"Ref. [[1](#AA)] shows how to use the Grover operator to amplify a specific state. In detail, given a unitary $A$ to prepare a state $|\\psi\\rangle$:\n",
"$$\n",
"A|0\\rangle = |\\psi\\rangle = a|\\psi_0\\rangle + \\sqrt{1-a^2}|\\psi_1\\rangle\n",
"$$\n",
"And a unitary $R_{\\psi_1}$ to implement a reflection over the state $\\psi_1$, which we want to decrease its amplitude.\n",
"and a unitary $R_{\\psi_1}$ to implement a reflection over the state $\\psi_1$. We want to decrease the amplitude of $R_{\\psi_1}$:\n",
"$$\n",
"R_{\\psi_1}(a|\\psi_0\\rangle + \\sqrt{1-a^2}|\\psi_1\\rangle) = a|\\psi+0\\rangle - \\sqrt{1-a^2}|\\psi_1\\rangle\n",
"$$\n",
"$|\\psi_0\\rangle$, $|\\psi_1\\rangle$ define a 2-dimensinal subspace where the applications of the grover operator are effectively rotations. To do that we also need to do a reflection about the initial state $|\\psi\\rangle$:\n",
"where $|\\psi_0\\rangle$, $|\\psi_1\\rangle$ define a two-dimensional subspace where the applications of the Grover operator are effectively rotations. To do that we also need to do a reflection about the initial state $|\\psi\\rangle$:\n",
"$$S_\\psi = AR_0A^{\\dagger}$$\n",
"where $R_0$ is a reflection about the $|0\\rangle$ state.\n",
"\n",
Expand All @@ -84,25 +84,25 @@
"id": "27e16bc7-41fe-4702-aedf-ce3e080a9d84",
"metadata": {},
"source": [
"### Why do we need another version of Amplitude Amplification?"
"### Why Do We Need Another Version of Amplitude Amplification?"
]
},
{
"cell_type": "markdown",
"id": "d1430ffc-605d-4c35-88db-107974e40850",
"metadata": {},
"source": [
"As you might have noticed, the amplification require to have the \"recipe\" $A$ for the preparation of $\\psi$, and to use it in order to perform the reflection about the initial state.\n",
"As you might have noticed, the amplification requires the \"recipe\" $A$ for the preparation of $\\psi$, and uses it to perform the reflection around the initial state.\n",
"\n",
"In certain scenarios, such as in hamiltonian simulation, we might not be able to create the initial state, or it will be very non-efficient. Specifically, let us look on a $(s, l, 0)$-block-encoding $W$ of a matrix $U$:\n",
"In certain scenarios, such as in Hamiltonian simulations, we might not be able to create the initial state or it is very inefficient. Specifically, we look at a $(s, l, 0)$-block-encoding $W$ of a matrix $U$:\n",
"$$\n",
"W|0^l\\rangle|\\psi\\rangle = \\frac{1}{s}|0^l\\rangle U|\\psi\\rangle + \\sqrt{1-\\frac{1}{s^2}}|\\phi\\rangle\n",
"$$\n",
"(For a detailed explanations about block encodings and hamiltonian simiulation, see [this demo](https://github.com/Classiq/classiq-library/blob/main/tutorials/popular_usage_examples/hamiltonian_simulation/hamiltonian_simulation_with_block_encoding/hamiltonian_simulation_with_block_encoding.ipynb).\n",
"(For detailed explanations of block encodings and Hamiltonian simulations, see [this demo](https://github.com/Classiq/classiq-library/blob/main/tutorials/popular_usage_examples/hamiltonian_simulation/hamiltonian_simulation_with_block_encoding/hamiltonian_simulation_with_block_encoding.ipynb).)\n",
"\n",
"We want to amplify the amplitude of the state that is in the block, i.e. $|0^l\\rangle U|\\psi\\rangle$. This sometimes can be done in post-selection, but if we use $W$ more than once in the algorithm, then the amplitude to sample the \"good\" states will exponentially decrease.\n",
"We want to amplify the amplitude of the state that is in the block, i.e., $|0^l\\rangle U|\\psi\\rangle$. This sometimes can be done in post-selection, but if we use $W$ more than once in the algorithm, then the amplitude to sample the \"good\" states exponentially decreases.\n",
"\n",
"It turns out however, that if $U$ is unitary, then we can reflect about the initial state $W|0^l\\rangle|\\psi\\rangle$ for any $|\\psi\\rangle$, using the operator $WRW^\\dagger$ where $R=(I-2|0^l\\rangle\\langle0^l|\\otimes) I$ which is analogus to the reflection about the zero state. Then we get the same effective 2d picture! So in order to get $|0^l\\rangle U |\\psi\\rangle$ with probability $\\thicksim 1$, around $\\thicksim s$ Grover iterations are needed."
"It turns out, however, that if $U$ is unitary, then we can reflect about the initial state $W|0^l\\rangle|\\psi\\rangle$ for any $|\\psi\\rangle$ using the operator $WRW^\\dagger$ where $R=(I-2|0^l\\rangle\\langle0^l|\\otimes) I$, which is analogus to the reflection about the zero state. Then we get the same effective 2D picture! So, to get $|0^l\\rangle U |\\psi\\rangle$ with probability $\\thicksim 1$, roughly $\\thicksim s$ Grover iterations are needed."
]
},
{
Expand All @@ -123,7 +123,7 @@
"id": "e0a9349e-d725-41c2-a582-34ec5ae7e2ed",
"metadata": {},
"source": [
"# How to Build the Algorithm with Classiq"
"## Building the Algorithm with Classiq"
]
},
{
Expand All @@ -144,7 +144,7 @@
"id": "68054735-8abb-4780-96d7-d13462b0e277",
"metadata": {},
"source": [
"## Example: Unitary LCU amplification"
"### Example: Unitary LCU Amplification"
]
},
{
Expand All @@ -160,7 +160,7 @@
"id": "be963e76-0a5f-4c51-8dfc-2f4b8031ee0d",
"metadata": {},
"source": [
"### Block Encoding the Hamiltonian"
"#### Block Encoding the Hamiltonian"
]
},
{
Expand Down Expand Up @@ -276,7 +276,7 @@
"id": "6c587903-9243-4ac4-9fac-d1085fa58119",
"metadata": {},
"source": [
"### Block Encoding Amplification"
"#### Block Encoding Amplification"
]
},
{
Expand Down Expand Up @@ -412,15 +412,15 @@
"id": "4ed86f90-23c7-4306-9301-420b9938db12",
"metadata": {},
"source": [
"## Extending to the case where $U$ is non unitary"
"### Extending to the Case where $U$ is Non-unitary"
]
},
{
"cell_type": "markdown",
"id": "2c4bbee6-e8ce-45b5-b635-4124ac56bdf0",
"metadata": {},
"source": [
"It was proven that when $U$ is close to unitary, it is still possible to amplify (using the same operators) and get a good approximation. It was termed \"Robust Oblivious Amplitude Amplification\" [[3](#ROAA)]. This is usually the case in hamiltonian simulation when the LCU reprsents a truncated series which is only an approximation of the unitary $e^{-iHt}$."
"It was proven that when $U$ is close to unitary, it is still possible to amplify (using the same operators) and get a good approximation. This is termed \"Robust Oblivious Amplitude Amplification\" [[3](#ROAA)]. This is usually the case in Hamiltonian simulation when the LCU reprsents a truncated series which is only an approximation of the unitary $e^{-iHt}$."
]
},
{
Expand All @@ -438,9 +438,9 @@
"\n",
"<a name='AA'>[1]</a>: [Brassard, Gilles, et al. \"Quantum Amplitude Amplification and Estimation.\" arXiv preprint quant-ph/0005055 (2000).](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=b5588e34d24e9a09c00a93b80af0581460aff464)\n",
"\n",
"<a name='OAA'>[2]</a>: [Berry, Dominic W., et al. \"Exponential improvement in precision for simulating sparse Hamiltonians.\" Proceedings of the forty-sixth annual ACM symposium on Theory of computing. 2014.](https://dl.acm.org/doi/abs/10.1145/2591796.2591854)\n",
"<a name='OAA'>[2]</a>: [Berry, Dominic W., et al. \"Exponential improvement in precision for simulating sparse Hamiltonians.\" Proceedings of the forty-sixth annual ACM symposium on Theory of Computing. 2014.](https://dl.acm.org/doi/abs/10.1145/2591796.2591854)\n",
"\n",
"<a name='ROAA'>[3]</a>: [Berry, Dominic W., et al. \"Simulating Hamiltonian dynamics with a truncated Taylor series.\" Physical review letters 114.9 (2015): 090502.](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.114.090502)\n"
"<a name='ROAA'>[3]</a>: [Berry, Dominic W., et al. \"Simulating Hamiltonian dynamics with a truncated Taylor series.\" Physical Review Letters 114.9 (2015): 090502.](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.114.090502)\n"
]
}
],
Expand Down
Loading