Add Reset optimization pass and handling qubit SSA variables in array aliasing
Created by: tnguyen-ornl
-
Adding a simple back-to-back qubit reset simplification pass (to become only 1 reset).
-
This pass broke the alias test and uncovered a genuine bug (https://github.com/ORNL-QCI/qcor/issues/186)
-
Fixed https://github.com/ORNL-QCI/qcor/issues/186: alias qubits to track their root qubits (enhance the
SymbolTable
to be a custom struct while keeping all the map-like behaviors); alias (slicing/concat) handlers to track the alias references in thisSymbolTable
. -
Prevent name clashes b/w qubit-in-array symbol names (internal) and user-defined variables: use
%
character for internal symbols.