Skip to content
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

integrate YaoBlocks with IBMQClient and OpenQASM #279

Closed
Roger-luo opened this issue May 5, 2021 · 18 comments
Closed

integrate YaoBlocks with IBMQClient and OpenQASM #279

Roger-luo opened this issue May 5, 2021 · 18 comments

Comments

@Roger-luo
Copy link
Member

Roger-luo commented May 5, 2021

This issue has been tagged for a bounty during #unitaryHACK

Although, these two packages were initially made for YaoLang, supporting them for YaoBlocks should be simple to implement since YaoBlocks only supports pure quantum circuit programs.

now with the v0.3 release of IBMQClient, the API should be stable. One could integrate YaoBlocks with IBMQClient by transforming the quantum blocks to the corresponding Qobj schema defined here: https://yaoquantum.org/IBMQClient.jl/dev/schema/

for OpenQASM 2.0, one can refer to the AST here:

https://github.com/QuantumBFS/OpenQASM.jl/blob/master/src/types.jl

@Sov-trotter
Copy link
Member

Sov-trotter commented May 6, 2021

I think some work in similar direction has been done here https://github.com/Sov-trotter/IBMQJulia.jl/blob/main/src/qobj.jl.
I'd love to work on this issue?

@Sov-trotter
Copy link
Member

On initial though I think we can dispatch a single transform function to the specific schema constructors? Is it the right way to go?

@Roger-luo
Copy link
Member Author

Yes, I think it in general should work in the same way in the previous implementation. On the other hand, I think we should create a Yao branded package for this since this is quite Yao specific (unlike the REST API wrapper), e.g YaoBlocksQASM and YaoBlocksQobj

@Sov-trotter
Copy link
Member

Sov-trotter commented May 12, 2021

Yeah that makes sense.
I am also wondering what this integration should look like?
Do we provide methods like in the previous implementation which just needs the qbir circuit as input or something more like https://yaoquantum.org/IBMQClient.jl/dev/#Usage where one has to create the qobj manually?

Secondly I have created the package here. Shopuld I move it to the QuantumBFS org?

@Roger-luo
Copy link
Member Author

Do we provide methods like in the previous implementation which just needs the qbir circuit

Yes, the input is a QBIR circuit, and the output is QASM and Qobj

Secondly I have created the package here. Shopuld I move it to the QuantumBFS org?

Yes, please move them to QuantumBFS org, you will also need a repo for QASM.

@Sov-trotter
Copy link
Member

Sov-trotter commented May 12, 2021

@Roger-luo
Copy link
Member Author

@Sov-trotter remember to let me review the PR when you submit them to YaoBlocksXXX, since we need to link that with unitary hack tag

@Sov-trotter
Copy link
Member

Sov-trotter commented May 14, 2021

Yeah.
Unfortunately there isn't any major PR for YaoBlocksQobj since I was working on it before moving it to the org.(only https://github.com/QuantumBFS/YaoBlocksQobj.jl/pulls?q=is%3Apr+is%3Aclosed)

As for YaoBlocksQASM there is QuantumBFS/YaoBlocksQASM.jl#1.

I merged the PRs after verifying the results. I would love if you can review both the packages. @Roger-luo

@Sov-trotter
Copy link
Member

Hey @Roger-luo! I just wanted to clarify what all is left to be done in order to have these tasks qualify for the bounty, since I am abit preoccupied with other projects, I wish to solve some of the issues later.

@Roger-luo
Copy link
Member Author

The Qobj one is roughly done, there's only last main issue need to resolve here

QuantumBFS/YaoBlocksQASM.jl#9
QuantumBFS/YaoBlocksQASM.jl#8

@Sov-trotter
Copy link
Member

Is it okay if I take them up slowly(beyond the timeline of UnitaryHack)?

@Roger-luo
Copy link
Member Author

@Sov-trotter I think these two issues is quite simple to finish, they were supposed to be in the comment the initial PRs, and there are still a few days by the end of UnitaryHack IIRC? It'll be easier if we can just wrap up them quickly. But I'm OK as long as you promised to resolve them afterwards, or it will be unfair to other contributors.

@Sov-trotter
Copy link
Member

Hey @Roger-luo is the work so far approved for the bounty?

@Roger-luo
Copy link
Member Author

yes, but you need to finish up the QASM conversion afterwards.

@Sov-trotter
Copy link
Member

Yeah. Sure.

@crazy4pi314
Copy link

@Sov-trotter and @Roger-luo let me know when there is a PR I can reference for the results page on the unitaryHACK website!

@Roger-luo
Copy link
Member Author

@crazy4pi314 can we link to these two packages? this issue actually creates two packages (the QASM one still needs some work as disscussed above tho)

https://github.com/QuantumBFS/YaoBlocksQobj.jl
https://github.com/QuantumBFS/YaoBlocksQASM.jl

@crazy4pi314
Copy link

added to the top of the results page! Thanks @Roger-luo and @Sov-trotter 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants