Comments (8)
Option 2- I think you meant "QVM-bound executions"?
from pyquil.
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.
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.
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.
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.
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.
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.
from pyquil.
Related Issues (20)
- Rewrite arithmetic if (and only if) the target QPU is Aspen-M-3
- pyQuil v4: DefGate "matrix" property fails if unitary has mixed types
- DefGate construction fails if matrix contains Expressions but not parameters
- Broken docs link in the_quantum_computer.rst
- Documentation uses deprecated `.readout_data.get("ro")`
- Update qcs-sdk-rust version to support libquil
- Bug: QPU.execution_options not used for QPU.retrieve_results
- Support Python 3.12
- program.inst() using a tuple no longer works for parametric gates HOT 3
- Pyquil converts real gate parameter to complex. HOT 1
- Make final memory values from QPU jobs available
- Defcalibrations affect the resulting wavefunction in pyquil 4
- Complex interactions resulting from numpy and python requirements HOT 1
- Update documentation for the new compiler backend
- Search and flyout menu don't work in documentation HOT 1
- Make the `get_attribute` and `set_attribute` methods on `DefFrame` public. HOT 2
- The `DefFrame` `hardware_object` property is not being serialized correctly.
- Utility: apply num-shots loop directly to program Quil
- Make `QAMExecutionResult` serializable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyquil.