Skip to content

Use J+CZ transpiler by default#33

Open
thierry-martinez wants to merge 4 commits into
qat-inria:masterfrom
thierry-martinez:transpiler_jcz
Open

Use J+CZ transpiler by default#33
thierry-martinez wants to merge 4 commits into
qat-inria:masterfrom
thierry-martinez:transpiler_jcz

Conversation

@thierry-martinez
Copy link
Copy Markdown

Before submitting, please check the following:

  • Make sure you have tests for the new code and that test passes (run nox)
  • If applicable, add a line to the [unreleased] part of CHANGELOG.md, following keep-a-changelog.
  • Format added code by ruff
    • See CONTRIBUTING.md for more details
  • Make sure the checks (github actions) pass.

Then, please fill in below:

Context (if applicable):

Description of the change:

Related issue:

This commit adds type annotations in all example modules, and refines
the type of `PatternSimulator` constructor, so that the type parameter
for states is automatically inferred from the `backend` argument.

It enables full type-checking with mypy and pyright while preserving
existing functionality across the entire code base. No files are
ignored by the typers anymore.

**Related issue:**
This commit continues the work started in TeamGraphix#302, TeamGraphix#308, TeamGraphix#312, TeamGraphix#347, and TeamGraphix#414.
This commit implements a function `transpile_swaps` that returns a new
circuit equivalent to the original one but without SWAP gates.

This commit also introduces a class `InstructionVisitor` for
rewriting circuit instructions. Visitors are used in
`transpile_swaps` and `map_angle`, which is now rewritten without
using the type-unsafe `dataclasses.replace`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant