量子搜索算法基础: Quantum Amplititude Amplification

本文介绍了量子搜索算法的核心—Grover的振幅放大技巧,该技术可将经典计算机在未结构化搜索问题上的平均查找步数从N/2减少到大约√N。文章详细阐述了创建oracle、振幅放大的步骤,展示了如何通过量子计算机的反射操作提高找到目标状态的概率,从而实现平方级的运行时间改进。
摘要由CSDN通过智能技术生成

1. Introduction

You have likely heard that one of the many advantages a quantum computer has over a classical computer is its superior speed searching databases. Grover’s algorithm demonstrates this capability. This algorithm can speed up an unstructured search problem quadratically, but its uses extend beyond that; it can serve as a general trick or subroutine to obtain quadratic run time improvements for a variety of other algorithms. This is called the amplitude amplification trick.

两步走:1. 反转目标状态的振幅;2. 根据平均值再翻转。

2. Unstructured Search

Suppose you are given a large list of N items. Among these items there is one item with a unique property that we wish to locate; we will call this one the winner w. Think of each item in the list as a box of a particular color. Say all items in the list are gray except the winner w, which is purple.
在这里插入图片描述

To find the purple box – the marked item – using classical computation, one would have to check on average N/2 of these boxes, and in the worst case, all N of them. On a quantum computer, however, we can find the marked item in roughly \sqrt{N} steps with Grover’s amplitude amplification trick. A quadratic speedup is indeed a substantial time-saver for finding marked items in long lists. Additionally, the algorithm does not use the list’s internal structure, which makes it generic; this is why it immediately provides a quadratic quantum speed-up for many classical problems.

3. Creating an Oracle

For the examples in this textbook, our ‘database’ is comprised of all the possible computational basis states our qubits can be in. For example, if we have 3 qubits, our list is the states |000\rangle, |001\rangle, \dots |111\rangle (i.e the states |0\rangle \rightarrow |7\rangle).

Grover’s algorithm solves oracles that add a negative phase to the solution states. I.e. for any state ∣ x ⟩ |x\rangle x in the computational basis:

U ω ∣ x ⟩ = { − ∣ x ⟩ if    x ≠ ω − ∣ x ⟩ if    x = ω U_\omega|x\rangle = \bigg\{ \begin{aligned} \phantom{-}|x\rangle \quad \text{if} \; x \neq \omega \\ -|x\rangle \quad \text{if} \; x = \omega \\ \end{aligned} Uωx={ xifx=ωxifx=ω
This oracle will be a diagonal matrix, where the entry that correspond to the marked item will have a negative phase. For example, if we have three qubits and \omega = \text{101}, our oracle will have the matrix:

U ω = [ 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 − 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 ] ← ω = 101 U_\omega = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ \end{bmatrix} \begin{aligned} \\ \\ \\ \\ \\ \\ \leftarrow \omega = \text{101}\\ \\ \\ \\ \end{aligned} Uω=10000000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值