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

rzx defined twice in QASM export #7779

Closed
epelofske-LANL opened this issue Mar 15, 2022 · 2 comments
Closed

rzx defined twice in QASM export #7779

epelofske-LANL opened this issue Mar 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@epelofske-LANL
Copy link

Environment

  • Qiskit Terra version: qiskit-terra==0.19.2
  • Python version: 3.9.7
  • Operating system: macOS

What is happening?

A Qiskit circuit that contains the ecr two qubit gate exports two definitions of rzx when converting the circuit to a QASM file:

OPENQASM 2.0;
include "qelib1.inc";
gate rzx(param0) q0,q1 { h q1; cx q0,q1; rz(-pi/4) q1; cx q0,q1; h q1; }
gate rzx(param0) q0,q1 { h q1; cx q0,q1; rz(pi/4) q1; cx q0,q1; h q1; }
gate ecr q0,q1 { rzx(pi/4) q0,q1; x q0; rzx(-pi/4) q0,q1; }

How can we reproduce the issue?

Create a Qiskit circuit with an ECR gate, and then export that circuit to QASM.

What should happen?

Upon reading in the QASM file (QuantumCircuit.from_qasm_file) it will throw an error because rzx is defined twice.

Any suggestions?

No response

@epelofske-LANL epelofske-LANL added the bug Something isn't working label Mar 15, 2022
@jakelishman
Copy link
Member

Thanks for the report. In this case, this is a duplicate of issue #7749, which is itself a duplicate in spirit of #7335. There's a bit more information in those issues about why this happens, and how our near-term plans will help fix this.

@jakelishman
Copy link
Member

jakelishman commented Mar 15, 2022

Duplicate of #7749

@jakelishman jakelishman marked this as a duplicate of #7749 Mar 15, 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

2 participants