• Nguyen, Thien Minh's avatar
    Fix some compatibility issues · 2735dea5
    Nguyen, Thien Minh authored
    Testing QPT with QuaC, I was puzzled by the fact that `getPointerLike<Accelerator>` and `getPointerLike<CompositeInstruction>` were failing although I *did* send on those two parameters and the heterogenous map *does* contain those params, just that the templated functions are mismatched (possibly between the QuaC side and XACC side)
    My theory was that because these are all implicit instantiations, somehow, they can become mismatched (the order in which the compiler sees those instantiations), especially with external linkage (like QuaC).
    Anyway, by explicitly instantiating those (Accelerator and Composite), the issue is fixed.
    Also, fix a bug in QPT where the imaginary chi vector is always uninitialized (all zeros)
    Lastly, add an option to QPT to disable circuit optimization. When the circuit contains pulse instructions, the circuit optimizer doesn’t work correctly (looks like it may skip the pulse instruction and merge gates)
    Tested by: running XACC tests and QuaC QPT tests.
    Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>