Skip to content

Commit 2556e86

Browse files
committed
update the exception to a warning for errors without detectos
1 parent 21fc7b0 commit 2556e86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ stim::DetectorErrorModel common::merge_indistinguishable_errors(
127127
case stim::DemInstructionType::DEM_ERROR: {
128128
Error error(instruction);
129129
if (error.symptom.detectors.size() == 0) {
130-
throw std::invalid_argument("Errors that do not flip any detectors are not supported.");
130+
// TODO: For errors without detectors, the observables should be included if p>0.5
131+
std::cout << "Warning: the circuit has errors that do not flip any detectors \n";
131132
}
132133

133134
if (errors_by_symptom.find(error.symptom) != errors_by_symptom.end()) {

0 commit comments

Comments
 (0)