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

QGL IR #96

Open
blakejohnson opened this issue Mar 29, 2017 · 2 comments
Open

QGL IR #96

blakejohnson opened this issue Mar 29, 2017 · 2 comments

Comments

@blakejohnson
Copy link
Collaborator

This issue is to track discussions about supporting a simple, pure text IR for QGL. Some initial notion of what that might look like from this morning's discussion:

QBIT_q1 = Qubit('q1')
QBIT_q2 = Qubit('q2')
OPAQUE VOTE

MEAS(QBIT_q1) -> 0x0010
MEAS(QBIT_q2) -> 0x0011
VOTE(0x0010, 0x0011) -> 0x0013
LoadCmp(0x0013)
CmpEq(0)
Goto(BlockLabel('if_1'))
Id(QBIT_q1)
Goto(BlockLabel('if_end_1'))
BlockLabel('if_1')
X(QBIT_q1)
BlockLabel('if_end_1')
X90(QBIT_q1)
@caryan
Copy link
Contributor

caryan commented Mar 29, 2017

The LoadCmp seems very APS2 specific and adds an extra instruction. Perhaps the comparison operators (CmpEq etc) should take an address and the APS2 would translate that to LoadCmp(addr).

@blakejohnson
Copy link
Collaborator Author

Sure, I like that.

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

No branches or pull requests

2 participants