Skip to content

Add support for controls to PostselectionCircuit#453

Merged
kottmanj merged 4 commits intotequilahub:masterfrom
ohuettenhofer:controlled_postselection
Mar 25, 2026
Merged

Add support for controls to PostselectionCircuit#453
kottmanj merged 4 commits intotequilahub:masterfrom
ohuettenhofer:controlled_postselection

Conversation

@ohuettenhofer
Copy link
Copy Markdown
Collaborator

This pull request allows Postselections to be controlled, which means that they are only active if all the control qubits are 1, and otherwise nothing is filtered out/removed.
This is different from how the postselected qubits themselves behave, where states are filtered out if any of the qubits are in state 1.

This makes it simple to implement an add_controls function for PostselectionCircuit which behaves analogously to the corresponding QCircuit function.

I also changed how n_qubits is calculated for PostselectionCircuit to fix a problem when fragments have different numbers of qubits.

@kottmanj kottmanj merged commit a2ca42b into tequilahub:master Mar 25, 2026
9 of 10 checks passed
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