0
$\begingroup$

In Stim, we can get a detector graph with the probability of each error mechanism occurring. Now I want to construct a path graph from the detector graph, which is usually done by Dijkstra's algorithm. What is the easiest way to implement Dijkstra's algorithm and get the path graph with each path having weight (=the sum of the corresponding edge weights (defined by -log p) in the detector graph) from detector_error_model?

$\endgroup$

1 Answer 1

0
$\begingroup$

The easiest way is to write glue code that iterates over the detector error model, converting error instructions into the edges of a networkx graph. Then use networkx for graph transformations like obtaining the path graph.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.