@@ -587,9 +587,9 @@ TEST(QECCodeTester, checkDemSampling) {
587587 // Create a simple check matrix [3 checks x 5 error mechanisms]
588588 cudaqx::tensor<uint8_t > check_matrix ({3 , 5 });
589589 std::vector<uint8_t > matrix_data = {
590- 1 , 0 , 1 , 0 , 0 , // check 0 triggered by errors 0, 2
591- 0 , 1 , 1 , 0 , 0 , // check 1 triggered by errors 1, 2
592- 0 , 0 , 0 , 1 , 1 // check 2 triggered by errors 3, 4
590+ 1 , 0 , 1 , 0 , 0 , // check 0 triggered by errors 0, 2
591+ 0 , 1 , 1 , 0 , 0 , // check 1 triggered by errors 1, 2
592+ 0 , 0 , 0 , 1 , 1 // check 2 triggered by errors 3, 4
593593 };
594594 check_matrix.copy (matrix_data.data (), check_matrix.shape ());
595595
@@ -602,9 +602,9 @@ TEST(QECCodeTester, checkDemSampling) {
602602
603603 // Validate shapes
604604 EXPECT_EQ (nShots, checks.shape ()[0 ]);
605- EXPECT_EQ (3 , checks.shape ()[1 ]); // 3 checks
605+ EXPECT_EQ (3 , checks.shape ()[1 ]); // 3 checks
606606 EXPECT_EQ (nShots, errors.shape ()[0 ]);
607- EXPECT_EQ (5 , errors.shape ()[1 ]); // 5 error mechanisms
607+ EXPECT_EQ (5 , errors.shape ()[1 ]); // 5 error mechanisms
608608
609609 // Verify determinism with same seed
610610 auto [checks2, errors2] =
@@ -624,8 +624,7 @@ TEST(QECCodeTester, checkDemSampling) {
624624 for (size_t check = 0 ; check < 3 ; ++check) {
625625 uint8_t expected = 0 ;
626626 for (size_t err = 0 ; err < 5 ; ++err) {
627- expected ^=
628- (errors.at ({shot, err}) & check_matrix.at ({check, err}));
627+ expected ^= (errors.at ({shot, err}) & check_matrix.at ({check, err}));
629628 }
630629 EXPECT_EQ (expected, checks.at ({shot, check}));
631630 }
@@ -684,16 +683,15 @@ TEST(QECCodeTester, checkDemSampling) {
684683 std::vector<uint8_t > matrix_data = {1 , 0 , 1 , 0 , 1 , 1 };
685684 check_matrix.copy (matrix_data.data (), check_matrix.shape ());
686685
687- std::vector<double > wrong_size_probs = {0.1 , 0.2 }; // Should be size 3
686+ std::vector<double > wrong_size_probs = {0.1 , 0.2 }; // Should be size 3
688687
689- EXPECT_THROW (
690- cudaq::qec::dem_sampling (check_matrix, 10 , wrong_size_probs),
691- std::invalid_argument);
688+ EXPECT_THROW (cudaq::qec::dem_sampling (check_matrix, 10 , wrong_size_probs),
689+ std::invalid_argument);
692690 }
693691
694692 // Test error: non-rank-2 matrix
695693 {
696- cudaqx::tensor<uint8_t > bad_matrix ({5 }); // rank-1
694+ cudaqx::tensor<uint8_t > bad_matrix ({5 }); // rank-1
697695 std::vector<uint8_t > matrix_data = {1 , 0 , 1 , 0 , 1 };
698696 bad_matrix.copy (matrix_data.data (), bad_matrix.shape ());
699697
0 commit comments