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

Python AST Builder assigns quantum memory artifacts to classic memory locations #2540

Open
schweitzpgi opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something isn't working python bridge Involves the python bridge to quake

Comments

@schweitzpgi
Copy link
Collaborator

schweitzpgi commented Jan 24, 2025

We shouldn't be doing this:

  %1 = quake.alloca !quake.veq<5>
  %2 = cc.alloca !quake.ref[5]          // this is going to become illegal
  cc.loop while (...) {
    ...
  } do {
  ^bb0(%idx : i64):
    %10 = quake.extract_ref %1[%idx]
    %11 = cc.compute_ptr %2[%idx]
    cc.store %10, %11                  // this is going to become illegal
    cc.continue %idx
  }  ...

It is invalid to copy a quantum reference value and save it in a classic data structure (here, an array).

@schweitzpgi schweitzpgi added bug Something isn't working python bridge Involves the python bridge to quake labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python bridge Involves the python bridge to quake
Projects
None yet
Development

No branches or pull requests

1 participant