microsoft / qsharp

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

Fix incomplete string escape in circuit.ts #1500

Closed minestarks closed 1 month ago

minestarks commented 1 month ago

This issue was found by CodeQL (thanks to @idavis for setting this up and raising the alert). replace with a string argument only replaces the first occurrence of \n.

github-actions[bot] commented 1 month ago

Benchmark for 8e061a2

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Array append evaluation | 358.5±5.55µs | 356.7±3.41µs | -0.50% | | Array literal evaluation | **198.9±2.11µs** | 201.7±8.02µs | **+1.41%** | | Array update evaluation | 440.7±3.09µs | 439.4±2.84µs | -0.29% | | Core + Standard library compilation | 18.5±1.25ms | **17.6±0.65ms** | **-4.86%** | | Deutsch-Jozsa evaluation | 5.2±0.05ms | 5.2±0.12ms | 0.00% | | Large file parity evaluation | 34.2±0.12ms | **34.0±0.09ms** | **-0.58%** | | Large input file compilation | 12.2±0.57ms | 12.2±0.48ms | 0.00% | | Large input file compilation (interpreter) | 50.3±2.29ms | 49.3±1.97ms | -1.99% | | Large nested iteration | 35.2±0.39ms | 35.2±0.26ms | 0.00% | | Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample | 1556.0±52.53µs | 1560.6±59.56µs | +0.30% | | Perform Runtime Capabilities Analysis (RCA) on large file sample | 7.8±0.09ms | 7.8±0.13ms | 0.00% | | Perform Runtime Capabilities Analysis (RCA) on teleport sample | 1428.3±64.01µs | 1420.5±49.98µs | -0.55% | | Perform Runtime Capabilities Analysis (RCA) on the core and std libraries | 27.9±0.47ms | **27.3±0.23ms** | **-2.15%** | | Teleport evaluation | 90.6±3.75µs | 90.7±3.72µs | +0.11% |