Skip to content
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

Avoid broadcasting over a Q matrix #17

Merged
merged 2 commits into from
Sep 17, 2022
Merged

Avoid broadcasting over a Q matrix #17

merged 2 commits into from
Sep 17, 2022

Conversation

dkarrasch
Copy link
Contributor

This came up in a nanosoldier run related to JuliaLang/julia#46196. Broadcasting over a Q matrix is superslow because it falls back to elementwise getindex. My proposal computes the full (square) matrix representation, and subsequently overwrites temporary storage. Especially for large X, this should speed up the function quite significantly.

@dkarrasch
Copy link
Contributor Author

Gentle bump.

src/RandomQuantum.jl Outdated Show resolved Hide resolved
@matthewware
Copy link
Collaborator

@gribeill I'll go ahead and merge this feel free to revert or modify. @dkarrasch Thank you for the PR

@codecov
Copy link

codecov bot commented Sep 17, 2022

Codecov Report

Merging #17 (edf0478) into master (39f7496) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #17   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           60        60           
=========================================
  Hits            60        60           
Impacted Files Coverage Δ
src/RandomQuantum.jl 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@matthewware matthewware merged commit fe7cbe0 into BBN-Q:master Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants