unitaryfund / qrack

Comprehensive, GPU accelerated framework for developing universal virtual quantum processors
https://qrack.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
176 stars 38 forks source link

Correct and restore AI/IAI #791

Closed WrathfulSpatula closed 3 years ago

WrathfulSpatula commented 3 years ago

These azimuth/inclination gates are useful to me, and I'd like to continue to experiment with them. Given probability from Z/X/Y basis measurements, azimuth should equal acos(2 * probZ)and inclination should equal atan(2 * probY, 2 * probX). Per more common conventions for spherical to Cartesian coordinate conversion, as per the Wikipedia articles, this should be an intuitive way to think of (de-)constructing states from Pauli Z/X/Y basis probability expectation.

WrathfulSpatula commented 3 years ago

I'll add a unit test before merging, to show and test the intended application.

WrathfulSpatula commented 3 years ago

It's possible that I'm missing the application of Heisenberg's uncertainty principle to this case, or I've just screwed up the implementation. For now, this doesn't work, and I need to rethink it.