-
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.
support compactifications of more sophisticated types (#264)
Now compactification works for more types. In particular see these examples of things that previously could not be compactified: using Revise using QuantumClifford using BenchmarkTools 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+2),i)) end return circuit end @benchmark pftrajectories(state,circuit) setup=(state=PauliFrame(1000, 1001, 1001); circuit=x_diag_circuit_noisy_measurement(1000)) evals=1 BenchmarkTools.Trial: 1126 samples with 1 evaluation. Range (min … max): 3.532 ms … 4.088 ms ┊ GC (min … max): 0.00% … 0.00% Time (median): 3.573 ms ┊ GC (median): 0.00% Time (mean ± σ): 3.577 ms ± 27.682 μs ┊ GC (mean ± σ): 0.00% ± 0.00% ▁▆▄▅▇▄▇█▆▆▃▆▄▅▅▄▂▁▂▁ ▃▂▁▃▃▁▂▄▄▄▄▇█████████████████████▇▇▆▆▆▆▄▆▃▃▅▅▄▄▃▂▃▃▂▃▂▂▃▂▃ ▅ 3.53 ms Histogram: frequency by time 3.63 ms < Memory estimate: 281.25 KiB, allocs estimate: 6000. @benchmark pftrajectories(state,circuit) setup=(state=PauliFrame(1000, 1001, 1001); circuit=compactify_circuit(x_diag_circuit_noisy_measurement(1000))) evals=1 Before: BenchmarkTools.Trial: 53 samples with 1 evaluation. Range (min … max): 3.495 ms … 5.890 ms ┊ GC (min … max): 0.00% … 38.90% Time (median): 3.623 ms ┊ GC (median): 0.00% Time (mean ± σ): 3.711 ms ± 370.663 μs ┊ GC (mean ± σ): 1.16% ± 5.34% █▃▂ ▂▂ ▄▄████▇▇██▄▇▇▁▁▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▁▁▁▄ ▁ 3.5 ms Histogram: frequency by time 4.71 ms < Memory estimate: 421.97 KiB, allocs estimate: 9002. After: BenchmarkTools.Trial: 1116 samples with 1 evaluation. Range (min … max): 3.221 ms … 4.887 ms ┊ GC (min … max): 0.00% … 28.58% Time (median): 3.388 ms ┊ GC (median): 0.00% Time (mean ± σ): 3.357 ms ± 150.766 μs ┊ GC (mean ± σ): 0.36% ± 2.70% ▄█▆▂ ▂▂▃▆▆▇▇▅▇▆▆▅▄▄▄▄▃▃▃▃▂▂▃▃▂▂▁▂▂▂▁▁▁▃▃▅█████▇▆▃▄▂▂▂▂▁▁▂▃▃▃▃▁▁▂ ▃ 3.22 ms Histogram: frequency by time 3.49 ms < Memory estimate: 187.50 KiB, allocs estimate: 4000.
- Loading branch information
Showing
7 changed files
with
142 additions
and
55 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
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
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