Open Rumoa opened 1 week ago
Align
is the Delay
, so it's not missing. And Delay
would have been even a better name for the Qibo one, since we have a lower level Align
instruction which is doing something slightly different (and Delay
as well, which is what the Align
gate is translated to on hardware).
However, here the problem is in the QASM translation, which is not turning Align
into Delay
, because it's mainly matching by name. But it could be patched. @BrunoLiegiBastonLiegi can estimate how much it may take to do that.
Btw, your example is incomplete, since you're using api
without defining or importing it - please, try to provide a self-consistent reproduction.
Thank you for the clarification. I did not include the api part in the example bc of personal info, but now it has been fixed so it can be reproduced with an actual hardware credentials.
If it's just a matter of renaming the Align
in the to_qasm
I can take care of that immediately.
Qiskit apparently dumps the delay as a custom operation re-defined everytime:
OPENQASM 2.0;
include "qelib1.inc";
opaque delay(param0) q0;
qreg q[1];
delay(1.0) q[0];
thus, supporting the Delay
in qibo
's qasm is easy, but generating a qasm string that will be accepted by qiskit
is slightly trickier. @Rumoa which one is the intended use here? Do you plan to export the qasm to qiskit
or is it just for sending information to another qibo
driven client?
In my case, I plan to use it in a hardware backend that uses qibo, not qiskit compatible.
In my case, I plan to use it in a hardware backend that uses qibo, not qiskit compatible.
Qibo does not require QASM for execution, so you can safely use Align()
as it is.
The issue may be still relevant, but in principle you should be able to work with qibo-client
even without that (there is a native Qibo serialization involved).
In that case, I guess that I should not use the api interface and use the functions from qibo client instead of using the API to connect to the device. Also, I should get the token that somehow must be related to the username and the api_key, right? Is it preferable to work with the api instead of qibo client?
Thank you for fixing the issue.
I am not sure which endpoint you are trying to connect to, but now we have the qibo-cloud-backends that automatically take care (through qibo-client
) of remote circuit execution.
The endpoint is a quantum computer hosted at qilimanjaro, and the instructions they provide only use the api framework. I guess that I will have to ask them to see if there are other ways to connect to it via a token to use the different solutions you just pointed out.
Implementation of Align matrix is not supported by OpenQASM I am trying to implement a delay gate, equivalent to the one from qiskit. Since in the documentation there is no delay gate, I thought Align could be used as it allows to add a delay as parameter function.
When trying to run a simple circuit with this gate:
the following errors appears:
Is there any other way to implement the delay gate?
Thank you in advance