Skip to content

Bug in qelectron compatiblity with pennylane #1946

@kessler-frost

Description

@kessler-frost

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions