-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backend basis gate does not match with those provided by Hardware #34
Comments
Hey @exAClior, thanks for reporting the issue! Just to be clear, you're looking for the Qiskit integration to decompose to native OpenQASM gates that can be represented in Qiskit? Currently, the process of decomposition happens within Was that a feature you're asking for? Sorry if I misunderstood the question 😁 |
Hello @dbanty, thank you for getting back to me! Let me try to clarify. Please correct me if I am wrong about this. Rigetti machine supports gates like "XYGate". This is great and I would like to play with it. I can create a circuit with XYGate in it using Qiskit integration. But the problem is: Qiskit integration seem to require a transpile process before running the circuit on the machine. Using Qiskit integration, Rigetti backend has a basis gateset of "u1,u2,u3,CX". Notice this gateset does not contain XYGate. So the circuit send to Rigetti machine does not contain the XYGate anymore, but the gates equivalent to XYGate in terms of CX and U3. From your feedback, it looks like quilc will do another transpilation but I am not sure if the result circuit will be the one that I want to run. What I would like to request is that Qiskit Integration does not transpile using basis gateset ['u1','u2','u3','CX'], but the physical gate that will be run on Rigetti's machine! Like XYGate, CZGate, etc. Does it make sense? |
Hey, @exAClior. I'm not overly familiar with our Qiskit integration, but I think I understand your problem. The integration defines the basis with |
Hello @notmgsk, yes! That's what I wanted to do. Would it be possible to do so? |
I see, sorry for the misunderstanding. Yes, we should definitely have our @exAClior do you have a minimal Qiskit program we can use to reproduce this and add in as a new test? |
Hello @dbanty, I finally see your point in the first post. Sorry for the nonsense I posted above. Allow me to summarize.
Now,
Eventually, I would like to have the following test pass.
|
@exAClior thanks for all that input. I've started working on a solution to this, though I've hit a bit of a wall. Qiskit defines However, it looks like we've defined the |
@dbanty This problem actually came up when I was thinking about the solution too! Hence, I said my first two posts are nonsense. I believe OpenQASM does not have an equivalent gate. This paper https://arxiv.org/abs/2104.14722 seems to indicate that you would have to create an OpenQASM XYGate and provide its decomposition in terms of the existing OpenQASM gates. This sounds like it will create a huge loop and |
I see, so maybe the best we can do, then, is to support the OpenQASM |
Yeah, I agree. |
@dbanty Sorry for the delay, I tested it on a few circuits. I think they are doing what I expect. Thank you for fixing this! |
Issue
Rigetti hardware provides XYGate and CZ natively. QuantumCircuit that contains CX gate should be transpiled into those for a more accurate representation of what's being run on the hardware. Currently, circuit is being transpiled to the basis gateset of ['u1','u2','u3','cx']. This appears misleading.
The text was updated successfully, but these errors were encountered: