[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label instructions with category to inform program execution target support #307

Open
jselig-rigetti opened this issue Nov 1, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jselig-rigetti
Copy link
Contributor
jselig-rigetti commented Nov 1, 2023

Not all execution targets support all quil instructions, particularly the QVM does not support Quil-T (see rigetti/pyquil#1684). Currently, there is no way to know which Instruction is from Quil-T.

However, that information alone may not be enough. One approach to adapt a program containing Quil-T instructions for QVM compatibility may be to simply remove any Quil-T instructions, which is perhaps fine for instructions that only affect program composition like DEFFRAME, but removing instructions affecting RF control like PULSE will change a program's semantics.

To allow users of this library the ability to make compatibility decisions, they should be able to deduce the Category (or spec version/extension?) of any Instruction along with that instruction's impact on execution semantics (from InstructionRole or similar).

An example solution might add something like this (names are placeholders):

pub enum InstructionCategory {
    Base,
    QuilT,
    // ...?
}

impl From<&Instruction> for InstructionCategory {
    fn from(instruction: &Instruction) -> Self { ... }
}
@jselig-rigetti jselig-rigetti added the enhancement New feature or request label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant