-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type instabilities in compactified methods (due to type mismatch …
…in the uncompactified method) (#265) ``` function x_diag_circuit_noisy_measurement(csize) circuit = [] for i in 1:csize push!(circuit, PauliError(i, 0.1)) push!(circuit, sHadamard(i)) push!(circuit, sCNOT(i, csize+1)) push!(circuit, sMZ(csize+1,i)) push!(circuit, ClassicalXOR((1,(i%6+6)),i)) end return circuit end @benchmark pftrajectories(state,circuit) setup=(state=PauliFrame(1000, 1001, 1001); circuit=compactify_circuit(x_diag_circuit_noisy_measurement(1000))) evals=1 Before: BenchmarkTools.Trial: 10 samples with 1 evaluation. Range (min … max): 2.885 ms … 2.962 ms ┊ GC (min … max): 0.00% … 0.00% Time (median): 2.900 ms ┊ GC (median): 0.00% Time (mean ± σ): 2.912 ms ± 30.387 μs ┊ GC (mean ± σ): 0.00% ± 0.00% █▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ██▁█▁▁▁█▁▁▁▁▁▁█▁▁▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁▁▁▁▁▁▁▁█▁▁█ ▁ 2.89 ms Histogram: frequency by time 2.96 ms < Memory estimate: 187.50 KiB, allocs estimate: 4000. After: BenchmarkTools.Trial: 749 samples with 1 evaluation. Range (min … max): 2.929 ms … 3.097 ms ┊ GC (min … max): 0.00% … 0.00% Time (median): 2.948 ms ┊ GC (median): 0.00% Time (mean ± σ): 2.951 ms ± 16.854 μs ┊ GC (mean ± σ): 0.00% ± 0.00% ▃█▆▂ ▂▂▃▄▅▆█████▅▅▄▄▃▃▄▃▃▃▂▂▁▁▁▂▁▂▂▁▁▁▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▂▁▂▂ ▃ 2.93 ms Histogram: frequency by time 3.06 ms < Memory estimate: 0 bytes, allocs estimate: 0. ```
- Loading branch information
Showing
3 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters