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

[Bug] Error in pulser_compiler.py Example Code: Missing Reference to emulator #30

Open
sungwoo-pasqal opened this issue Jan 3, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sungwoo-pasqal
Copy link
Collaborator

Description:

When running the pulser_compiler.py example code from the qadence2-core repository, the following error occurs:

image

It seems that there is no corresponding definition or import for emulator within the code or its imports.

To resolve this, I added the following import to the script:

from qadence2_platforms.abstracts import OnEnum

Then, I updated the relevant line in the code to:

compiled_model.sample(values=f_params, shots=10_000, on=OnEnum.EMULATOR)

This modification allows the script to execute successfully.


Questions:

  1. Is this the intended behavior, or should emulator have been predefined or imported in the original example code?
  2. Could you confirm whether OnEnum.EMULATOR is the correct direction for resolving this issue? I would like to better understand the expected use of OnEnum in this context.

Environment:

  • Repository: qadence2-core
  • Example File: pulser_compiler.py
  • Environment: Hatch shell environment (initiated on conda setup)
@sungwoo-pasqal sungwoo-pasqal self-assigned this Jan 7, 2025
@sungwoo-pasqal sungwoo-pasqal added the bug Something isn't working label Jan 7, 2025
@pimvenderbosch
Copy link
Member

This is planned to be fixed in #19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants