Skip to content

Re-organize into submodules.#15

Open
raynelfss wants to merge 2 commits into
Qiskit:mainfrom
raynelfss:org-circuit
Open

Re-organize into submodules.#15
raynelfss wants to merge 2 commits into
Qiskit:mainfrom
raynelfss:org-circuit

Conversation

@raynelfss
Copy link
Copy Markdown
Collaborator

@raynelfss raynelfss commented Dec 18, 2025

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
Copy link
Copy Markdown
Member

@emilkovacev emilkovacev 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 PR! I put a few comments/suggestions, but I think this is almost ready to merge.

Comment thread tests/test_registers.rs
// 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.


use super::{Complex64, Observable};
#[test]
fn test_new_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.

With this organization, it could be a great opportunity to standardize where tests are written! My understanding is that the tests directory should be reserved for more holistic tests rather than module tests, is that a pattern that makes sense to uphold?

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.

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

mod quantum_circuit;
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 docs for this module?

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