Skip to content

Commit

Permalink
Avoid broadcasting over a Q matrix (#17)
Browse files Browse the repository at this point in the history
* Avoid broadcasting over a `Q` matrix
  • Loading branch information
dkarrasch authored Sep 17, 2022
1 parent 39f7496 commit fe7cbe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/RandomQuantum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ end

function rand(dist::ClosedHaarEnsemble)
X = rand(GinibreEnsemble(dist.dim))
Q,_ = qr(X)
Q = qr(X).Q * eye(dist.dim) # yields dense square matrix
d = diag(Q)
d = d ./ abs.(d)
Q = Q ./ d
d ./= abs.(d)
Q ./= d
return Q
end

Expand Down

3 comments on commit fe7cbe0

@dkarrasch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please release this change so that nanosoldier can pick it up?

@matthewware
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I can cut another release. Planning to call it 0.2.1

@matthewware
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and merged into the registry

Please sign in to comment.