|
14 | 14 |
|
15 | 15 | namespace cudaq::qec { |
16 | 16 |
|
17 | | -// ============================================================================ |
18 | | -// Private helper method implementations |
19 | | -// ============================================================================ |
20 | | - |
21 | | -/// Helper function to validate constructor inputs. |
22 | 17 | void sliding_window::validate_inputs() { |
23 | 18 | if (window_size < 1 || window_size > num_rounds) { |
24 | 19 | throw std::invalid_argument( |
@@ -180,11 +175,6 @@ void sliding_window::update_rw_next_read_index() { |
180 | 175 | rw_next_read_index -= num_syndromes_per_window; |
181 | 176 | } |
182 | 177 |
|
183 | | -// ============================================================================ |
184 | | -// Public method implementations |
185 | | -// ============================================================================ |
186 | | - |
187 | | -/// Constructor for the sliding window decoder. |
188 | 178 | sliding_window::sliding_window(const cudaqx::tensor<uint8_t> &H, |
189 | 179 | const cudaqx::heterogeneous_map ¶ms) |
190 | 180 | : decoder(H), full_pcm(H) { |
@@ -237,7 +227,6 @@ sliding_window::sliding_window(const cudaqx::tensor<uint8_t> &H, |
237 | 227 | } |
238 | 228 | } |
239 | 229 |
|
240 | | -/// Decode a syndrome vector (either full block or single round). |
241 | 230 | decoder_result sliding_window::decode(const std::vector<float_t> &syndrome) { |
242 | 231 | if (syndrome.size() == this->syndrome_size) { |
243 | 232 | auto t0 = std::chrono::high_resolution_clock::now(); |
@@ -301,7 +290,6 @@ decoder_result sliding_window::decode(const std::vector<float_t> &syndrome) { |
301 | 290 | return decoder_result(); // empty return value |
302 | 291 | } |
303 | 292 |
|
304 | | -/// Decode a batch of syndrome vectors. |
305 | 293 | std::vector<decoder_result> sliding_window::decode_batch( |
306 | 294 | const std::vector<std::vector<float_t>> &syndromes) { |
307 | 295 | if (syndromes[0].size() == this->syndrome_size) { |
@@ -483,12 +471,12 @@ void sliding_window::decode_window() { |
483 | 471 | window_proc_times_arr[7]); |
484 | 472 | } |
485 | 473 |
|
| 474 | +sliding_window::~sliding_window() {} |
| 475 | + |
486 | 476 | std::size_t sliding_window::get_num_syndromes_per_round() const { |
487 | 477 | return num_syndromes_per_round; |
488 | 478 | } |
489 | 479 |
|
490 | | -sliding_window::~sliding_window() {} |
491 | | - |
492 | 480 | CUDAQ_REGISTER_TYPE(sliding_window) |
493 | 481 |
|
494 | 482 | } // namespace cudaq::qec |
0 commit comments