-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add package benchmarks #97
base: main
Are you sure you want to change the base?
Conversation
Ping because this is a draft @Krastanov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you for spending time on it!
The only other thing that would be valuable to include is something that tests issues related to the fact that we are not using abstract data types (like Unityper, SumTypes, Expronicon, or Moshi). Because of the lack of this feature, manipulating large trees is actually somewhat expensive and it would be valuable to keep track of that expense.
So a holistic benchmark for that can look something like:
function make_large_tree_with_plenty_of_reallocations(layers)
expr_op = identity
expr_ket = X1
for _ in 1:layers
expr_op = rand([X,Y,Z,H,...])+rand([...])*expr_op
expr_ket = expr_op*expr_ket + rand([X1,X2,Z1,Z2,...])
end
return expr_op, expr_ket
end
SUITE["large_tree"]["construct"]["10_layers"] = make_large_tree_with_plenty_of_reallocations(10)
We are not including tensor products here or superoperators, but that is probably fine until we invest time in actually using abstract data types.
This is a draft for benchmarks as discussed here #64.
So far I covered
Please check if I missed any major features.
If there is any real usage notebook you'd like me to extract usages from I'd be happy to.
Also if you can hint me at specific directions of what a "hot loop" would look like, I could stress test that use case. I'm just not sure, for example, whether multiplication of hundreds of
kets
orops
is relevant or too contrived.