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

Oxidize the ConsolidateBlocks pass #13368

Merged
merged 26 commits into from
Nov 6, 2024
Merged

Commits on Oct 24, 2024

  1. Oxidize the ConsolidateBlocks pass

    This commit ports the consolidate blocks pass to rust. The logic remains
    the same and this is just a straight porting. One optimization is that
    to remove the amount of python processing the Collect2qBlocks pass is no
    longer run as part of the preset pass managers and this is called
    directly in rust. This speeds up the pass because it avoids 3 crossing
    of the language boundary and also the intermediate creation of DAGNode
    python objects. The pass still supports running with Collect2qBlocks for
    backwards compatibility and will skip running the pass equivalent
    internally the field is present in the property set.
    
    There are potential improvements that can be investigated here such as
    avoiding in place dag contraction and moving to rebuilding the dag
    iteratively. Also changing the logic around estimated error (see Qiskit#11659)
    to be more robust. But these can be left for follow up PRs as they
    change the logic.
    
    Realistically we should look at combining ConsolidateBlocks for it's
    current two usages with Split2qUnitaries and UnitarySynthesis into
    those passes for more efficiency. We can improve the performance and
    logic as part of that refactor. See Qiskit#12007 for more details on this
    for UnitarySynthesis.
    
    Closes Qiskit#12250
    mtreinish committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    ed2b41b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    155a574 View commit details
    Browse the repository at this point in the history
  3. Fix lint

    mtreinish committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    d3e900b View commit details
    Browse the repository at this point in the history
  4. Fix solovay kitaev test

    mtreinish committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    29bb569 View commit details
    Browse the repository at this point in the history
  5. Add release note

    mtreinish committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    e50fc1c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8da1b2f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    61b831f View commit details
    Browse the repository at this point in the history
  8. Fix final test failures

    mtreinish committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    55523bb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    51fa6a5 View commit details
    Browse the repository at this point in the history
  10. Remove release note and test change

    The test failure fixed by a test change was incorrect and masked a logic
    bug that was fixed in a subsequent commit. This commit reverts that
    change to the test and removes the release note attempting to document a
    fix for a bug that only existed during development of this PR.
    mtreinish committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    8c43f01 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b93df76 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. Remove unused code

    mtreinish committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    0423d1c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f8841f2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    700814e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5c4c50f View commit details
    Browse the repository at this point in the history
  5. Remove more unused imports

    mtreinish committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    a422990 View commit details
    Browse the repository at this point in the history
  6. Optimize linalg in block collection

    This commit reworks the logic to reduce the number of Kronecker products
    and 2q matrix multiplications we do as part of computing the unitary of
    the block. It now computes the 1q components individually with 1q matrix
    multiplications and only calls kron() and a 2q matmul when a 2q gate is
    encountered. This reduces the number of more expensive operations we
    need to perform and replaces them with a much faster 1q matmul.
    mtreinish committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    62df015 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e001bab View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    73fae86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    864fc51 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11742b4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f1e645f View commit details
    Browse the repository at this point in the history
  5. Apply suggestions from code review

    Co-authored-by: Kevin Hartman <[email protected]>
    mtreinish and kevinhartman authored Nov 5, 2024
    Configuration menu
    Copy the full SHA
    b00e22c View commit details
    Browse the repository at this point in the history
  6. Fix lint

    mtreinish committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    b5b0172 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    223bf2e View commit details
    Browse the repository at this point in the history
  8. Reuse block_qargs for each block

    Co-authored-by: Henry Zou <[email protected]>
    mtreinish and henryzou50 committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    b6071ee View commit details
    Browse the repository at this point in the history