Skip to content

Add Std.ResourceEstimation.IsResourceEstimating intrinsic#3132

Open
fedimser wants to merge 7 commits into
mainfrom
fedimser/is-re
Open

Add Std.ResourceEstimation.IsResourceEstimating intrinsic#3132
fedimser wants to merge 7 commits into
mainfrom
fedimser/is-re

Conversation

@fedimser

Copy link
Copy Markdown
Contributor

Adds a new stdlib intrinsic, Std.ResourceEstimation.IsResourceEstimating(), so Q# code can detect whether it is being executed by the resource estimator.

It returns true under the resource estimator backend. Returns false under simulator and other non-estimator execution paths, including partial evaluation.

Feature requested in #3109.

@github-actions

Copy link
Copy Markdown

Change in memory usage detected by benchmark.

Memory Report for b1fa06b

Test This Branch On Main Difference
compile core + standard lib 24575351 bytes 24572311 bytes 3040 bytes

@fedimser fedimser closed this Apr 21, 2026
@fedimser
fedimser deleted the fedimser/is-re branch July 15, 2026 16:28
@fedimser fedimser reopened this Jul 16, 2026
@fedimser
fedimser requested a review from amcasey as a code owner July 16, 2026 22:12
@fedimser
fedimser marked this pull request as draft July 16, 2026 22:12
@fedimser
fedimser marked this pull request as ready for review July 17, 2026 21:04
@github-actions

Copy link
Copy Markdown

Change in memory usage detected by benchmark.

Memory Report for 3389fcc

Test This Branch On Main Difference
compile core + standard lib 26680923 bytes 26677875 bytes 3048 bytes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant