Skip to content

Commit

Permalink
Merge pull request #58 from danclaudino/qubit_pool_bugfix
Browse files Browse the repository at this point in the history
Removed printing from QubitPool
  • Loading branch information
danclaudino authored Dec 11, 2024
2 parents 8e4cba7 + a523c98 commit ac157ec
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ std::vector<std::vector<char>> generate_permutations(const std::vector<char>& pa
// {X, Y, X} for each qubit and make sure that we have the appropriate
// number of Y's and only add unique operators, i.e., those which
// survive symmetry operations in the PauliOperator class.

std::cout << "Pauli strings of the form Xa Yb and permutations:\n";
std::vector<std::string> ops;
for (const auto& [a, b] : generate_two_index_combinations(nQubits)) {
std::vector<char> base_pattern = {'X', 'Y'};
Expand All @@ -112,7 +110,6 @@ std::vector<std::vector<char>> generate_permutations(const std::vector<char>& pa
}

// Case 2: Xa Xb Xc Yd and permutations (XXXY and all permutations)
std::cout << "\nPauli strings of the form Xa Xb Xc Yd and permutations:\n";
for (const auto& [a, b, c, d] : generate_four_index_combinations(nQubits)) {
std::vector<char> base_pattern = {'X', 'X', 'X', 'Y'};
auto permutations = generate_permutations(base_pattern);
Expand All @@ -123,8 +120,7 @@ std::vector<std::vector<char>> generate_permutations(const std::vector<char>& pa
}
}

// Case 3: Xa Yb Yc Yd and permutations (XYXX and all permutations)
std::cout << "\nPauli strings of the form Xa Yb Yc Yd and permutations:\n";
// Case 3: Xa Yb Yc Yd and permutations (XYYY and all permutations)
for (const auto& [a, b, c, d] : generate_four_index_combinations(nQubits)) {
std::vector<char> base_pattern = {'X', 'Y', 'Y', 'Y'};
auto permutations = generate_permutations(base_pattern);
Expand All @@ -139,7 +135,6 @@ std::vector<std::vector<char>> generate_permutations(const std::vector<char>& pa
for (auto op : ops) {
pool.push_back(std::dynamic_pointer_cast<Observable>(std::make_shared<PauliOperator>("(0, 1)" + op)));
}
// exit(0);
return pool;
}

Expand Down

0 comments on commit ac157ec

Please sign in to comment.