QPanda-2
QPanda-2 copied to clipboard
QPanda 2 is an open source quantum computing framework developed by OriginQC that can be used to build, run, and optimize quantum algorithms.
QPanda 2
QPanda2 is an open source quantum computing framework developed by Origin Quantum, which can be used to build, run and optimize quantum algorithms. QPanda2 is the basic library of a series of software developped by Origin Quantum, which provides core components for QRunes, Qurator and quantum computing services.
Linux | Windows |
---|---|
C++ Documents | Python Documents |
---|---|
Install for Python
Python 3.6-3.9
Install using pip:
pip install pyqpanda
Other versions of Python and C++
If you want to use other versions of Python3 or use C++ API, Compiling from source is recommended. Reference to the Documents for tutorials
Python sample code
The following example can be used to construct quantum entanglement in a quantum computer(|0000>+|1111>), measure all qubits and run 1000 times:
from pyqpanda import *
qvm = CPUQVM()
qvm.init_qvm()
prog = QProg()
q = qvm.qAlloc_many(4)
c = qvm.cAlloc_many(4)
prog << H(q[0])\
<< CNOT(q[0:-1],q[1:])\
<< measure_all(q,c)
result = qvm.run_with_configuration(prog, c, 1000)
print(result)
qvm.finalize()
Results:
{'0000': 518, '1111': 482}
See more examples。
Other informations
- Official website of Origin Quantum
- OriginQ Cloud
- OriginQ Education
- ReadTheDocs(C++)
- ReadTheDocs(Python)
- QRunes
- Qurator-VSCode
About
QPanda is developed by Origin Quantum, which is committed to the development and application of quantum computers, It has launched 6-Qubit superconducting quantum chip (KF C6-130) and 2-Qubit semi-conducting quantum chip (XW B2-100). The goal of the team is to produce more qubit chips in recent years, provide open cloud services, and realize quantum advantages and quantum applications. The software team underpins the hardware,In addition to QPanda, it has also developed QRunes, Qurator, OriginQ Cloud service platform, OriginQ Education cloud and other products.
License
Apache License 2.0