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

38 fix types in the ast #47

Merged
merged 3 commits into from
Jan 15, 2024
Merged

38 fix types in the ast #47

merged 3 commits into from
Jan 15, 2024

Commits on Jan 11, 2024

  1. Fix types in the AST

    - Implement ControlledSemantic to be able to express CNOT as a
      controlled X, for instance
    - Separate validation of qubit ranges from type-checking in a separate
      ANTLR tree visitor
    - snake_case instead of camelCase for variable names
    - Add docstrings to parsing classes
    - The GateLibrary superclass is used to factorize code for gateset-aware
    classes (e.g. TypeChecker)
    - Semantic classes are removed, absorbed into Gate subclasses
    - Move ALL ANTLR parsing classes to parsing folder - this has already
      been done, but only partially
    - Gates are specified directly with Python functions and a decorator
    - Lay the basis of handling of anonymous gates
    - Writer turned into impl pattern
    - Rename AST -> IR
    - Make test_testinterpreter a proper unit test, before it was testing
      parsing too
    - Visitor pattern for the SquirrelIR class
    - Use those visitors in e.g. writer and test_interpreter
    - Various code fixes
    - Use inspect to know Python function signatures
     This makes the gate semantic API nice to use from Python.
    pablolh committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    33c1726 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3f6d74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0cf85c1 View commit details
    Browse the repository at this point in the history