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 quimb_gate, which returns a single quimb gate #5

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

garrison
Copy link
Member

@garrison garrison commented Oct 21, 2024

This introduces a quimb_gate function that is meant to return a single gate. Right now it handles xxplusyygate as a special case in the old _gen_quimb_gates function because it maps to multiple quimb gates, but we can factor this out upon the next quimb release, as xxplusyygate will then be available in quimb (as a givens2 rotation, IIRC).

I think the main design decision here it to decide whether Barrier should map to None or an identity ("IDEN").

I tried adding some tests, but it was difficult to add meaningful tests when even the following fails

def test_quimb_gate():
    def construct():
        return quimb.tensor.Gate("IDEN", params=[], qubits=(0,))
    assert construct() == construct()

Fixes #3.

@kevinsung kevinsung merged commit 34b3bad into qiskit-community:main Oct 21, 2024
12 checks passed
@garrison garrison deleted the quimb_gate branch October 21, 2024 23:39
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.

Make something like _gen_quimb_gates public
2 participants