Closed 1tnguyen closed 2 years ago
In __gray_code_mcu_gen, we query getBufferNames()[0] directly without checking if the buffer name array is not empty (https://github.com/eclipse/xacc/blob/master/quantum/plugins/algorithms/qpe/ControlledGateApplicator.cpp#L176).
__gray_code_mcu_gen
getBufferNames()[0]
This could be unsafe and we need to fallback to generic buffer name, e.g. "q", if the instruction does not have any buffer names.
In
__gray_code_mcu_gen
, we querygetBufferNames()[0]
directly without checking if the buffer name array is not empty (https://github.com/eclipse/xacc/blob/master/quantum/plugins/algorithms/qpe/ControlledGateApplicator.cpp#L176).This could be unsafe and we need to fallback to generic buffer name, e.g. "q", if the instruction does not have any buffer names.