Quantum search algorithms

the oracle

  • 搜索空间: NNN 元素

  • 只关心[0,N1][0,N-1][0,N−1]的索引,不关注元素本身

  • 假设N=2nN=2^nN=2n,这样索引用nbitsn-bitsn−bits存储

  • MMM个解
    Quantum search algorithms

  • 假如我们有一个 a quantum oracle, with the ability to recognize solutions to the search problem.

    • The oracle is a unitary operator, OOO, defined by its action on the computational basis:
    • x>q>Ox>qf(x)>\left|x\right>\left|q\right>\stackrel{O}{\longrightarrow}\left|x\right>\left|q\oplus f(x)\right>∣x⟩∣q⟩⟶O​∣x⟩∣q⊕f(x)⟩
    • x>:\left|x\right>:∣x⟩:index register
    • f(x)=1f(x)=1f(x)=1的话oracle qubit qqq就翻转
    • 如果一开始oracle qubit 是0>1>2\frac{\left|0\right>-\left|1\right>}{\sqrt{2}}2​∣0⟩−∣1⟩​,那么末态就是:
    • x>0>1>2>O(1)f(x)x>0>1>2>\left| x \right>\left|\frac{\left|0\right>-\left|1\right>}{\sqrt{2}}\right>\stackrel{O}{\longrightarrow}(-1)^{f(x)}\left|x\right>\left|\frac{\left|0\right>-\left|1\right>}{\sqrt{2}}\right>∣x⟩∣∣∣​2​∣0⟩−∣1⟩​⟩⟶O​(−1)f(x)∣x⟩∣∣∣​2​∣0⟩−∣1⟩​⟩
    • 看到 oracle qubit总是没有改变,所以这个oracle可以这样干
      • 其实俺是有疑惑的
    • x>O(1)f(x)x>\left| x \right>\stackrel{O}{\longrightarrow}(-1)^{f(x)}\left|x\right>∣x⟩⟶O​(−1)f(x)∣x⟩
      • 这个oracle的作用是将解的相位移动了
        Quantum search algorithms

Deutsch-Jozsa算法

  • 场景:
    • alice 从02n10到2^n-10到2n−1间选择了一个数xxx,发给了Bob计算f(x)(constantorbalanced)f(x)(constant\quad or \quad balanced)f(x)(constantorbalanced),然后回复1或0.
  • 目标:
    • Alice 将判定Bob使用哪个函数呢?并且通信要尽可能少哦!!
  • 经典的要: 2n/2+12^n/2+12n/2+1次查询
  • 量子:1个查询,使用UfU_fUf​去计算f(x)f(x)f(x)
  • 下面的图就是通信过程:
    • 上面左是alice,下面左是oracle

    • ψ0>=0>n1>\left|\psi_0\right>=\left|0\right>^{\otimes n}\left|1\right>∣ψ0​⟩=∣0⟩⊗n∣1⟩

    • ψ1>=+>n>=\left|\psi_1\right>=\left|+\right>^{\otimes n}\left|-\right>=∣ψ1​⟩=∣+⟩⊗n∣−⟩=

      • 12nx=02n1x>12(0>1>)\frac{1}{\sqrt{2^n}}\sum\limits_{x=0}^{2^n-1}\left|x\right>\frac{1}{\sqrt{2}}(\left|0\right>-\left|1\right>)2n​1​x=0∑2n−1​∣x⟩2​1​(∣0⟩−∣1⟩)
    • ψ2>=12nx=02n1(1)f(x)x>12(0>1>)\left|\psi_2\right>=\frac{1}{\sqrt{2^n}}\sum\limits_{x=0}^{2^n-1}(-1)^{f(x)}\left|x\right>\frac{1}{\sqrt{2}}(\left|0\right>-\left|1\right>)∣ψ2​⟩=2n​1​x=0∑2n−1​(−1)f(x)∣x⟩2​1​(∣0⟩−∣1⟩)

      • HnH^{\otimes n}H⊗n作用在前面一大撮东西上面会变成啥呢?

      • x>=x1,x2,...,xn>\left|x\right>=\left|x_1,x_2,...,x_n\right>∣x⟩=∣x1​,x2​,...,xn​⟩

      • 看每个HHH作用后成了啥?成了0>+(1)x11>=\left|0\right>+(-1)^{x_1}\left|1\right>=∣0⟩+(−1)x1​∣1⟩=
        z=0z=1(1)zx1z>\sum\limits_{z=0}^{z=1}(-1)^{zx_1}\left|z\right>z=0∑z=1​(−1)zx1​∣z⟩

      • 所以xxx作用的话就成了 z=02n1(1)zxz>\sum\limits_{z=0}^{2^n-1}(-1)^{zx}\left|z\right>z=0∑2n−1​(−1)zx∣z⟩

      • 作用在一大群xxx上就是12nz=02n1x=02n1(1)f(x)+xzz>\frac{1}{\sqrt{2^n}}\sum\limits_{z=0}^{2^n-1}\sum\limits_{x=0}^{2^n-1}(-1)^{f(x)+xz}\left|z\right>2n​1​z=0∑2n−1​x=0∑2n−1​(−1)f(x)+xz∣z⟩

    • ψ3>=12nz=02n1x=02n1(1)f(x)+xzz>12(0>1>)\left|\psi_3\right>=\frac{1}{\sqrt{2^n}}\sum\limits_{z=0}^{2^n-1}\sum\limits_{x=0}^{2^n-1}(-1)^{f(x)+xz}\left|z\right>\frac{1}{\sqrt{2}}(\left|0\right>-\left|1\right>)∣ψ3​⟩=2n​1​z=0∑2n−1​x=0∑2n−1​(−1)f(x)+xz∣z⟩2​1​(∣0⟩−∣1⟩)

    • 我们只需要测量z=0“z=0”“z=0”的系数,便可知道啦!!
      Quantum search algorithms
      Quantum search algorithms
      Quantum search algorithms

the procedure

  • 搜索算法就像下面这样运行

  • The oracle may employ work qubits for its implementation,
    but the analysis of the quantum search algorithm involves
    only the n-qubit register.

  • Goal: to find a solution to the search problem, using the
    smallest possible number of the applications of the oracle.
    Quantum search algorithms

  • The quantum search algorithm consists of repeated application
    known as the Grover iteration or Grover operator, which we
    denote G. And it may be broken up into four steps:

    • Apply the oracle OOO.

    • Apply the Hadamard transform HnH^{\otimes n}H⊗n.

    • Perform a conditional phase shift with every computational
      basis state except |0⟩ receiving a phase shift of −1,

      • x(1)δxx\left|x\right⟩ \rightarrow−(−1)^{δ_x}\left|x\right⟩∣x⟩→−(−1)δx​∣x⟩
      • Show that the unitary operator corresponding to the phase shift in the G is 200I2|0⟩⟨0| − I2∣0⟩⟨0∣−I.
      • 显然200I2|0⟩⟨0| − I2∣0⟩⟨0∣−I作用在0|0⟩∣0⟩上是不变,其他你可以验证啊,
    • Apply the Hadamard transform HnH^{\otimes n}H⊗n.

  • Each of the operations in the G may be efficiently implemented
    on a quantum computer.

    • G=Hn(200I)HnOG=H^{\otimes n}(2|0⟩⟨0| − I)H^{\otimes n}OG=H⊗n(2∣0⟩⟨0∣−I)H⊗nO
      • 又看到了经常看到的东西了
        Quantum search algorithms

Quantum search algorithms

geometric visualization

  • GGG 可以被视为 a rotation in the two-dim space spanned by the starting vector |ψ⟩ and the superposition.
  • 来个定义哦
    • 假设有MMM个是解, 令α>=1NMxx>\left|\alpha\right>=\frac{1}{\sqrt{N-M}}\sum_x^{''}\left|x\right>∣α⟩=N−M​1​∑x′′​∣x⟩
    • β>=1Mxx>\left|\beta\right>=\frac{1}{\sqrt{M}}\sum_x^{'}\left|x\right>∣β⟩=M​1​∑x′​∣x⟩
    • 记得ψ>=1Nx=0N1x>=NMNα>+MNβ>\left|\psi\right>=\frac{1}{\sqrt{N}}\sum\limits_{x=0}^{N-1}\left|x\right>=\sqrt{\frac{N-M}{N}}\left|\alpha\right>+\sqrt{\frac{M}{N}}\left|\beta\right>∣ψ⟩=N​1​x=0∑N−1​∣x⟩=NN−M​​∣α⟩+NM​​∣β⟩
    • 从下面的图容易看出来,cosθ2=NMN\cos\frac{\theta}{2}=\sqrt{\frac{N-M}{N}}cos2θ​=NN−M​
    • 我们来看看GGG对ψ>\left|\psi\right>∣ψ⟩的作用
      • 先看OOO的作用,ψ>O=NMNα>MNβ>\left|\psi\right>\stackrel{O}{\longrightarrow}=\sqrt{\frac{N-M}{N}}\left|\alpha\right>-\sqrt{\frac{M}{N}}\left|\beta\right>∣ψ⟩⟶O​=NN−M​​∣α⟩−NM​​∣β⟩
        • 看出来是关于α\alpha 粥α粥对称
      • 2ψ><ψI2\left|\psi\right>\left<\psi\right|-I2∣ψ⟩⟨ψ∣−I是数学上的啥?
        • 初等反射阵啊!
          Quantum search algorithms
          Quantum search algorithms
          Quantum search algorithms

例子

  • Here is an explicit example illustrating how the quantum search
    algorithm works on a search space of size N=4N = 4N=4.
  • The oracle can be taken to be one of the four circuits:
    • 第一个图: 只有输入都是11的时候才会触发,其他类似

Quantum search algorithms

  • The whole circuit is as follows.
  • where the gates in the box perform 20000I2|00⟩⟨00| − I2∣00⟩⟨00∣−I.
    • 这意味着ψ>\left|\psi\right>∣ψ⟩

Quantum search algorithms

上一篇:\[2020][ASIACRYPT]Estimating quantum speedups for lattice sieves 亚密会报告文字版


下一篇:linux 在 scull 中使用旗标