Skip to content

Conversation

mtreinish
Copy link
Member

This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't.

This commit moves the distance matrix functionality to rustworkx. This
is mostly a straightforward migration as the functionality was written
in a generic way already. The only difference is how node holes were
handled, the this opted to split the functions into 2, a verison that
assumes the graph has compact indices and one that doesn't.
This commit performs some optimizations on the internals of the
distance_matrix() function. It avoids extra allocations and uses a
fixedbitset for tracking instead of hashsets.

Co-authored-by: Jake Lishman <[email protected]>
@mtreinish mtreinish changed the title [WIP] Add distance_matrix to rustworkx-core Add distance_matrix to rustworkx-core Jul 2, 2025
@mtreinish mtreinish changed the title Add distance_matrix to rustworkx-core [WIP] Add distance_matrix to rustworkx-core Jul 2, 2025
@mtreinish mtreinish changed the title [WIP] Add distance_matrix to rustworkx-core Add distance_matrix to rustworkx-core Jul 2, 2025
@mtreinish mtreinish removed the on hold label Jul 2, 2025
@coveralls
Copy link

coveralls commented Jul 2, 2025

Pull Request Test Coverage Report for Build 16924127179

Details

  • 75 of 75 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 94.645%

Totals Coverage Status
Change from base Build 16923295558: 0.003%
Covered Lines: 17815
Relevant Lines: 18823

💛 - Coveralls

@IvanIsCoding IvanIsCoding modified the milestones: 0.17.0, 0.17.1 Jul 6, 2025
@mtreinish
Copy link
Member Author

@IvanIsCoding Since this is a new feature from a semver perspective I don't think we should include this in a 0.17.1 release. I'd either keep it for 0.17.0 (it is ready for review now) or defer it to 0.18.0.

@IvanIsCoding
Copy link
Collaborator

Let’s defer it to 0.18.0 then.

I tagged it as 0.17.1 because for rustworkx it would not be a change. But for rustworkx-core it is I guess

@IvanIsCoding IvanIsCoding modified the milestones: 0.17.1, 0.18.0 Jul 7, 2025
@IvanIsCoding
Copy link
Collaborator

I might merge #1491 and use this PR as an excuse to release 0.17.1. There was a problem releasing 0.17.0 with the identifiers.

@IvanIsCoding IvanIsCoding modified the milestones: 0.18.0, 0.17.1 Aug 13, 2025
Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems straightforward. Maybe we should have merged it for 0.17.0, so I will use it to publish 0.17.1 as 0.17.0 only got published to crates.io

@IvanIsCoding IvanIsCoding enabled auto-merge August 13, 2025 00:24
@IvanIsCoding IvanIsCoding added this pull request to the merge queue Aug 13, 2025
Merged via the queue into Qiskit:main with commit 7318a80 Aug 13, 2025
62 of 66 checks passed
@IvanIsCoding
Copy link
Collaborator

@Mergifyio backport stable/0.17

Copy link
Contributor

mergify bot commented Aug 13, 2025

backport stable/0.17

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 13, 2025
* Add distance_matrix to rustworkx-core

This commit moves the distance matrix functionality to rustworkx. This
is mostly a straightforward migration as the functionality was written
in a generic way already. The only difference is how node holes were
handled, the this opted to split the functions into 2, a verison that
assumes the graph has compact indices and one that doesn't.

* Optimize the implementation of distance matrix

This commit performs some optimizations on the internals of the
distance_matrix() function. It avoids extra allocations and uses a
fixedbitset for tracking instead of hashsets.

Co-authored-by: Jake Lishman <[email protected]>

* Deduplicate functions

* Add release note

* Remove stray debug print

* Remove invalid classifier and capitalize keywords

* Bump release version to 0.17.1

---------

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Ivan Carvalho <[email protected]>
Co-authored-by: Ivan Carvalho <[email protected]>
(cherry picked from commit 7318a80)
IvanIsCoding added a commit that referenced this pull request Aug 13, 2025
* Add distance_matrix to rustworkx-core

This commit moves the distance matrix functionality to rustworkx. This
is mostly a straightforward migration as the functionality was written
in a generic way already. The only difference is how node holes were
handled, the this opted to split the functions into 2, a verison that
assumes the graph has compact indices and one that doesn't.

* Optimize the implementation of distance matrix

This commit performs some optimizations on the internals of the
distance_matrix() function. It avoids extra allocations and uses a
fixedbitset for tracking instead of hashsets.



* Deduplicate functions

* Add release note

* Remove stray debug print

* Remove invalid classifier and capitalize keywords

* Bump release version to 0.17.1

---------




(cherry picked from commit 7318a80)

Co-authored-by: Matthew Treinish <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Ivan Carvalho <[email protected]>
Co-authored-by: Ivan Carvalho <[email protected]>
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.

3 participants