Skip to content

ccz roundtrip in OpenQASM 2 broken #9721

@1ucian0

Description

@1ucian0

@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 "

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedcommunity contributions welcome. For filters like http://github-help-wanted.com/

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions