GithubHelp home page GithubHelp logo

quantum-tools's Introduction

This repository host the work I done with QISKit during my Master's thesis. I shared the code according to the CeCILL-B license (see the license file).

Installation

The installation procedure is not really standard and will be changed when I will have the time. At the moment, you need to clone the repository in a folder called utils because all the imports in the code assume that the folder is called utils. Then you need to update your PYTHONPATH. The procedure is summarised below:

  1. Clone the repository as utils:
git clone https://github.com/nelimee/quantum-tools.git utils
  1. Update your PYTHONPATH to point to the parent folder of utils:
export PYTHONPATH="/parent/folder/of/utils/:${PYTHONPATH}"

Instead of updating the PYTHONPATH at each login, you can add the previous line to your .bashrc:

echo 'export PYTHONPATH="/parent/folder/of/utils/:${PYTHONPATH}"' >> ~/.bashrc

Directory structure

HHL folder

As its name indicates, this folder is dedicated to scripts related to the HHL algorithm. In this folder you have:

  1. 4x4_system.py: An implementation of the HHL algorithm for a 4x4 matrix. The implementation is based on Quantum Circuit Design for Solving Linear Systems of Equations (v2) but corrects some errors in the original paper.
  2. hamiltonian_error.py: A script that will compute the errors in the Hamiltonian simulation procedure and that will output useful information on them. The error is the norm of the difference between the simulated matrix and the "exact" matrix (up to floating-point errors in the numerical methods used).
  3. hamiltonian_unitary_test.py: A convenient script that I used to verify the validity of the different steps of HHL by computing the error between the expected unitary matrix and the simulated one. The script has not been formatted to be user-friendly.
  4. optim_hamil.py: A script used to compute the best coefficients for the powers of the Hamiltonian simulation procedure. As written in the comments, there is no proof of "why it works?", but the Hamiltonian powers are simulated with a really low error.
  5. test.py: A scratch file that contains an example of the usage of the qiskit.extensions.quantum_initializer._initializer.initialize function.

error_analysis folder

This folder links to an other git repository that contains helpers to estimate the errors due to the physical imprecisions of the quantum chips. The code is still draft and does not work as expected for the moment.

gates folder

Each file in this folder declare some personalised quantum gates.

visualisation folder

This folder links to an other git repository: qasm2image.

Usage

The module is installed under the name utils. You can import the qpe gate using

import utils.gates.qpe

You can also launch the scripts in HHL/

quantum-tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sanchayandutta

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.