Skip to content

Avoid broadcasting over a Q matrix#17

Merged
matthewware merged 2 commits intoBBN-Q:masterfrom
dkarrasch:patch-1
Sep 17, 2022
Merged

Avoid broadcasting over a Q matrix#17
matthewware merged 2 commits intoBBN-Q:masterfrom
dkarrasch:patch-1

Conversation

@dkarrasch
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Gentle bump.

Comment thread src/RandomQuantum.jl Outdated
@matthewware
Copy link
Copy Markdown
Collaborator

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

@codecov
Copy link
Copy Markdown

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