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

Disable needless operation lint for Katas #1627

Closed minestarks closed 2 weeks ago

minestarks commented 2 weeks ago

The katas contain a lot of placeholder code like this:

    operation ZZMeasurement(qs : Qubit[]) : Int {
        // Implement your solution here...

        return -1;
    }

And the "operation can be a function instead" lint, while generally helpful, can distract a learner.

In this PR:

github-actions[bot] commented 2 weeks ago

Benchmark for bb434ed

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 334.7±2.34µs | **330.9±2.33µs** | **-1.14%** | | Array literal evaluation | 172.3±3.07µs | 173.2±3.68µs | +0.52% | | Array update evaluation | 414.0±10.88µs | 414.7±20.77µs | +0.17% | | Core + Standard library compilation | 18.6±0.44ms | **18.4±0.12ms** | **-1.08%** | | Deutsch-Jozsa evaluation | 5.1±0.20ms | 5.1±0.15ms | 0.00% | | Large file parity evaluation | **33.9±0.09ms** | 34.1±0.53ms | **+0.59%** | | Large input file compilation | 12.4±0.27ms | **12.2±0.07ms** | **-1.61%** | | Large input file compilation (interpreter) | 47.5±3.10ms | 46.3±1.35ms | -2.53% | | Large nested iteration | 33.0±0.26ms | 32.8±0.26ms | -0.61% | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1563.5±28.48µs | 1568.3±34.54µs | +0.31% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.8±0.15ms | 7.9±0.13ms | +1.28% | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1427.4±26.60µs | 1435.2±65.46µs | +0.55% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 28.2±0.45ms | 28.3±0.57ms | +0.35% | | Teleport evaluation | 88.9±3.97µs | 88.6±3.44µs | -0.34% |
github-actions[bot] commented 2 weeks ago

Benchmark for b7d7ec1

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 335.9±21.26µs | **326.6±1.48µs** | **-2.77%** | | Array literal evaluation | **189.2±0.60µs** | 190.8±12.26µs | **+0.85%** | | Array update evaluation | 412.8±16.54µs | **409.3±2.48µs** | **-0.85%** | | Core + Standard library compilation | **18.5±0.19ms** | 19.2±0.58ms | **+3.78%** | | Deutsch-Jozsa evaluation | 5.1±0.07ms | 5.1±0.32ms | 0.00% | | Large file parity evaluation | **33.9±0.09ms** | 34.0±0.25ms | **+0.29%** | | Large input file compilation | 12.4±0.27ms | 12.3±0.13ms | -0.81% | | Large input file compilation (interpreter) | 47.3±1.76ms | 48.3±1.56ms | +2.11% | | Large nested iteration | 32.9±1.70ms | **32.5±0.22ms** | **-1.22%** | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1558.1±31.98µs | 1575.0±35.16µs | +1.08% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.7±0.11ms | 7.7±0.09ms | 0.00% | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1419.1±26.00µs | 1439.9±86.87µs | +1.47% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 28.2±0.22ms | 28.3±0.22ms | +0.35% | | Teleport evaluation | 88.7±3.92µs | 89.7±3.83µs | +1.13% |
github-actions[bot] commented 2 weeks ago

Benchmark for bbf4db2

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 329.2±2.56µs | 330.0±1.30µs | +0.24% | | Array literal evaluation | 188.6±5.95µs | **174.7±1.26µs** | **-7.37%** | | Array update evaluation | 407.5±2.11µs | **405.4±1.75µs** | **-0.52%** | | Core + Standard library compilation | 20.4±0.38ms | 20.5±0.69ms | +0.49% | | Deutsch-Jozsa evaluation | 5.1±0.06ms | 5.1±0.09ms | 0.00% | | Large file parity evaluation | **33.9±0.09ms** | 34.0±0.81ms | **+0.29%** | | Large input file compilation | 12.5±0.14ms | 12.5±0.14ms | 0.00% | | Large input file compilation (interpreter) | 48.7±1.27ms | 49.1±1.21ms | +0.82% | | Large nested iteration | 32.4±0.34ms | 32.3±0.66ms | -0.31% | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1559.5±52.01µs | 1570.7±84.47µs | +0.72% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.9±0.11ms | **7.8±0.10ms** | **-1.27%** | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1411.7±31.95µs | 1410.5±31.48µs | -0.09% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 28.1±0.57ms | **27.9±0.17ms** | **-0.71%** | | Teleport evaluation | 89.5±8.86µs | 88.0±5.51µs | -1.68% |