Skip to content

[WIP] Add qubit tracing helper function#2652

Draft
rniczh wants to merge 3 commits intomainfrom
rniczh/add-qubit-tracing-function
Draft

[WIP] Add qubit tracing helper function#2652
rniczh wants to merge 3 commits intomainfrom
rniczh/add-qubit-tracing-function

Conversation

@rniczh
Copy link
Copy Markdown
Member

@rniczh rniczh commented Apr 6, 2026

Context:

For those passes require to trace the qubit to find the index or extract op, they usually implement the qubit SSA tracking in their pass. This PR is intend to make a helper function for this purpose, people can reuse it instead of inventing their own. Plan to use it in the following PR for supporting wire grouping strategy in split-non-commuting pass.

Description of the Change:

Introduce a traceQubit utility (Quantum/Utils/QubitTracing.h) that walks a qubit SSA value backward to the quantum.extract result that defines the logical wire.

Benefits:

Possible Drawbacks:

Related GitHub Issues:
[sc-109333]

EDIT: I just realize I don't need it to finish the split-non-commuting feature. So I just put here if anyone need it.

@rniczh rniczh marked this pull request as draft April 6, 2026 20:14
@rniczh rniczh changed the title Add qubit tracing helper function [WIP] Add qubit tracing helper function Apr 6, 2026
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.

1 participant