Skip to content

Move 2q block-consolidation logic to qiskit-synthesis#15912

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

Move 2q block-consolidation logic to qiskit-synthesis#15912
Cryoris merged 1 commit intoQiskit:mainfrom
jakelishman:circuit-free-qi/5

Conversation

@jakelishman
Copy link
Copy Markdown
Member

@jakelishman jakelishman commented Mar 30, 2026

This is dependent on both the circuit IRs and the quantum-info objects. All of these functions are primarily used in synthesis, which makes qiskit-synthesis a relatively natural place for them; they're not strictly about immediate synthesis of a matrix into circuit objects, but they are very much along the path to that.

@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

1 similar comment
@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
This is dependent on both the circuit IRs _and_ the `quantum-info`
objects.  All of these functions are primarily used in synthesis, which
makes `qiskit-synthesis` a relatively natural place for them; they're
not _strictly_ about immediate synthesis of a matrix into circuit
objects, but they are very much along the path to that.
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.

Thanks for the effort! Looks good!
two_qubit.rs is used mostly in the synthesis code for 2-qubit and QSD decomposition, but also in some tranpiler passes (consolidate_blocks.rs). does this dependency makes sense?

@jakelishman
Copy link
Copy Markdown
Member Author

Yeah, transpiler necessarily depends on synthesis already, so this doesn't break anything there.

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 for the effort!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file also contains 1-qubit logic, the filename doesn't really reflect that -- but I also don't see a better name right now since it's a collection of quite some functions. What do you think of just moving it to mod.rs? Or do you have another idea?

An overkill idea could be to further split it lol

Copy link
Copy Markdown
Member Author

@jakelishman jakelishman Mar 31, 2026

Choose a reason for hiding this comment

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

Yeah, I didn't realise that it had other public 1q logic in it til something like the last compiler-error fix I did. Maybe it might be better to follow-up? (I mean, the file before was called convert_2q_block_matrix, so it's not exactly like the situation got worse lol)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah it's also a mild complaint since it's not public anyways... sure we can do it in a follow up (or later when we get annoyed bit it at some point) 😄

@Cryoris Cryoris added this pull request to the merge queue Mar 31, 2026
Merged via the queue into Qiskit:main with commit 5b4e959 Mar 31, 2026
26 checks passed
@jakelishman jakelishman deleted the circuit-free-qi/5 branch March 31, 2026 13:29
@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.

4 participants