Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_pauli_permuted_idx now returns size_t #251

Merged
merged 4 commits into from
May 16, 2024

Conversation

JonathonMisiewicz
Copy link
Contributor

Description

The get_pauli_permuted_idx utility function now returns a size_t rather than an int as its first argument. The method's only use is as an argument to std::next, which logically should be expecting a size_t.

Comments, auto, and changing other things to size_t to match also included.

Checklist

  • Ready to go!

Copy link
Contributor

@imagoulas imagoulas left a comment

Choose a reason for hiding this comment

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

Everything looks good to me. Feel free to merge when you are ready.

@@ -874,7 +874,7 @@ std::complex<double> Computer::direct_pauli_circ_exp_val(const Circuit& qc) {
std::vector<int> y_idxs;
std::vector<int> z_idxs;

for (const Gate& gate : qc.gates()) {
for (const auto& gate : qc.gates()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, why was this changed to auto?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JonathonMisiewicz JonathonMisiewicz merged commit 49873a5 into evangelistalab:master May 16, 2024
1 check passed
@JonathonMisiewicz JonathonMisiewicz deleted the to_size_t branch May 16, 2024 20:27
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