Open ChenZhao44 opened 4 years ago
Thanks alot for looking into it. Till now the main aim was to alteast get things working. Now that we're nearly out of that phase I wish to focus on some rigorous testing and verification of results.
Can you tell me the branch that you tried out? Also it'd be nice if you can share the circuits that you tried to run.
I am also a bit divided, whether the apply!
block should have input as a single chain block or array of chain blocks since IBMQ supports that.
The layout of qubits should be considered.
Can you elaborate on this part?
I'll surely look into ZXCalculus.jl since it will help reduce the complexity and the edge cases we need to tackle specifically. :)
I'm using the u1,u2,u3
branch. I'm not sure whether it is the latest branch that you are developing.
For the apply!
method, you could also just define
apply!(r::IBMQReg, b::ChainBlock) = apply!(r, [b])
The Julia multiple dispatch will apply the correct one. I'm not sure whether it is what you want.
The layout I mentioned is the architecture of qubits. The qubits are not fully connected on IBM Q devices. So it would be necessary to tell the user the architecture and verify the circuit, or even more compile it.
Okay so the branch is the latest.
apply!(r::IBMQReg, b::ChainBlock) = apply!(r, [b])
Yeah this looks right. We can also accept other circuits as kwargs.
The qubits are not fully connected on IBM Q devices.
Sorry I am not well aware of this part. But we can surely talk over this. :)
I tried 4 circuits. Unfortunately, there is only one of them runs completed. And the result seems not correct... I don't know where went wrong.
Can you share the 4 circuits that you mentioned? It'd be of great help.
@Sov-trotter Nice work! It is exciting if we can use Julia to access the IBM Q devices. I tried this package, and here are some feedbacks.
v2
in their name which are undefined. After removingv2
, it works fine.apply!(::IBMQReg, ::ChainBlock)
. I didn't apply a vector ofChainBlock
s in my former uses of Yao.jl.By the way, there is a circuit optimizer for Yao.jl, ZXCalculus.jl. And you can access it in Yao.jl with YaoZX.jl. With this package, circuits will be compiled to Rz, Rx, H, and CNOT gates. It would be helpful when generating instructions if we focus on these gates.