Unverified Commit 32ab456c authored by Thien Nguyen's avatar Thien Nguyen Committed by GitHub
Browse files

Merge pull request #231 from tnguyen-ornl/tnguyen/fix-scope-qubit-extract-bug

Fixed a bug in ScopedSymbolTable::invalidate_qubit_extracts
parents add1f3c3 a5f62c4e
Pipeline #168382 passed with stage
in 109 minutes and 55 seconds
......@@ -224,6 +224,9 @@ std::optional<size_t> ScopedSymbolTable::get_qreg_size(const std::string &qreg_n
void ScopedSymbolTable::invalidate_qubit_extracts(
const std::string &qreg_name, const std::vector<int> &indices) {
if (!get_qreg_size(qreg_name).has_value()) {
return;
}
if (indices.empty()) {
const auto reg_size = get_qreg_size(qreg_name).value();
for (size_t i = 0; i < reg_size; ++i) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment