qiboteam / qibolab

Quantum hardware module and drivers for Qibo.
https://qibo.science
Apache License 2.0
42 stars 13 forks source link

Compiling Align gate to pulse sequence fails #988

Closed oschwarze closed 2 weeks ago

oschwarze commented 3 weeks ago

I am trying to compile a circuit which contains an Align gate into a pulse sequence using backend.compiler.compile(circuit,platform=backend.platform) where backend is a QibolabBackend. This fails however with the error: " AttributeError: 'Align' object has no attribute 'delay' "

The following code reproduces the error for me

import qibo,qibolab

qibo.backends.set_backend('qibolab',platform='dummy')
backend = qibo.backends.GlobalBackend()

circ = qibo.Circuit(1)
circ.add(qibo.gates.Align(0,delay=10))

backend.compiler.compile(circ,platform=backend.platform)

I suspect that this error is due to the Align gate having been changed to a ParametrizedGate not too long ago (https://github.com/qiboteam/qibo/pull/1332)

alecandido commented 3 weeks ago

I suspect that this error is due to the Align gate having been changed to a ParametrizedGate not too long ago (qiboteam/qibo#1332)

Indeed, that's certainly the source of the error. Thanks for pointing us!

I added to the milestone for the next release.