I am currently trying to load a quantum volume circuit generated with Qiskit from a .qasm file into PyZX, using:
zx.Circuit.load("file.qasm")
I encounter the following:
TypeError: Unknown gate name: swap q2,q3
The same applies when I use the zx.Circuit.from_qasm_file("file.qasm"), or directly: zx.Circuit.from_qasm(circ.qasm(formatted=False)).
It seems it is not possible for the QASMParser to translate the swap gate into a valid PyZX representation. Is this correct, or am I missing something?
It would be useful to support this since SWAP gates are used by quantum volume circuits which need to be transpiled for optimization purposes before benchmarking the underlying device.
I am currently trying to load a quantum volume circuit generated with Qiskit from a
.qasm
file into PyZX, using:I encounter the following:
The same applies when I use the
zx.Circuit.from_qasm_file("file.qasm")
, or directly:zx.Circuit.from_qasm(circ.qasm(formatted=False))
.It seems it is not possible for the
QASMParser
to translate the swap gate into a valid PyZX representation. Is this correct, or am I missing something?It would be useful to support this since SWAP gates are used by quantum volume circuits which need to be transpiled for optimization purposes before benchmarking the underlying device.