microsoft / qsharp

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

Partial evaluation support for array slicing #1546

Closed cesarzc closed 1 month ago

cesarzc commented 1 month ago

This change adds support to partial evaluation for array slicing in index expressions, copy expressions and copy & update expressions.

github-actions[bot] commented 1 month ago

Benchmark for e6cfbba

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 339.4±7.14µs | **328.1±2.42µs** | **-3.33%** | | Array literal evaluation | 189.3±0.86µs | **184.2±1.23µs** | **-2.69%** | | Array update evaluation | 413.7±7.51µs | **407.0±2.03µs** | **-1.62%** | | Core + Standard library compilation | 18.8±0.21ms | 18.9±0.58ms | +0.53% | | Deutsch-Jozsa evaluation | **5.0±0.05ms** | 5.1±0.06ms | **+2.00%** | | Large file parity evaluation | **33.9±0.07ms** | 34.1±0.24ms | **+0.59%** | | Large input file compilation | **12.5±0.14ms** | 12.8±0.31ms | **+2.40%** | | Large input file compilation (interpreter) | 47.0±1.15ms | 47.1±1.23ms | +0.21% | | Large nested iteration | 32.6±0.15ms | 32.5±0.43ms | -0.31% | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1564.4±70.48µs | 1556.4±42.57µs | -0.51% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.8±0.10ms | **7.7±0.06ms** | **-1.28%** | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1416.0±29.91µs | 1416.8±30.80µs | +0.06% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 27.5±0.34ms | 27.5±0.27ms | 0.00% | | Teleport evaluation | 88.0±4.79µs | 90.3±4.36µs | +2.61% |
github-actions[bot] commented 1 month ago

Benchmark for 76e1d5f

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 333.9±1.57µs | **329.2±6.83µs** | **-1.41%** | | Array literal evaluation | 189.8±2.89µs | **185.1±5.53µs** | **-2.48%** | | Array update evaluation | 410.9±1.71µs | **406.8±1.46µs** | **-1.00%** | | Core + Standard library compilation | **18.7±0.46ms** | 19.0±0.29ms | **+1.60%** | | Deutsch-Jozsa evaluation | **5.0±0.05ms** | 5.2±0.05ms | **+4.00%** | | Large file parity evaluation | **34.0±0.08ms** | 34.4±0.52ms | **+1.18%** | | Large input file compilation | 12.6±0.48ms | 12.5±0.36ms | -0.79% | | Large input file compilation (interpreter) | 49.2±1.71ms | 50.0±1.88ms | +1.63% | | Large nested iteration | 32.8±0.50ms | 32.6±0.66ms | -0.61% | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1562.5±42.29µs | 1585.5±91.82µs | +1.47% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.8±0.13ms | 7.9±0.11ms | +1.28% | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1425.4±39.56µs | 1443.4±98.87µs | +1.26% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | **27.6±0.20ms** | 27.9±1.32ms | **+1.09%** | | Teleport evaluation | **87.6±3.58µs** | 92.8±3.95µs | **+5.94%** |