-
Notifications
You must be signed in to change notification settings - Fork 657
Make the pipeline compatible with shots decoupling #7358
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
base: shots-decoupling/qml.set_shots
Are you sure you want to change the base?
Make the pipeline compatible with shots decoupling #7358
Conversation
|
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Christina Lee <[email protected]>
Trigger the CI to see if our program separation breaks anything unexpectedly. |
I think we still need a new set to record who belong to user transforms who does not or it might be too much to adjust to make things work as expected @albi3ro |
Mind rephrasing? |
Basically only do ### Apply the user transforms ####
if transform_program:
tapes, _ = transform_program(tapes)
transform_program = TransformProgram() for those that we recognized as a suitable "user transform", e.g. |
Like in this commit although right now it is not actually working since |
Co-authored-by: Christina Lee <[email protected]>
Looks good! Only need to adjust trhee tests inside the same file seemingly! |
@albi3ro Are we safe to remove this entirely: def test_prune_dynamic_transform_warning_raised():
"""Tests that a warning raised when a user-applied dynamic-one-shot transform is ignored."""
user_transform_program = TransformProgram()
user_transform_program.add_transform(qml.transforms.dynamic_one_shot)
device = qml.device("default.qubit")
config = ExecutionConfig(mcm_config=MCMConfig(mcm_method="one-shot"))
with pytest.warns(UserWarning, match="A dynamic_one_shot transform already exists"):
_, __ = _setup_transform_program(device, config) |
Sorry about that. Might actually need to think about where to place that warning now. We should make sure a suitable warning is raised if someone puts |
ohoh. yeah indeed. I felt this test is special since it's not directly expected by our refactoring but seems some design from mcm/dynamic-one-shot side. |
Context:
We want to:
qml.set_shots
orpartial(set_shots, shots=...)
works (the latter is the original requirement); ideally we wish it works for all interfaces and all shots/shot vecDescription of the Change:
Benefits:
Further clearance and decoupling for pipeline!
Possible Drawbacks:
Related GitHub Issues:
[SC-90145]