GTorlai / PastaQ.jl

Package for Simulation, Tomography and Analysis of Quantum Computers
Apache License 2.0
145 stars 23 forks source link

Make some gate definitions more efficient #23

Closed mtfishman closed 4 years ago

mtfishman commented 4 years ago

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).