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.

Add MeasureEachZ operation to runtime implementation #1005

Description

To provide support on hardware for the common operation of "measure a list of qubits and produce a list of Results" that can be supported without need for full array runtime support, we need to define a new version of Microsoft.Quantum.Measurement.MultiM that is compatible with compilation for hardware targets. By introducing a new operation, Microsoft.Quantum.Measurement.MeasureEachZ, we can achieve two goals: have a runtime-defined measurement utility that QIR generation can replace with specific patterns supported on hardware, and define an operation with updating naming that follows the style guide that can eventually be used as a replacement when deprecating the libraries-defined MultiM operation. The signature of MeasureEachZ should be the same as MultiM, namely:

operation MeasureEachZ(targets : Qubit[]) : Result[] { ... }

For the hardware compatibility, this function should be loop based and build up the Result array using copy update, instead of using ForEach, so that it can be compiled into hardware-supported QIR patterns.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions