Skip to content

Add discard option to OpenQASMParser and index bits by measurement - #23

Open
thierry-martinez wants to merge 3 commits into
TeamGraphix:mainfrom
thierry-martinez:measure-without-discard
Open

thierry-martinez wants to merge 3 commits into
TeamGraphix:mainfrom
thierry-martinez:measure-without-discard

Conversation

@thierry-martinez

Copy link
Copy Markdown
Collaborator

This PR relies on #22.

Measurement outcomes are now referred to in domains by the index of the measurement, following Graphix's convention for CONDINSTR in TeamGraphix/graphix#644.

The new option discard_measurements (default True) controls whether measured qubits are discarded; with
discard_measurements=False, qubits remain active after measurement, as in OpenQASM.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

thierry-martinez and others added 3 commits October 27, 2026 08:19
`CONDINSTR` now takes its `domain` as first argument, before the
instructions. The uv source for graphix temporarily points to the PR
branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measurement outcomes are now referred to in domains by the index of
the measurement, following Graphix's convention for CONDINSTR in
TeamGraphix/graphix#644.

The new option `discard_measurements` (default `True`) controls
whether measured qubits are discarded; with
`discard_measurements=False`, qubits remain active after measurement,
as in OpenQASM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matulni
matulni self-requested a review November 3, 2026 09:42

This branch has not been deployed

No deployments
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