Skip to content

Create 2021-01-23-intermediate-representation-for-quantum-computing.md #28

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

Merged
merged 10 commits into from
Jan 23, 2021

Conversation

esthercruz
Copy link
Contributor

No description provided.

Copy link
Contributor

@crazy4pi314 crazy4pi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I made a few suggestions for grammar and tried to clarify in a few places, just accept the suggestions if you like them else happy to discuss further!


As a quantum computing physicist, at some point you might have wondered which language to use for programming and testing quantum algorithms, especially taking into account that the wide variety of quantum-programming languages is growing every day. This expansion naturally enriches the quantum programming environment and fosters the understanding and designing of quantum algorithms, but it also raises some questions. For instance, you might consider not only which language is the most appealing to you, but also which is best suited to be translated into instructions that an actual quantum platform can implement. For that, one should consider which compilers and intermediate representations work with these languages. And before we go on, I know, the words compiler or intermediate representation might sound scary if you have a physics background, like me, rather than a computer science one. But at the same time, I believe it is exciting to dive deeper into the programming of a quantum algorithm and come a step closer to what is, at the end, the final goal of any algorithm researcher: to run it on a quantum platform.

An intermediate representation is – as its name indicates – an intermediary step in the workflow between the source code and the hardware itself. It should allow you to represent different kinds of source code before the specific platform is specified. Moreover, at this intermediate level it is also possible to perform some optimization and circuit rearrangement that makes the final implementation more efficient. Some examples of intermediate representations are [OpenQASM](https://github.com/QISKit/openqasm) (used by IBM for Qiskit) or [Quil](https://github.com/rigetti/quil) (used by Rigetti) and of course the topic of this blog entry: the Quantum Intermediate Representation (QIR) by Microsoft.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openqasm is used by more than just IBM, I think a lot of tools can use it (including circ and Q# with a community extension). IBM maintains a spec for and distributes it with a permissive license, but is not the only user of. I would also say explicitly openqasm v3 because 2.0 and earlier would not be comparable given they didn't support well classical instructions.

Also could mention https://www.sandia.gov/quantum/Projects/QSCOUT.html, and https://arxiv.org/pdf/1808.02449.pdf

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this is a better link for JAQAL, the IR for the QSCOUT project: https://www.sandia.gov/quantum/Projects/quantum_assembly_spec.pdf

Copy link
Contributor

@crazy4pi314 crazy4pi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crazy4pi314 crazy4pi314 merged commit 2631878 into qsharp-community:master Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants