Skip to content

Move unitary matrix circuit simulator to qiskit-synthesis#15913

Merged
jakelishman merged 1 commit intoQiskit:mainfrom
jakelishman:circuit-free-qi/6
Mar 31, 2026
Merged

Move unitary matrix circuit simulator to qiskit-synthesis#15913
jakelishman merged 1 commit intoQiskit:mainfrom
jakelishman:circuit-free-qi/6

Conversation

@jakelishman
Copy link
Copy Markdown
Member

@jakelishman jakelishman commented Mar 30, 2026

This isn't the most natural place ever for it, but it wasn't really any better in qiskit-quantum-info, and this doesn't produce problematic ordering in the dependency chain.

Depends on #15912, but only in the sense that one of the two moves needs to set up the qiskit_synthesis::matrix module, and I did that one first.

@jakelishman jakelishman requested a review from a team as a code owner March 30, 2026 17:01
@qiskit-bot
Copy link
Copy Markdown
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @levbishop

@jakelishman jakelishman added on hold Can not fix yet Changelog: None Do not include in the GitHub Release changelog. labels Mar 30, 2026
@ShellyGarion
Copy link
Copy Markdown
Member

I think that originally putting unitary_sim in the quantum_info crate was done to mimic the python code structure where all simulators (unitary, statevector, clifford, stabiliser) are in quantum_info.
I think that eventually if we'll have more than one simulator we should have a seperate crate for them.
But for now putting it in the synthesis crate makes sense as it's only used in mcx.rs

This isn't the most natural place ever for it, but it wasn't really any
better in `qiskit-quantum-info`, and this doesn't produce problematic
ordering in the dependency chain.
@jakelishman jakelishman removed the on hold Can not fix yet label Mar 31, 2026
@jakelishman
Copy link
Copy Markdown
Member Author

Shelly: yeah, that's totally fair for why it was there - there was also a bunch of code in qiskit-circuit that was there not because it was actually related to the circuit IR, but because that just happened to be our "lowest" crate before now.

We actually have this same dependency problem within Python too, but we use lazy / scoped import statements to get around it there. We don't have that same option with separate Rust crates (and it's not a good situation in Python anyway), so this is necessary to get the dependency graph we want.

Copy link
Copy Markdown
Member

@ShellyGarion ShellyGarion left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jakelishman jakelishman added this pull request to the merge queue Mar 31, 2026
Merged via the queue into Qiskit:main with commit 29fdcad Mar 31, 2026
25 checks passed
@jakelishman jakelishman deleted the circuit-free-qi/6 branch March 31, 2026 16:34
@github-project-automation github-project-automation Bot moved this from Ready to Done in Qiskit 2.5 Apr 25, 2026
@ShellyGarion ShellyGarion added this to the 2.5.0 milestone Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants