GithubHelp home page GithubHelp logo

shorsuperposition's Introduction

ShorSuperposition

This repository represents the implementation of Shor's algorithm in superposition using Q# and the MQDK. The algorithm itself cannot be run on neither a quantum simulator, due to the large number of qubits required, not on a Toffoli Simulator, because of the inverse QFT operation which it required. However, it is possible to use the Resource Estimator part of the MQDK to find how many qubits it would require to factor a number N with n bits. Note that n is a parameter which can be modified in the code.

Running the code

First, make sure that a Q# development is installed and correctly set up. A good resource for this is https://docs.microsoft.com/en-us/azure/quantum/. It is recommended that the code is run either from the command line, or inside Visual Studio Code or any other IDE. However, it is possible to run some of the individual quantum operations in a Jupyter Notebook as well. This could be useful is one wants to use the magical trace command to get a visual representation of the quantum circuit.

Notes

The Toffoli Simulator cannot run any operations which use Hadamard Gates, phase rotations or phase shifts. Because of this, make sure that when using the Toffoli Simulator to run an individual operation which uses the IncrementByInteger quantum operation provided by the MQDK you comment it out and change it with the use one = Qubi() X(one) AddI(..) etc. Similarly, when estimating the resources required by such an operation, make sure that it uses the IncrementByInteger operation as it is the most efficient between the two approaches.

shorsuperposition's People

Contributors

pap36 avatar

Stargazers

 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.