Avoid diagonalizing generators every time a parameter shift jacobian is calculated
See original GitHub issueThis is just a suggestion, feel free to ignore:
These lines of code are executed many times when constructing the recipe during parameter shift jacobian computation:
The construction of the generator and its diagonalization are relatively expensive operations given the frequency with which these lines are executed, especially when the generator is larger than just a 2x2 matrix. Double construction of the generator can be avoided trivially by re-using gen in place of self.generator() in line 1217 the eigenvalues can probably be either cached in the Operator class or instance or Operations can at least be given the option to specify their generator eigenvalues directly to avoid matrix diagonalization.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Avoiding and Suppressing Oscillations - IAN DOBSON
Figure 2 shows how some eigenvalues change with the parameters. At the final value, an eigenvalue λ = 0.1324 + 3.0767j is located...
Read more >Path Integrals on sl(2,R) Orbits - arXiv
A new challenge and our main interest lies in understanding the path integral quantization when the orbit is sliced according to the action...
Read more >NUMERICAL METHODS FOR LARGE EIGENVALUE ...
Proposition 1.3 A matrix is diagonalizable if and only if all its eigenvalues are semi-simple. Since every simple eigenvalue is semi-simple, an immediate ......
Read more >5 the jacobian in path integrals and quantum anomalies
This chapter gives a general path integral formulation of the quantum anomaly for chiral symmetry. The quantum anomaly is identified as the Jacobian...
Read more >Is strong modal resonance a precursor to power system ...
For example, parameter changes such as bulk power transactions or generator redis- patch change the power system equilibrium, and hence change.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Nice! Thanks for the explanation! In my case this lead to nearly double the execution time with
mastercompared tov0.21.0, which is why I noticed.It would be great if this could all be documented in the new guide on how to write custom Operations.
Yes, this seems to be resolved. Thanks for the good work!