Questions tagged «pyquil»

2
复杂系数的哈密顿模拟
作为变分算法的一部分,我想构造一个量子电路(最好是使用pyQuil),该电路模拟以下形式的哈密顿量: H=0.3⋅Z3Z4+0.12⋅Z1Z3+[...]+−11.03⋅Z3−10.92⋅Z4+0.12i⋅Z1Y5X4H=0.3⋅ž3ž4+0.12⋅ž1个ž3+[。。。]+-11.03⋅ž3-10.92⋅ž4+0.12一世⋅ž1个ÿ5X4H = 0.3 \cdot Z_3Z_4 + 0.12\cdot Z_1Z_3 + [...] + - 11.03 \cdot Z_3 - 10.92 \cdot Z_4 + \mathbf{0.12i \cdot Z_1 Y_5 X_4} 说到最后一项,问题是pyQuil引发以下错误: TypeError: PauliTerm coefficient must be real 我开始研究文学,这似乎是一个不平凡的问题。我遇到了有关通用量子哈密顿量的本文,其中讨论了复数到实数编码以及局部编码。但是,我仍然不清楚如何实际实现这样的功能。谁能给我一些解决该问题的实用建议?
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.