[英]Reducing circuit initialization complexity
I'm encoding data into a QuantumCircuit via the Initialize method for QFTs.我正在通过 QFT 的 Initialize 方法将数据编码到 QuantumCircuit 中。 In doing this and transpiling for IonQ backends, I'm getting rather complex circuits.
在这样做并为 IonQ 后端进行转换时,我得到了相当复杂的电路。 Is there a way to encode this data more efficiently for IonQ backends or a method to approximate this circuit?
有没有办法为 IonQ 后端更有效地编码这些数据,或者有一种方法来近似这个电路? Thanks in advance!
提前致谢!
I believe this is because of Qiskit initialize
, and not specific to the IonQ backend.我相信这是因为 Qiskit
initialize
,而不是特定于 IonQ 后端。 You'd likely see the same (or worse.) gate depth with any backend.您可能会看到与任何后端相同(或更差)的门深度。
Qiskit initialize
uses a very general-purpose and therefore relatively naive algorithm for state encoding. Qiskit
initialize
使用非常通用的算法,因此对 state 编码使用相对简单的算法。 Specifically, that from Synthesis of Quantum Logic Circuits (2004) ;具体来说,来自Quantum Logic Circuits (2004) 的合成; this is mentioned in the source for the method .
这在方法的源代码中有所提及。
Specifically, they say in the paper that using the method, an arbitrary n-qubit quantum state can be prepared by a circuit containing no more than 2n+1 − 2n CNOT gates.具体来说,他们在论文中说,使用该方法,可以通过包含不超过 2n+1 - 2n 个 CNOT 门的电路制备任意 n 量子位量子 state。 For an n of 8, like you have here, that's 496 CNOTs.
对于 8 的 n,就像你在这里一样,那是 496 个 CNOT。 which is about what you're seeing.
这是关于你所看到的。
Any encoding approach that is more specifically tailored to what you're trying to do will likely work better.任何更专门针对您正在尝试做的事情的编码方法都可能会更好地工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.