Git Product home page Git Product logo

Comments (8)

mhodson-rigetti avatar mhodson-rigetti commented on June 30, 2024 1

Option 2- I think you meant "QVM-bound executions"?

from pyquil.

mhodson-rigetti avatar mhodson-rigetti commented on June 30, 2024

My 2c: I would not use the semantics of prepare_for_qvm() but rather be clear that all Quil-T instructions are being stripped. There are other use cases where the same utility is required. I don't believe there is any plan to extend the QVM to simulate Quil-T instructions, and they certainly have no effect on the underlying state-vector simulation, so they can always be safely removed. This does include DELAY and FENCE appearing in the main instruction flow. At the (minor?) risk of needing to version pyquil's behavior when it is connected to some mystical future QVM where this is no longer the right thing to do, you would be doing every user a favor by doing it on their behalf just prior to submission for execution.

I recommend 1+2.

from pyquil.

bramathon avatar bramathon commented on June 30, 2024

The model I have in my head is this: The QVM only understands things with DefGates*. If it doesn't have a defined unitary, it's meaningless to the QVM. As Mark says, it's not impossible that this changes one day, but it there aren't any plans or motivation to do so.

I see the point that this does insert some opaque transformation to the program in the execution path, but what is happening in practice is that users are inserting incomplete versions of this into random places in their code so that it can run on both the QPU and the QVM. I think it would ultimately be cleaner to just to do it automatically.

*Plus a handful of Pragmas and classical instructions

from pyquil.

BatmanAoD avatar BatmanAoD commented on June 30, 2024

Ignorant question: since these instructions don't have any effect on the state-vectors, can we just add them to QVM as no-ops? Is there a reason why QVM is more difficult to update than PyQuil is?

from pyquil.

BatmanAoD avatar BatmanAoD commented on June 30, 2024

Another ignorant question, this time one that I should probably already know the answer to: do QVM-bound executions go through translation? They don't, right?

from pyquil.

mhodson-rigetti avatar mhodson-rigetti commented on June 30, 2024

Another ignorant question, this time one that I should probably already know the answer to: do QVM-bound executions go through translation? They don't, right?

Correct, it does not. The original program gets wrapped as an "executable" but it is not modified in any way.

from pyquil.

mhodson-rigetti avatar mhodson-rigetti commented on June 30, 2024

Ignorant question: since these instructions don't have any effect on the state-vectors, can we just add them to QVM as no-ops? Is there a reason why QVM is more difficult to update than PyQuil is?

QVM is written in Lisp and I assume has its own Quil parser. I suspect that parser was not updated for the Quil-T additions to the grammar, so its nugatory work to parse something that is then a no-op in simulated execution.

from pyquil.

BatmanAoD avatar BatmanAoD commented on June 30, 2024

from pyquil.

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.