Skip to content

Conversation

@noajshu
Copy link
Contributor

@noajshu noajshu commented Aug 29, 2025

  • added better test for index-based ordering
  • refactored the det order function so it uses smaller helpers and a switch statement

@noajshu noajshu requested review from LalehB and oscarhiggott August 29, 2025 23:15
@noajshu
Copy link
Contributor Author

noajshu commented Aug 29, 2025

Also updated beam climbing behavior to do the max of (beam+1, num_det_orders) # trials

Copy link
Collaborator

@LalehB LalehB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks Noah, this is pretty cool!

size_t cur = q.front();
q.pop();
auto neigh = graph[cur];
std::shuffle(neigh.begin(), neigh.end(), rng);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why we are shuffling here? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is to generate diversity in the ensemble!

return build_det_orders_index(dem, num_det_orders, rng);
}
throw std::invalid_argument("Unknown det order method");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should have one of them as default 🤔

@noajshu noajshu merged commit 68eb83d into quantumlib:main Aug 30, 2025
4 checks passed
@NoureldinYosri NoureldinYosri mentioned this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants