如何从头开始创建量子电路


9

目前,我主要使用Eleanor Rieffel和Wolfgang Polak撰写的《量子计算的温和介绍》一书进行自学。

通过前面的章节和练习进行得相当顺利(幸运的是,前面的章节有很多示例),但是我在有关量子电路的第5章上陷入了困境。尽管我了解作者提出的概念,但也许由于缺乏示例,但我很难将这些概念应用于练习。

我遇到的问题(以及无法找到解决方案或详尽/介绍性的解释)的练习如下:

问题:

设计一个电路来创建: |Wn=1n(|0001+|0010+|0100)++|1000)|0000

并设计一个用于创建“哈代状态”的电路: 112(3|00+|01+|10+|11)

有人可以为我指出正确的方向或推荐我一些文献/教程,以便我可以更好地掌握这些练习吗?

可能是一个相关的问题: 构造电路以生成任意量子态的提示和技巧


1
我对Hardy状态不熟悉,但是您可以检查所写内容吗?它不是规范化的(有点琐碎的),所以我猜它不是您想要的。对于W状态,您可能想检查一下这个问题
DaftWullie

您是对的,我打错了字。我已经编辑了它们,现在它们是正确的/标准化的。谢谢你!
Joery

1
顺便说一下,本文arxiv.org/abs/quant-ph/0104030提供了一种构造任意量子态的通用技术。
悖论

Answers:


7

正如DaftWullie所指出的那样,关于 Wn在这里有很多答案。

对于Hardy状态问题(以及类似的许多其他任务),您可以按以下方法进行处理。

  • 从开始 |0...0 州。
  • 首先将第一个qubit置于“正确的状态”,这是一个状态 (α|0+β|1)|0...0,在哪里 αβ是分别以0和1开头的所有基本状态的相对权重。特别是对于Hardy状态,两个基本状态以0开头:112(3|00+|01) 两个基本状态以1开头 112(|10+|11); 它们的相对权重只是其幅度的平方和:912+112=1012112+112=212, 分别。因此,您需要将第一个量子位放入状态(1012|0+212|1) 使用 Ry 门。
  • 继续将第二个量子比特置于正确状态,应用受控 Ry以第一个量子位作为控制的门。为了正确理解前两个术语,您需要转换该术语1012|0|0 进入学期 112(3|00+|01),与转换正常状态相同 |0|0 进入 110(3|00+|01) 不影响状态 |1|0 (请注意,从较大的表达式切换到独立状态时要重新规范化!)为此,您可以执行0控制 Ry 以第一个量子位为控制,第二个量子位为目标。
  • 如果您有更多的量子位,则将继续执行此操作,使用更多的控制量子位来使旋转越来越具体。

如果您想要更正式,更不特别的说明,可以查看Shende,Bullock和Markov撰写的本文


您的回答很棒!我认为自己陷入困境是因为我尝试以自上而下的方式执行此操作,即从最终状态开始并尝试找到分解并接近基本状态。这和本文有很大的帮助,谢谢!
Joery

4

您可以通过将它们分为三个部分来简化“产生状态”问题:

  1. 准备所需的量值集合,而不必担心相位或哪个状态具有哪个量值。
  2. 修复阶段。
  3. 修正顺序。

现在考虑哈迪状态。我们需要达到什么程度?我们需要一个实例3/12 和的三个实例 1/12。我们可以通过保持不间断的“剩余振幅”状态来一次制造一个。

我们从处于一个状态的所有振幅开始,向左激励, 0|1000...00 where 0=1. What we want to do is move the excitation rightward while leaving behind the desired magnitudes. So to start we want to leave behind the magnitude 3/12. We can do that with a controlled Ry(θ0) operation, where the control is the leftmost qubit and the target is the qubit just to its right. By picking just the right value for θ, this will result in the state 3/12|1000...00+1|1100...00. We then CNOT the second qubit back onto the first qubit to get to 1|1000...00+3/12|0100...00. Next we want to pull off 1/12. We perform another Ry controlled by the leftmost qubit followed by a backwards CNOT, but this time with the target is the qubit third from the left. By picking the perfect θ1 we will produce the state 2|1000...00+3/12|0100...00+1/122|0010...00. And you just keep doing this until you've got all the amplitudes you need, conveniently addressed by individual qubits being excited.

Now you want to fix any incorrect phases produced by the Y rotations. For the Hardy state this is easy, because all the phases are positive. In general you target each qubit position k with an Rz(ϕk) operation with appropriately chosen ϕk values, and that will get the phases right.

Now we want to get the ordering right. The easiest way to do this is to have some extra qubits that are your output qubits and, for each of the qubits we've prepared so far and each of the output qubits, either add a CNOT between the two or don't. For example, if the state with amplitude 3/12 is supposed to be a |11, then we need to CNOT from our leftmost qubit onto both of the output qubits. Then we need to uncompute the leftmost qubit by using a many-controlled NOT operation. There should be one control for each output qubit, and the control's type (qubit-must-be-on vs qubit-must-be-off) is determined by whether or not you toggled the qubit.

Applying these steps produces an inefficient, but correct, circuit for creating a Hardy state. You can open the circuit in Quirk:

Simple preparation

If you want to produce a state without using so much workspace, the task gets harder. But you can still follow the magnitudes then phases then ordering pattern. Also, there are cleverer ways to prepare magnitude sets that have nice patterns. For example, when only one amplitude is different from the others, one round of partial amplitude amplification may be enough to prepare the state.

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.