Giter Club home page Giter Club logo

qpanda-2's Introduction

QPanda 2

图片:

QPanda 2是由本源量子开发的开源量子计算框架,它可以用于构建、运行和优化量子算法.

QPanda 2作为本源量子计算系列软件的基础库,为QRunes、Qurator、量子计算服务提供核心部件。

持续化集成状态

Linux Windows and MacOS
Build Status Build Status
C++ 文档 Python 文档
Documentation Status Documentation Status

安装

Python 3.5-3.7

通过pip进行安装:

pip install pyqpanda

Python 其他版本和C++

如果要使用Python 3的其他版本,或者直接通过C++ API进行量子编程,可直接从源码进行编译,内容参见使用文档。使用C++进行量子编程也可从Release中获取对应操作系统环境的QPanda库文件压缩包,请参见QPanda库使用示例

验证安装

下面的例子可以在量子计算机中构建量子纠缠态(|00>+|11>),对其进行测量,重复制备1000次。预期的结果是约有50%的概率使测量结果分别在00或11上。

from pyqpanda import *

init(QMachineType.CPU)
prog = QProg()
q = qAlloc_many(2)
c = cAlloc_many(2)
prog.insert(H(q[0]))
prog.insert(CNOT(q[0],q[1]))
prog.insert(measure_all(q,c))
result = run_with_configuration(prog, cbit_list = c, shots = 1000)
print(result)
finalize()

观察到如下结果说明您已经成功安装QPanda(安装失败请参阅FAQ,或在issue中提出)。

{'00': 493, '11': 507}

更多的例子请参见使用示例

相关资料

贡献代码

我们欢迎新的成员加入到QPanda的事业中,CONTRIBUTING会指导您如何加入到我们的Developer大家庭。

Github issue专门用于处理请求和Bug,如果您想讨论更专业的技术问题请移步到我们QQ群:905550304,或者登陆我们的量子社区

团队介绍

QPanda由本源量子开发,本源量子致力于量子计算机的研发与应用,已推出6-qubit超导量子芯片(KF C6-130)、2-qubit半导量子芯片(XW B2-100),团队的目标是在近年制造出更多量子比特的芯片,提供公开云服务,实现量子优势与量子应用。软件团队为硬件提供支撑,除QPanda外还开发了QRunes量子语言、Qurator量子软件开发插件、本源量子云计算云服务平台、本源量子教育云等产品。

关于

License

Apache License 2.0

Copyright (c) 2017-2019 By Origin Quantum Computing. All Right Reserved.

qpanda-2's People

Contributors

agony5757 avatar arrowyl avatar benyuanwlw avatar itachixc avatar shenzhi-git avatar tecog avatar xiaoyaolanyun avatar yekongxiaogang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.