Skip to content

Re-organize into submodules.#15

Merged
emilkovacev merged 4 commits into
Qiskit:mainfrom
raynelfss:org-circuit
Jun 9, 2026
Merged

Re-organize into submodules.#15
emilkovacev merged 4 commits into
Qiskit:mainfrom
raynelfss:org-circuit

Conversation

@raynelfss

@raynelfss raynelfss commented Dec 18, 2025

Copy link
Copy Markdown
Collaborator

Fixes #11

The following commits organize the qiskit-rs crate into different submodules. We understand that with the expansion of the C API we will have further additions into the API and we need to think about how we organize the many features as they will be included. Since we currently only have circuit feaures, the only module exposed will be the circuit.

The following commits organize the `qiskit-rs` crate into different submodules.
We understand that with the expansion of the C API we will have further additions into the API and we need to think about how we organize the many features as they will be included.
Since we currently only have circuit feaures, the only module exposed will be the `circuit`.
Mimicking what was done in the main qiskit repository, this commit separates the `Observable`, `BitTerm` and `BitTermList` into its own crate called `quantum_info`.
@raynelfss raynelfss marked this pull request as ready for review June 2, 2026 20:39
@raynelfss raynelfss requested a review from emilkovacev June 2, 2026 20:39

@emilkovacev emilkovacev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR! I put a few comments/suggestions, but I think this is almost ready to merge.

@@ -10,7 +10,7 @@
// copyright notice, and modified files need to carry a notice indicating
// that they have been altered from the originals.

use qiskit_rs::{ClassicalRegister, QuantumCircuit, QuantumRegister};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any way to move the files while keeping the imports? In python, QuantumCircuit, ClassicalRegister, and QuantumRegister are importable from Qiskit alone, so this would be consistent with the main interface.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, we can have a pub use that keeps the imports up. That said, we don't have to follow that import logic to a tee as this is a different environment. It is fair for Circuit and Registers to be like that as they're very important structs, but we don't have to do the same for the rest.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense! I agree for the time being that Circuits and Registers should follow that pattern.

Comment thread src/quantum_info/observable.rs Outdated
Comment thread src/quantum_info/mod.rs
// copyright notice, and modified files need to carry a notice indicating
// that they have been altered from the originals.

mod observable;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add module-level docs for the observable module? Something about what belongs in this module would be great.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure!

Comment thread src/circuit/mod.rs

@emilkovacev emilkovacev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@emilkovacev emilkovacev added this pull request to the merge queue Jun 9, 2026
Merged via the queue into Qiskit:main with commit b813fda Jun 9, 2026
2 checks passed
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.

Separate the crate into multiple submodules.

2 participants