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

Add API for inserting phi nodes #279

Merged
merged 4 commits into from
Jun 27, 2024
Merged

Conversation

ausbin
Copy link
Contributor

@ausbin ausbin commented Jun 4, 2024

Allows inserting phi nodes and conditional branches. Hopefully addresses #242 and possibly #277

Testing

pytest passes with a local build of LLVM 14.0.6. I am building with the incantation here

I added a low-effort unit test. If y'all are interested in merging I can put more effort into adding new unit tests (when the giga-test I added fails, the output from pytest is pretty much unreadable)

@ausbin ausbin mentioned this pull request Jun 4, 2024
pyqir/src/builder.rs Outdated Show resolved Hide resolved
@idavis
Copy link
Collaborator

idavis commented Jun 4, 2024

To address this, I have updated #224 and created #280 as a tracking issue. A high level goal is to enable typed/opaque pointers using LLVM 16 to allow migration from the older typed pointers in QIR and then future versions would all be using the opaque APIs.

@idavis
Copy link
Collaborator

idavis commented Jun 5, 2024

I've created a new issue #281 for tracking phi nodes and other bits that are part of adding the core of the adaptive profile support.

@ausbin
Copy link
Contributor Author

ausbin commented Jun 11, 2024

@idavis I'm a little confused by your response, is that a note to self or something actionable on my end?

Also, is there a definition of the adaptive profile online? I only know about this Q# documentation, but I was hoping for something analogous to the description of the Base Profile.

@idavis
Copy link
Collaborator

idavis commented Jun 20, 2024

@ausbin Could you please separate the phi node support from the dyn qubits? I like the phi node work. I'm hesitant to add the dyn qubits as the QIR profiles haven't defined what dynamic qubits will look like.

Here is the current Adaptive Profile. Using phi nodes requires the integer computation extension.

@ausbin
Copy link
Contributor Author

ausbin commented Jun 24, 2024

Thanks for the link, @idavis. I will take a look.

I removed the dyn_qubit() stuff and added a couple of tests, is that better?

@idavis idavis merged commit c536c1b into qir-alliance:main Jun 27, 2024
13 checks passed
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.

3 participants