Skip to content

Conversation

@lillian542
Copy link
Contributor

@lillian542 lillian542 commented Aug 7, 2025

Context:

We have no_sampling as a transform to ensure compatibility with certain execution pathways that only work with analytic execution, but we don't have a no_analytic transform, which is relevant for hardware devices.

To provide this functionality to date, we've been validating that device.shots != None in device __init__s, instead of validating the tape shots in the transform program. This is no longer the direction we want to go, as we are deprecating device.shots, and also isn't the ideal place for validation because calls to the QNode can override device.shots.

Description of the Change:

We add a no_analytic transform

Benefits:
It's better practice, and it supports the deprecation of device.shots in plugins.

[sc-97221]

@lillian542 lillian542 marked this pull request as ready for review August 7, 2025 14:15
@andrijapau andrijapau self-requested a review August 7, 2025 14:20
@lillian542 lillian542 requested a review from JerryChen97 August 7, 2025 14:20
Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov

This comment was marked as resolved.

@lillian542 lillian542 enabled auto-merge August 7, 2025 14:43
@lillian542 lillian542 added this pull request to the merge queue Aug 7, 2025
Merged via the queue into master with commit 00ff0d8 Aug 7, 2025
55 checks passed
@lillian542 lillian542 deleted the no_analytic branch August 7, 2025 19:09
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

Successfully merging this pull request may close these issues.

4 participants