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

ccz roundtrip in OpenQASM 2 broken #9721

Closed
1ucian0 opened this issue Mar 3, 2023 · 1 comment · Fixed by #9777
Closed

ccz roundtrip in OpenQASM 2 broken #9721

1ucian0 opened this issue Mar 3, 2023 · 1 comment · Fixed by #9777
Labels
help wanted community contributions welcome. For filters like http://github-help-wanted.com/

Comments

@1ucian0
Copy link
Member

1ucian0 commented Mar 3, 2023

@ryahill1 notices that roundtrip in OpenQASM2 for several gates is broken (Originally posted in #9559 (comment))

One of those cases is ccz:

import qiskit

qc = qiskit.QuantumCircuit(3)
gate = qiskit.circuit.library.CCZGate()
qc.append(gate, qargs=qc.qubits)

qasm = qc.qasm()
print(qasm)
qc_from_qasm = qiskit.QuantumCircuit.from_qasm_str(qasm)
print(qc_from_qasm)
qiskit.qasm.exceptions.QasmError: "Cannot find gate definition for 'ccz', line 4 file "
@1ucian0 1ucian0 added the help wanted community contributions welcome. For filters like http://github-help-wanted.com/ label Mar 3, 2023
@jakelishman
Copy link
Member

(Copied over): this doesn't need a separate issue. I commented the fix for #9559 at the bottom, and it's trivially the same for the three concerned gates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted community contributions welcome. For filters like http://github-help-wanted.com/
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants