Thanks to visit codestin.com
Credit goes to github.com

Skip to content

在浏览器中运行的拖放量子电路模拟器。用于探索和理解小型量子电路的工具。

License

Notifications You must be signed in to change notification settings

yuanzhongqiao/Quirk-cn

 
 

Repository files navigation

构建状态

Quirk 是一款玩具量子电路模拟器,旨在帮助人们学习量子计算。

如果您想快速探索小型量子电路的行为,Quirk 就是适合您的工具。无需安装、配置或编写脚本:只需访问algassert.com/quirk,将门拖到电路上,输出显示就会实时更新。

(如果您仍然想了解量子电路什么,那么我推荐视频系列“量子计算”。Quirk 假设您已经知道“每根线代表一个量子位”等背景事实。)

定义特征

  • 在网络浏览器中运行。
  • 拖放电路编辑。
  • 实时反应、模拟和动画。
  • 内联状态显示。
  • 可添加书签/可链接的电路。
  • 最多 16 个量子位。

值得注意的限制

  • 无法重新连贯测量的量子位(因为测量是基于延迟测量原理的黑客实现的)。

试试看

algassert.com/quirk

例子

Examples

Basic usage demo:

Demo

Grover search circuit with chance and sample displays (showing that the chance of success increases):

Grover search

Quantum teleportation circuit with Bloch sphere displays (showing that the qubit at the top has ended up at the bottom):

Quantum teleportation

Biulding 构建

如果您想修改 Quirk,可以通过以下方式获取代码并将更改转换为可用的 html/javascript。

  1. 安装gitNode.js。 _

    sudo add-apt-repository universe

    sudo apt-get update

    sudo apt-get install --yes git npm nodejs-legacy

  2. 克隆存储库。

    git clone https://github.com/Strilanc/Quirk.git

  3. 安装开发依赖项。

    cd Quirk

    npm install

  4. 可选)进行更改。运行测试。

    npm run test-firefox

  5. 构建输出。

    npm run build

  6. out/quirk.html通过使用 Web 浏览器打开来确认输出是否有效。

    firefox out/quirk.html

  7. 复制out/quirk.html到你想要的任何地方。

免责声明

Quirk 不是 Google 官方产品。

About

在浏览器中运行的拖放量子电路模拟器。用于探索和理解小型量子电路的工具。

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.2%
  • HTML 1.8%