Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Compile-time errors for Q# programs not supported by QPRGen1 runtime capabilities #487

@bamarsha

Description

@bamarsha

Quantum execution targets with QPRGen1 runtime capabilities can only inspect measurement results (via equality comparison) within the conditional expression of an if-statement. The body of any if-statement that depends on a measurement result (or any subsequent bodies in an if...elif...else chain) cannot contain return statements or set statements for any variable declared outside the body.

The compiler should verify this and give errors if the program is not compatible with a QPRGen1 target.

Metadata

Metadata

Assignees

Labels

enhancementNew request or suggestion for an improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions