|
15 | 15 | #include "tesseract.h" |
16 | 16 |
|
17 | 17 | #include <vector> |
| 18 | +#include <cstdlib> |
18 | 19 |
|
19 | 20 | #include "gtest/gtest.h" |
20 | 21 | #include "simplex.h" |
@@ -79,10 +80,19 @@ bool simplex_test_compare(stim::DetectorErrorModel& dem, |
79 | 80 | } |
80 | 81 |
|
81 | 82 | TEST(tesseract, Tesseract_simplex_test) { |
82 | | - for (float p_err : {0.001, 0.003, 0.005}) { |
83 | | - for (size_t distance : {3, 5}) { |
84 | | - for (const size_t num_rounds : {2, 5, 10}) { |
85 | | - const size_t num_shots = 1000 / num_rounds / distance; |
| 83 | + bool long_tests = std::getenv("TESSERACT_LONG_TESTS") != nullptr; |
| 84 | + auto p_errs = long_tests ? std::vector<float>{0.001f, 0.003f, 0.005f} |
| 85 | + : std::vector<float>{0.003f}; |
| 86 | + auto distances = long_tests ? std::vector<size_t>{3, 5, 7} |
| 87 | + : std::vector<size_t>{3}; |
| 88 | + auto rounds = long_tests ? std::vector<size_t>{2, 5, 10} |
| 89 | + : std::vector<size_t>{2}; |
| 90 | + size_t base_shots = long_tests ? 1000 : 100; |
| 91 | + |
| 92 | + for (float p_err : p_errs) { |
| 93 | + for (size_t distance : distances) { |
| 94 | + for (const size_t num_rounds : rounds) { |
| 95 | + const size_t num_shots = base_shots / num_rounds / distance; |
86 | 96 | std::cout << "p_err = " << p_err << " distance = " << distance |
87 | 97 | << " num_rounds = " << num_rounds |
88 | 98 | << " num_shots = " << num_shots << std::endl; |
|
0 commit comments