Infleqtion / client-superstaq

https://superstaq.readthedocs.io
Apache License 2.0
89 stars 19 forks source link

cq_compile appears to ignore barriers #829

Open ColinCampbellCQ opened 1 year ago

ColinCampbellCQ commented 1 year ago

What is happening?

I'm trying to use cq_compile on single qubit circuits where gates are separated by barriers, but the output circuit appears to not respect the barriers. See example below:

image

How can we reproduce the issue?

qc.barrier()
qc.u(2.6202, 0.02139, 4.5259, 0)
qc.barrier()
qc.u(1, 2, 3, 0)
qc.barrier()
qc.measure_all()
print(qc)
print(provider.cq_compile(qc, grid_shape=(2, 2)).circuit)

What should happen?

This circuit should produce a circuit with barriers containing two GR gates.

Environment

Any additional context?

No response

ColinCampbellCQ commented 1 year ago

I'm looking into this

ColinCampbellCQ commented 1 year ago

Related to https://github.com/Infleqtion/server-superstaq/issues/1284

ColinCampbellCQ commented 1 year ago

Additional example image

bharat-thotakura commented 2 months ago

Is this still an issue? I can't seem to replicate it with the example circuits above as of qiskit-superstaq/cirq-superstaq v0.5.27

ColinCampbellCQ commented 2 months ago

I am not sure, but if you tried reproducing the issue, and the circuit looked correct, perhaps we can close the issue.

bharat-thotakura commented 2 months ago

^ Actually, nevermind this is still an issue. I didn't realize the code snippet was for a 1 qubit circuit and not 4 qubit circuit