qir-alliance / qcor

C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC
http://docs.aide-qc.org
MIT License
97 stars 39 forks source link

Fixed a bug in ScopedSymbolTable::invalidate_qubit_extracts #231

Closed 1tnguyen closed 3 years ago

1tnguyen commented 3 years ago

Must check the optional return before trying to deref.

This shows up in one of the demos whereby the QASM3 source only contains a kernel definition and the size of qreg argument is unknown.

Tested by: running all tests