GithubHelp home page GithubHelp logo

Comments (7)

thomashaener avatar thomashaener commented on August 26, 2024

So by state you mean individual amplitudes, rather than initializing to a classical bit-string?

from projectq.

Strilanc avatar Strilanc commented on August 26, 2024

Yes.

An alternative approach, for this use case, is a "PermutationSimulator" which only allows classical gates and then spits out the final permutation.

from projectq.

thomashaener avatar thomashaener commented on August 26, 2024

Ok the idea was actually to use the cheat function for this. Unfortunately, the default pybind export of std::vector performs a copy each time a switch between Python and C++ is made, which is why this currently does not work. At some point, we should implement a custom version of this and update the C++ export.

from projectq.

thomashaener avatar thomashaener commented on August 26, 2024

Oh and we'll definitely need a permutation simulator.

from projectq.

hsim13372 avatar hsim13372 commented on August 26, 2024

I'm currently working on testing out different initial states for the VQE so being able to initialize the ProjectQ Simulator to a specific state would be very useful!

from projectq.

thomashaener avatar thomashaener commented on August 26, 2024

I'll add an extra function over the weekend since I currently don't see a quick fix for the pybind issue with cheat.

from projectq.

damiansteiger avatar damiansteiger commented on August 26, 2024

This feature has been added to the Simulator in the develop branch, see
http://projectq.readthedocs.io/en/latest/projectq.backends.html#projectq.backends.Simulator.set_wavefunction

Thanks @thomashaener

from projectq.

Related Issues (20)

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.