Code Monkey home page Code Monkey logo

Comments (4)

sergeisakov avatar sergeisakov commented on June 13, 2024

In principle, qsim supports non-zero initial states. Injecting the necessary X gates might lead to unnecessary performance overhead. It should be done in a different way.

from qsim.

rmlarose avatar rmlarose commented on June 13, 2024

I was going to raise an issue on unexpected behavior when providing initial states, then I found this one. Until a longer-term solution emerges, do you think it would be worthwhile to raise a warning/error when initial_state is not None? (This certainly would have saved me some debugging time!)

from qsim.

95-martin-orion avatar 95-martin-orion commented on June 13, 2024

That's a good point, @rmlarose - I'll add an error for this.

@sergeisakov, what do you have in mind for this? As it stands users need to manually add the X gates anyways, so in lieu of a more efficient solution injecting X gates at least wouldn't make performance any worse than it already is.

from qsim.

sergeisakov avatar sergeisakov commented on June 13, 2024

I was wrong. Adding the necessary X gates should not lead to any performance overhead as those X gates will be fused to some other gates. However, adding X gates will support only classical initial states. The support for general initial states requires some additions to qsimcirq (note that the qsim library supports general initial states) in pybind_interface/pybind_main.cpp and in qsimcirq/qsim_simulator.py.

from qsim.

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.