This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Implement GetRuntimeMetadata for ApplyIfElse variants #325
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theRoughCode
commented
Aug 6, 2020
6 tasks
anpaz
reviewed
Aug 10, 2020
/// <summary> | ||
/// True if operation is a classically-controlled conditional operation. | ||
/// </summary> | ||
public bool IsConditional { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I like this name/description for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the name not descriptive enough or is it the description that is not clear?
This flag is true
when the operation is an If-Else statement, like ApplyIfElseR
and will contain 2 Children
(one for each measurement value).
@anpaz-msft Is this piece still needed? I thought we had merged everything related to visualization. |
Closing this PR since I believe this is no longer needed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a first step at implementing classical operations as part of the goal of visualizing Q# programs (more details here).
In this PR, we:
IsConditional
flag that is true if the operation is a conditional operation.ResultMeasured
class derived from theResult
class that contains the measured qubit.GetRuntimeMetadata
methods forApplyIfElseR
,ApplyIfElseRC
,ApplyIfElseRA
, andApplyIfElseRCA
.Once end-to-end testing of this flow (classically-controlled operations) works, we can duplicate this functionality for other operations such as
ApplyIfOne
andApplyIfZero
.NOTE: This should be merged in after #324 as this is branched off of that PR.