量子计算机的软件模拟

发布于 2024-10-10 00:05:37 字数 70 浏览 3 评论 0原文

当我们等待量子计算机的时候,是否有可能编写一个量子计算机的软件模拟?我怀疑答案是否定的,但希望不这样做的原因能够解开这个谜团。

While we are waiting for our quantum computers, is it possible to write a software simulation of one? I suspect the answer is no, but hope the reasons why not will throw some light on the mystery.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

痞味浪人 2024-10-17 00:05:37

实施它并不难。问题在于,计算和内存的复杂性与要模拟的量子位数成指数关系。

基本上,量子计算机可以同时在所有可能的 n 位状态上运行。这些增长就像 2^n 一样。

由于运算符是矩阵,因此其大小增长得更快。所以它的增长就像 (2^n)^2 = 2^(2*n) = 4^n

所以我期望一台好的计算机能够模拟最多大约 20 位的量子计算机,但它会相当慢。

Implementing it isn't that hard. The problem is that the computational and memory complexity is exponential in the number of quantum bits you want to simulate.

Basically a quantum computer operates on all possible n-bit states at once. And those grow like 2^n.

The size of an operator grows even faster since it's a matrix. So it grows like (2^n)^2 = 2^(2*n) = 4^n

So I expect a good computer to be able to simulate a quantum computer up to about 20 bits, but it will be rather slow.

似狗非友 2024-10-17 00:05:37

它们确实存在。 这是一个基于浏览器的浏览器。 这是一个用 C++ 编写的。 这是一个用 Java 编写的。但是,正如 CodesInChaos 所说,量子计算机可以同时在所有概率幅度上运行。想象一下一个 3 量子位量子寄存器,它的典型状态如下所示:

a1|000>a1|000>a1|000>a1|000> + a2|001> + a3|010> + a4|011> + a5|100> + a6|101> + a7|110>+ a8|111>

它是所有可能组合的叠加。更糟糕的是这些概率幅是复数。因此,一个 n 量子位寄存器需要 2^(2*n) 个实数。因此,对于 32 量子位寄存器,即 2^(2*32) = 18446744073709551616 个实数。

正如 CodesInChaos 所说,用于转换这些状态的酉矩阵就是该数字的平方。他们的应用程序是一个点积......至少可以说,它们的计算成本很高。

They do exist. Here's a browser based one. Here's one written in C++. Here's one written in Java. But, as stated by CodesInChaos, a quantum computer operates on all probability amplitudes at once. So imagine a 3 qubit quantum register, a typical state for it to be in looks like this:

a1|000> + a2|001> + a3|010> + a4|011> + a5|100> + a6|101> + a7|110>+ a8|111>

It's a superposition of all the possible combinations. What's worse is that those probability amplitudes are complex numbers. So an n-qubit register would require 2^(2*n) real numbers. So for a 32 qubit register, that's 2^(2*32) = 18446744073709551616 real numbers.

And as CodesInChaos said, the unitary matrices used to transform those states are that number squared. Their application being a dot product... They're computationally costly, to say the least.

执手闯天涯 2024-10-17 00:05:37

我的答案是肯定的:

可以通过模拟量子机算法来模拟量子机的行为

D-Wave 量子机使用一种称为量子退火的技术。该算法可以与模拟退火算法进行比较。

参考文献:

1.量子退火

2.模拟退火

3.通过模拟退火进行优化:定量研究

My answer is yes:

You can simulate the behaviours of a quantum machine by simulating the quantum machine algorithm

D-Wave quantum machine using a technique called quantum annealing. This algorithm could be compared to simulated annealing algorithm.

References:

1.Quantum annealing

2.Simulated annealing

3.Optimization by simulated annealing: Quantitative studies

叶落知秋 2024-10-17 00:05:37

正如维基百科所述:

原则上,经典计算机可以(具有指数资源)模拟量子算法,因为量子计算并不违反丘奇-图灵理论。

As Wikipedia state:

A classical computer could in principle (with exponential resources) simulate a quantum algorithm, as quantum computation does not violate the Church–Turing thesis.

有一个非常大的语言、框架和模拟器列表。
有些在低水平上模拟量子方程,其他的只是门。

  • Microsoft 量子开发套件 (Q#)
  • Microsoft LIQUi>IBM Quantum Experience
  • Rigetti Forest
  • ProjectQ
  • QuTiP
  • OpenFermion
  • Qbsolv
  • ScaffCC
  • 量子计算游乐场 (Google)
  • Raytheon BBN
  • Quirk
  • Forest

很高兴知道您对其功能和易用性的看法。

https://quantumcomputingreport.com/resources/tools/
https://github.com/topics/quantum-computing?o= desc&s=星星

There is a very big list of languages, frameworks and simulators.
Some simulate at low level the quantum equations, other just the gates.

  • Microsoft Quantum Development Kit (Q#)
  • Microsoft LIQUi>IBM Quantum Experience
  • Rigetti Forest
  • ProjectQ
  • QuTiP
  • OpenFermion
  • Qbsolv
  • ScaffCC
  • Quantum Computing Playground (Google)
  • Raytheon BBN
  • Quirk
  • Forest

It would be great to know your opinions on their capabilities and easiness of use.

https://quantumcomputingreport.com/resources/tools/
https://github.com/topics/quantum-computing?o=desc&s=stars

冧九 2024-10-17 00:05:37

几年前,我参加了一场 Perl 会议的演讲,Damian Conway(我相信)在会上对其中的一些进行了推测。稍后,出现了一个 Perl 模块,可以完成其中的一些工作。在 CPAN 中搜索 Quantum::Superpositions。

Years ago I attended a talk at a Perl conference where Damian Conway (I believe) was speculating on some of this. A bit later there was a Perl module made available that did some of this stuff. Search CPAN for Quantum::Superpositions.

許願樹丅啲祈禱 2024-10-17 00:05:37

量子计算的经典模拟困难的另一个原因是:您需要近乎完美(即尽可能完美)的随机数生成器来模拟测量。

Yet another reason why classical simulation of quantum computing is hard: you need almost perfect - i.e. as perfect as possible - random number generators to simulate measurement.

美煞众生 2024-10-17 00:05:37

Quipper 是用于量子计算的完整模拟 EDSL,在 Haskell 中实现
我有模拟多种 QC 算法行为的经验,例如 Deutsch、Deutsch-Jozsa、Simon 算法、Shor 算法,而且非常简单。

Quipper is full blown simulation EDSL for Quantum Computing, implemented in Haskell
I have experince to simulate behaviour of several QC algorithms such as Deutsch, Deutsch–Jozsa, Simon's, Shor's algorithms and it's very straightforward.

极度宠爱 2024-10-17 00:05:37

量子计算的经典模拟很难的另一个原因是:为了跟踪,您可能想知道在 n 量子位门 (n>1) 的每个动作之后输出的量子位是否纠缠。这必须进行经典计算,但已知是 NP 困难的。

请参阅此处:https://stackoverflow.com/a/23327816/363429

Another reason why classical simulation of quantum computation is hard: to keep track you may want to know after each action of a n-qubit gate (n>1) whether the outgoing qubits are entangled or not. This must be calculated classically but is known to be NP-hard.

See here: https://stackoverflow.com/a/23327816/363429

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文