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 in qelectron compatiblity with pennylane #1946

Open
kessler-frost opened this issue Apr 12, 2024 · 0 comments
Open

Bug in qelectron compatiblity with pennylane #1946

kessler-frost opened this issue Apr 12, 2024 · 0 comments

Comments

@kessler-frost
Copy link
Member

kessler-frost commented Apr 12, 2024

When installing covalent, it currently install the 0.32 version of Pennylane which has its qnode specs dictionary different than 0.31 -> on which qelectrons were developed. Our QNodeSpecs class will need to be updated to make it compatible with their latest version. This means if a user tries to run their circuit they will encounter the following error:

...
pydantic_core._pydantic_core.ValidationError: 5 validation errors for QNodeSpecs
gate_sizes
  Field required [type=missing, input_value={'resources': Resources(n...t', 'gradient_fn': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.7/v/missing
gate_types
  Field required [type=missing, input_value={'resources': Resources(n...t', 'gradient_fn': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.7/v/missing
num_operations
  Field required [type=missing, input_value={'resources': Resources(n...t', 'gradient_fn': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.7/v/missing
num_used_wires
  Field required [type=missing, input_value={'resources': Resources(n...t', 'gradient_fn': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.7/v/missing
depth
  Field required [type=missing, input_value={'resources': Resources(n...t', 'gradient_fn': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.7/v/missing

Workaround/Temporary Solution

Installing the 0.31 version seems to have worked, until we update the QNodeSpecs class

pip install pennylane==0.31.1
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

1 participant