Giter VIP home page Giter VIP logo

agusthya0786 / qiskit-aakash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from indian-institute-of-science-qc/qiskit-aakash

0.0 0.0 0.0 84.5 MB

This repository contains a new backend which can simulate noisy quantum logic circuits using the density matrix formalism.

Home Page: https://doi.org/10.1142/S0129183122501030

License: Apache License 2.0

Shell 0.17% Python 97.19% Pascal 0.09% Makefile 0.07% Batchfile 0.06% Jupyter Notebook 1.55% Cython 0.56% OpenQASM 0.31%

qiskit-aakash's Introduction

Qiskit dm_simulator User Guide


The details about the implementation of the density matrix simulator is given in the arxiv paper 1908.05154.

Installation

The files in this repository can be downloaded/cloned using the command

git clone https://github.com/indian-institute-of-science-qc/qiskit-aakash.git

Optional : We advise you to use a virtual environment to install the files. Virtual environment can be created using conda.

conda create -n name_of_the_env python=3

See this for instruction to install conda into your system.

You can activate/deactivate the virtual environment.

conda activate name_of_the_env
conda deactivate

Once you have activated the virtual environment follow the instruction below

Go to the cloned folder

cd qiskit-aakash

To install the folder type in the terminal

python3 -m pip install .

If you want to use it in Google Colab (easier and convenient but only works online)then the same commands will work

!git clone https://github.com/indian-institute-of-science-qc/qiskit-aakash.git && python3 -m pip install qiskit-aakash/

The code for the new back-end dm_simulator can be found in dm_simulator.py. This back-end also uses some functionalities from basicaertools.py.

Example

Once installed, files can be changed and run in python. For example,

python3
from qiskit import QuantumCircuit,BasicAer,execute
qc = QuantumCircuit(2)
# Gates
qc.x(1)
qc.cx(0,1)
# execution
backend = BasicAer.get_backend('dm_simulator')
run = execute(qc,backend)
result = run.result()
print(result['results'][0]['data']['densitymatrix'])

It would output the resultant densitymatrix as,

[[0 0 0 0]
[0 1 0 0]
[0 0 0 0]
[0 0 0 0]]

There are some jupyter notebooks in the repository which provide detailed examples about how to use this simulator. Those can be viewed in Github. But the easiest way to interact with them is by using Binder Image.

qiskit-aakash's People

Contributors

1ucian0 avatar abbycross avatar abdonrd avatar ajavadia avatar atilag avatar awcross1 avatar biplab37 avatar chriseclectic avatar dcmckayibm avatar delapuente avatar diego-plan9 avatar ewinston avatar githimanshuc avatar ismaelfaro avatar itoko avatar jaygambetta avatar jesusprubio avatar kdk avatar levbishop avatar maddy-tod avatar max-reuter-2 avatar mtreinish avatar namanroshan avatar nkanazawa1989 avatar nonhermitian avatar obliviateandsurrender avatar pacomf avatar rraymondhp avatar taalexander avatar yaelbh 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.