-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
C-feature-requestCategory: A feature requestCategory: A feature requestS-breaking-changeStatus: Need a breaking change release to progressStatus: Need a breaking change release to progressS-needs-triageStatus: Needs to be labelledStatus: Needs to be labelled
Milestone
Description
Problem Statement
At runtime, measurements (and any quantum gates preceding them) are only actually performed when the result is needed. The real result of a measurement operation is a future bool, which can later be read to instantiate the value. We want these semantics to be reflected in guppy.
Proposed Solution
We should therefore make the return type of measure() a new type (e.g. MeasureResult, or just Measurement?) with a read() method. We can implement __bool__() on this type as syntactic sugar for read() (so that code like if measure(q) will continue to work as before).
We may want to introduce more general Future[T] types when implementing this. (EDIT: This already exists.)
Component
Guppy Compiler
Effort Estimate
Hard - Significant effort required
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature requestCategory: A feature requestS-breaking-changeStatus: Need a breaking change release to progressStatus: Need a breaking change release to progressS-needs-triageStatus: Needs to be labelledStatus: Needs to be labelled