microsoft / qsharp

Azure Quantum Development Kit, including the Q# programming language, resource estimator, and Quantum Katas
https://microsoft.github.io/qsharp/
MIT License
427 stars 86 forks source link

RCA check for use of dynamic rhs in exponent binop #1539

Closed swernli closed 4 months ago

swernli commented 4 months ago

This adds a special case to RCA for the rhs of exponentiation that adds a UseOfDynamicExponent feature flag if appropriate. This can then be used to tie dynamic exponentiation to backward branching (aka looping) which is needed to support such exponentiation.

github-actions[bot] commented 4 months ago

Benchmark for 3077da7

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 326.1±6.40µs | 325.1±2.59µs | -0.31% | | Array literal evaluation | 182.8±2.02µs | **171.4±1.12µs** | **-6.24%** | | Array update evaluation | 409.6±10.96µs | 408.6±2.58µs | -0.24% | | Core + Standard library compilation | **17.0±0.32ms** | 20.0±1.41ms | **+17.65%** | | Deutsch-Jozsa evaluation | 5.0±0.16ms | 5.0±0.04ms | 0.00% | | Large file parity evaluation | **34.0±0.09ms** | 34.1±0.35ms | **+0.29%** | | Large input file compilation | 11.9±0.32ms | **11.7±0.12ms** | **-1.68%** | | Large input file compilation (interpreter) | **45.6±1.64ms** | 49.3±1.70ms | **+8.11%** | | Large nested iteration | 32.4±1.06ms | 32.3±0.15ms | -0.31% | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1550.0±33.90µs | 1551.8±50.74µs | +0.12% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 8.1±0.13ms | **7.7±0.14ms** | **-4.94%** | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1414.0±30.92µs | 1409.7±35.18µs | -0.30% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | **27.1±0.22ms** | 27.5±0.64ms | **+1.48%** | | Teleport evaluation | 88.2±4.38µs | 89.1±5.96µs | +1.02% |