This makes some gate definitions more efficient, since they were showing up in profiles. For any applications beyond very small bond dimensions, these would be microptimizations.
The strategy is to minimize conversions that need to be done (by defining elements all of the same type) and defining constants like inv_sqrt2 = 0.7071067811865475 instead of computing 1/sqrt(2).
This makes some gate definitions more efficient, since they were showing up in profiles. For any applications beyond very small bond dimensions, these would be microptimizations.
The strategy is to minimize conversions that need to be done (by defining elements all of the same type) and defining constants like
inv_sqrt2 = 0.7071067811865475
instead of computing1/sqrt(2)
.