You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.
functioninstruct2!(state, U, loc)
a, c, b, d = U
step =1<< (loc -1)
step_2 =1<< loc
for j in0:step_2:size(state, 1)-step
@inboundsfor i in j+1:j+step
YaoArrayRegister.u1rows!(state, i, i+step, a, b, c, d)
endendreturn state
end
The performance of instruct is quite different on my machine with Julia 1.1 with SMatrix and Matrix, unexpectedly, SMatrix is even slower. This is causing current QCBM circuit slower than before.
The text was updated successfully, but these errors were encountered:
It will be more obvious when you pack a few instruct together, e.g using chained put blocks.
using StaticArrays, BenchmarkTools
U =@SMatrixrand(ComplexF64, 2, 2)
st =rand(ComplexF64, 1<<20)
julia>@benchmarkforeach(k->instruct2!($st, $U, 2), 1:100)
BenchmarkTools.Trial:
memory estimate:0 bytes
allocs estimate:0--------------
minimum time:180.581 ms (0.00% GC)
median time:186.595 ms (0.00% GC)
mean time:186.496 ms (0.00% GC)
maximum time:193.396 ms (0.00% GC)
--------------
samples:27
evals/sample:1
julia>@benchmarkforeach(k->instruct2!($st, $(Matrix(U)), 2), 1:100)
BenchmarkTools.Trial:
memory estimate:0 bytes
allocs estimate:0--------------
minimum time:169.435 ms (0.00% GC)
median time:187.297 ms (0.00% GC)
mean time:188.134 ms (0.00% GC)
maximum time:208.341 ms (0.00% GC)
--------------
samples:27
evals/sample:1
MWE:
The performance of instruct is quite different on my machine with Julia 1.1 with
SMatrix
andMatrix
, unexpectedly,SMatrix
is even slower. This is causing current QCBM circuit slower than before.The text was updated successfully, but these errors were encountered: