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

Fully port Split2QUnitaries to rust #13025

Merged
merged 8 commits into from
Sep 9, 2024

Commits on Aug 30, 2024

  1. Fully port Split2QUnitaries to rust

    This commit builds off of Qiskit#13013 and the other data model in Rust
    infrastructure and migrates the InverseCancellation pass to
    operate fully in Rust. The full path of the transpiler pass now never
    leaves Rust until it has finished modifying the DAGCircuit. There is
    still some python interaction necessary to handle parts of the data
    model that are still in Python, mainly for creating `UnitaryGate`
    instances and `ParameterExpression` for global phase. But otherwise
    the entirety of the pass operates in rust now.
    
    This is just a first pass at the migration here, it moves the pass to
    use loops in rust. The next steps here are to look at operating
    the pass in parallel. There is no data dependency between the
    optimizations being done for different gates so we should be able to
    increase the throughput of the pass by leveraging multithreading to
    handle each gate in parallel. This commit does not attempt
    this though, because of the Python dependency and also the data
    structures around gates and the dag aren't really setup for
    multithreading yet and there likely will need to be some work to
    support that.
    
    Part of Qiskit#12208
    mtreinish committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    bee99b1 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    3d8af9d View commit details
    Browse the repository at this point in the history
  2. Update pass logic with changes from Qiskit#13095

    Some of the logic inside the Split2QUnitaries pass was updated in a
    recently merged PR. This commit makes those changes so the rust
    implementation matches the current state of the previous python version.
    mtreinish committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    911be95 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Configuration menu
    Copy the full SHA
    e924c8a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7b0e363 View commit details
    Browse the repository at this point in the history
  3. Use Fn trait instead of FnMut for callback

    We don't need the callback to be mutable currently so relax the trait to
    just be `Fn` instead of `FnMut`. If we have a need for a mutable
    environment callback in the future we can change this easily enough
    without any issues.
    mtreinish committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    2ff94f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b2cdb54 View commit details
    Browse the repository at this point in the history
  5. Rename function

    mtreinish committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    913ec20 View commit details
    Browse the repository at this point in the history