Skip to content

Make boxing_pass_manager() always use site="before" for meas/reset boxes - #409

Merged
Ian Hincks (ihincks) merged 3 commits into
mainfrom
meas-before-site
Sep 9, 2026
Merged

Make boxing_pass_manager() always use site="before" for meas/reset boxes#409
Ian Hincks (ihincks) merged 3 commits into
mainfrom
meas-before-site

Conversation

@ihincks

@ihincks Ian Hincks (ihincks) commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Right now if you specify the site as "after", this applies to all boxes found by the boxing pass manager. However, when you add site=after to a boxing containing measurements, the noise is not actually injected, but the signs are still reported.

Details and comments

Right now something like this

circuit = QuantumCircuit(2)
circuit.measure_all()

circuit = generate_boxing_pass_manager(inject_noise_targets="all").run(circuit)

actually ends up with a disconnected samplex. The one on the left is just reporting the noise signs, and nothing on the right is injecting noise.

image

@joshuasn joshuasn left a comment

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.

lgtm, care to add a changelog?

@ihincks

Copy link
Copy Markdown
Collaborator Author

Oh thanks. I have one written but not pushed.

@ihincks
Ian Hincks (ihincks) merged commit 2a644a0 into main Sep 9, 2026
8 checks passed
@ihincks
Ian Hincks (ihincks) deleted the meas-before-site branch September 9, 2026 19:19
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.

2 participants