bqskit icon indicating copy to clipboard operation
bqskit copied to clipboard

CU1 gate cannot be printed to qasm

Open bachbao opened this issue 11 months ago • 1 comments

It occurs to me that when using ControlledGate(U1Gate()), the feature to output qasm file is having issue.

bachbao avatar Mar 18 '24 14:03 bachbao

Thanks for making this bug report. To clarify, we should be able to build a ControlledGate(U1Gate()) and save to qasm, load that same qasm, and have the same gate.

from bqskit.ir.gates import ControlledGate, U1Gate
g = ControlledGate(U1Gate())

from bqskit import Circuit
c = Circuit(2)
c.append_gate(g, (0, 1))
c.to('qasm')

This seems to be printing fine. @bachbao, do you have a case where this isn't working?

edyounis avatar May 21 '24 13:05 edyounis

Closing for now, feel free to re-open.

edyounis avatar Sep 11 '24 12:09 edyounis