Code Monkey home page Code Monkey logo

savitar1995 / qpanda-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from originq/qpanda-2

0.0 0.0 0.0 13.41 MB

Qpanda 2 is a quantum software development kit used to deal with quantum circuits and experiments on various quantum computers. You can test or develop your own quantum applications on QPanda 2 where you configure the C++ language development environment. QPanda 2 supports mainstream quantum logic gate operation and can be adapted to a variety of quantum chips, and the targeted optimization of quantum programs under different platforms.

Home Page: http://www.originqc.com.cn/QPanda/download.html

C++ 72.24% C 4.27% CMake 0.63% Cuda 2.72% Python 5.90% Jupyter Notebook 14.18% DTrace 0.05%

qpanda-2's Introduction

Build Status Documentation Status

QPanda 2

QPanda (Quantum Programming Architecture for NISQ Device Applications) is a library for quantum computing which can be applied for realizing various quantum algorithms. QPanda is mainly written in C++, and can be extended to Python.

Documentation

Documentation is hosted at https://qpanda-2.readthedocs.io/zh_CN/latest/

Build your first quantum program with QPanda

C++ Version

#include "QPanda.h"
#include <stdio.h>
using namespace QPanda;

init(QuantumMachine_type::CPU);
QProg prog;
auto q = qAllocMany(2);
auto c = cAllocMany(2);
prog << H(q[0])
     << CNOT(q[0],q[1])
     << MeasureAll(q, c);

auto results = runWithConfiguration(prog, c, 1000);
for (auto result : results){
    printf("%s : %d\n", result.first.c_str(), result.second);
}
finalize()

Python Version

from pyqpanda import *
init(QuantumMachine_type.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()

The Design Ideas of QPanda 2

The design of QPanda 2 is forward-looking, considering that quantum computing will flourish and be widely applied in the future. So QPanda 2 did the following consideration when it was designed:

  • Full series compatibility.

  • Standard architecture.

  • Standardized quantum machine model.

Installation and configuration

License

Apache License 2.0

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

qpanda-2's People

Contributors

xiaoyaolanyun avatar benyuanwlw avatar agony5757 avatar yekongxiaogang 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.