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

Add Circuit.has_implicit_permutation #1665

Open
CalMacCQ opened this issue Nov 8, 2024 · 0 comments
Open

Add Circuit.has_implicit_permutation #1665

CalMacCQ opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@CalMacCQ
Copy link
Contributor

CalMacCQ commented Nov 8, 2024

This property would give a Boolean value indicating whether a Circuit has a non-trivial permutation of the qubits.

This would save having to check in python with something like the following

def _has_implicit_permutation(circ: Circuit) -> bool:
    return any(q0 != q1 for q0, q1 in circ.implicit_qubit_permutation().items())

We could then use this Circuit.has_implicit_permutation property in pytket-qiskit CQCL/pytket-qiskit#412 and other places.

Low priority

@CalMacCQ CalMacCQ added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant