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

RZZ gate in hqslib1 QASM translated to CustomGate with empty circuit #678

Closed
cqc-alec opened this issue Dec 8, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@cqc-alec
Copy link
Collaborator

cqc-alec commented Dec 8, 2022

from pytket.qasm import circuit_from_qasm_str, circuit_to_qasm_str
from pytket.passes import DecomposeBoxes

c = circuit_from_qasm_str(
    """
OPENQASM 2.0;
include "hqslib1.inc";

qreg q[2];
RZZ(0.5*pi) q[0],q[1];
"""
)

DecomposeBoxes().apply(c)

print(circuit_to_qasm_str(c, header="hqslib1"))

Output:

OPENQASM 2.0;
include "hqslib1.inc";

qreg q[2];
@cqc-alec cqc-alec added the bug Something isn't working label Dec 8, 2022
@cqc-alec
Copy link
Collaborator Author

cqc-alec commented Dec 8, 2022

Fixed by #679 .

@cqc-alec cqc-alec closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant