Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port circuit_to_dag to Rust #13001

Closed
5 of 6 tasks
raynelfss opened this issue Aug 20, 2024 · 0 comments · Fixed by #13036
Closed
5 of 6 tasks

Port circuit_to_dag to Rust #13001

raynelfss opened this issue Aug 20, 2024 · 0 comments · Fixed by #13036
Assignees
Labels
type: feature request New feature or request

Comments

@raynelfss
Copy link
Contributor

raynelfss commented Aug 20, 2024

What should we add?

With #12550 getting merged soon, we should be thinking of moving the circuit_to_dag converter into Rust. This issue will keep track of the progress on this effort and describe the designated roadmap.

Tasks

Preview Give feedback
  1. Changelog: API Change Changelog: Bugfix Changelog: New Feature Rust mod: transpiler performance priority: high
    jakelishman mtreinish
  2. Changelog: None
  3. Rust mod: circuit
    raynelfss
  4. Rust mod: circuit
    raynelfss
  5. Rust mod: circuit
    raynelfss
@raynelfss raynelfss added the type: feature request New feature or request label Aug 20, 2024
@raynelfss raynelfss self-assigned this Aug 20, 2024
mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Aug 24, 2024
This commit migrates the entirety of the CheckMap analysis pass to Rust.
The pass operates solely in the rust domain and returns an
`Option<(String, [u32; 2])>` to Python which is used to set the two
property set fields appropriately. All the analysis of the dag is done
in Rust. There is still Python interaction required though because
control flow operations are only defined in Python. However the
interaction is minimal and only to get the circuits for control flow
blocks and converting them into DAGs (at least until Qiskit#13001 is complete).

This commit is based on top of Qiskit#12959 and will need to be rebased after
that merges.

Closes Qiskit#12251
Part of Qiskit#12208
mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Aug 30, 2024
This commit migrates the entirety of the CheckMap analysis pass to Rust.
The pass operates solely in the rust domain and returns an
`Option<(String, [u32; 2])>` to Python which is used to set the two
property set fields appropriately. All the analysis of the dag is done
in Rust. There is still Python interaction required though because
control flow operations are only defined in Python. However the
interaction is minimal and only to get the circuits for control flow
blocks and converting them into DAGs (at least until Qiskit#13001 is complete).

This commit is based on top of Qiskit#12959 and will need to be rebased after
that merges.

Closes Qiskit#12251
Part of Qiskit#12208
github-merge-queue bot pushed a commit that referenced this issue Sep 6, 2024
* Fully port CheckMap to Rust

This commit migrates the entirety of the CheckMap analysis pass to Rust.
The pass operates solely in the rust domain and returns an
`Option<(String, [u32; 2])>` to Python which is used to set the two
property set fields appropriately. All the analysis of the dag is done
in Rust. There is still Python interaction required though because
control flow operations are only defined in Python. However the
interaction is minimal and only to get the circuits for control flow
blocks and converting them into DAGs (at least until #13001 is complete).

This commit is based on top of #12959 and will need to be rebased after
that merges.

Closes #12251
Part of #12208

* Use a Vec<Qubit> for wire_map instead of a HashMap

This commit switches to using a Vec<Qubit> for the internal wire_map
used to map control flow qubits. A HashMap was originally used because
in Python a dictionary is used. However, in the rust domain the inner
qubits are contiguous integers starting from 0 so a Vec can be used for
better performance in the case we have control flow.

* Update crates/accelerate/src/check_map.rs

Co-authored-by: Raynel Sanchez <[email protected]>

---------

Co-authored-by: Raynel Sanchez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant