catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Add runtime C-API for arbitrary-basis measurement operations

Open joeycarter opened this issue 6 months ago • 1 comments

Context: A pass to convert the mbqc.measure_in_basis MLIR operation (in the mbqc dialect) into the LLVM dialect was added in #1679. In order to execute a compiled program containing this operation, we require a runtime function defined in the Catalyst runtime C-API.

Description of the Change: Adds a new runtime stub to the Catalyst runtime C-API called __catalyst__mbqc__measure_in_basis(). This runtime function is effectively the same as the current __catalyst__qis__Measure() runtime function for computational-basis mid-circuit measurements since we will be validating the QJIT-compiled MBQC workloads on the null.qubit device and do not require that it fully simulates arbitrary-basis measurements—rather we treat it as a placeholder for now in order to make the workload executable (see Shortcut story linked below for details).

[sc-89637]

joeycarter avatar Apr 22 '25 21:04 joeycarter