zxcalc / pyzx

Python library for quantum circuit rewriting and optimisation using the ZX-calculus
Apache License 2.0
365 stars 108 forks source link

cp gate support for QASMParser #153

Closed rahulsust closed 9 months ago

rahulsust commented 10 months ago

Hi @jvdwetering, I faced the problem of phase(p), and controlled phase(cp) gate when parsing the qasm string. I thought I might try working on this issue to add p and cp gate support. Your guidance and input would be greatly appreciated.

jvdwetering commented 10 months ago

I think @dlyongemallo might have just already added this support.

dlyongemallo commented 10 months ago

Hi, @rahulsust,

Thanks for the offer of help.

PR #151 adds support for p but not yet for cp. I have ongoing work to support as much of the OpenQASM 3 standard gate set as is possible or makes sense, but it's not ready yet. If you have an urgent need to support the cp gate, it shouldn't be too hard to add it in an ad hoc manner, using PR #151 as a template.

rahulsust commented 10 months ago

Hi, @dlyongemallo,

Thank you for letting me know.

I will start working on it then. If it is okay, can we talk over DM?

dlyongemallo commented 10 months ago

Hi, @rahulsust,

Are you on the ZX-calculus Discord? My user name is the same as on GitHub. You can send me a DM there.