pyzx
pyzx copied to clipboard
input qasm file format
Hi, thanks for the useful tool for implementing ZX-calculus.
I'm wondering if it is possible to enter all formats of qasm files, since I found out that some gates like P-gate, CP-gate, and so on are not supported by the load
function provided in this tool. Thanks~
That would certainly be possible. Is there a specific library that uses these gates? I don't really know what a 'P' gate is namely (I'm assuming 'CP' is just a controlled-P gate)
In my viewpoint, qasm format is kind of free style. However, in the tool Qiskit provided by IBM, there are a couple of gate definitions. Qiskit Gate Library The output qasm files of Qiskit contain some of these gates which are not supported in PyZX.
That list you link does not mention a P gate, unless I missed it?
Sorry, I didn't explain it clearly enough. P-gate is equivalent to PhaseGate in the Qiskit Gate Library. Some papers and tutorial called PhaseGate "P-gate" for short.
Hi, @anitalu724,
I am working on #156 which is going to add support for most of the OpenQASM standard library gates. Besides p
and cp
, was there anything else you needed?
As of PR #156 both p
and cp
are supported, along with the most common qasm gates, so unless there are other requested gates, this issue can be closed.