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

IR 2.0: ideas collection #668

Open
Roger-luo opened this issue Oct 3, 2023 · 2 comments
Open

IR 2.0: ideas collection #668

Roger-luo opened this issue Oct 3, 2023 · 2 comments
Labels
enhancement New feature or request mod:ir issues related to IR module

Comments

@Roger-luo
Copy link
Member

opening this to track some ideas and issues we have for a refactor of the IR.

@Roger-luo Roger-luo added the enhancement New feature or request label Oct 3, 2023
@weinbe58
Copy link
Member

weinbe58 commented Oct 3, 2023

I think we should probably extend IR to include execution instructions to the different backends:

  • For hardware this is straightforward we would need a device nodes and nodes to describe sync/async execution
  • For emulator we can work off of current emulator IR just add execution instructions, e.g.:
    • Sampling at specific time points
    • Measurement of operators

@Roger-luo Roger-luo added the mod:ir issues related to IR module label Oct 11, 2023
@weinbe58
Copy link
Member

weinbe58 commented Oct 15, 2023

I propose the following. Since we don't really plan on expanding AHS too much more, we should:

  1. remove dictionaries from the IR types and replace them with attributes, e.g. rydberg, and hyperfine are attributes of the Sequence
  2. Remove compositions on the level of the Pulse IR, this will significantly decrease the complexity of code generation for the full IR. e.g. have a Pulse node to store detuning phase and amplitude.
  3. ComplexField for the Rabi term.
class SequenceExpr
    ...

class ComplexField:
    amplitude: Field
    phase: Optional[Field]

class Pulse:
    detuning: Optional[Field]
    rabi: Optional[ComplexField]

class Sequence(SeqenceExpr):
    rydberg: Optional[Pulse]
    hyperfine: Optional[Pulse]

# keep compositions of Sequence
# ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mod:ir issues related to IR module
Projects
None yet
Development

No branches or pull requests

2 participants