Skip to content

Test suite maintenance regarding qjit device capabilities #2114

@paul0403

Description

@paul0403

One of the purposes of the QJITDevice class is to compute the preprocessing transform program depending on the device capabilities, i.e. what qnode-level transforms (aka qml.transfroms.blah) need to happen before reaching the mlir layer. For example, for devices without analytical mode execution, the measurement_from_samples/counts qnode transform is added here.

The code around here has recently been refactored #2089 (to account for whether the user has provided shots in the program, as well as just general clean up). One remaining function, get_device_capabilities , is not actually used in the codebase anymore. However, it was not deleted, because various tests are still using this internal function directly.

See #2089 (comment) for details.

The tests should properly construct custom capability sets for their respective purposes, instead of piggy-backing off lightning.
As an alternative, the get_device_capabilities function can be demoted to a test util, and decoupled from the actual code base.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions