ORNL-QCI / tnqvm

Tensor Network QPU Simulator for Eclipse XACC
43 stars 10 forks source link

Is there a bug in visitors/exatn/GateFactory.hpp CZBody? #101

Closed simon-ty closed 3 years ago

simon-ty commented 3 years ago

https://github.com/ORNL-QCI/tnqvm/blob/dc43d69a94ab9e7a3d0af10b733fbf1a69dd09e3/tnqvm/visitors/exatn/GateFactory.hpp#L115

Looking at the definition for CZBody...it looks like a duplicate of CNBody at L108.

1tnguyen commented 3 years ago

Hi @simon-ty

GateFactory.hpp/.cpp are legacy and unused. Gate matrices are defined in the file: https://github.com/ORNL-QCI/tnqvm/blob/master/tnqvm/base/Gates.hpp

Upon auditing the file, I figured out that some gates were not defined (should be asserting in debug build) and have added them accordingly. Please let me know if you have any questions.

simon-ty commented 3 years ago

Ok thanks for this! I will test out the fixes shortly.