With tqec/tqec#356 now being the default way of computing detectors, our needs for automatic detector computation slightly changed.
Before, we needed to be able to find all the detectors that were present in a complete circuit. Here, "complete" is used to explicitly say that the circuit was not part of a larger circuit, and so the detector computation had a global view of the operations being performed.
This is no longer the case with tqec/tqec#356.
In tqec/tqec#356, automatic detector computation is only used on sub-circuits, which raise some intricacies to guarantee the correctness of the computed detectors. For example, we need to ensure that the Pauli flows used to compute the detectors are strictly contained in the sub-circuit considered, which was not a problem before because we had a global view of the circuit.
Also, we are no longer interested in computing all the detectors in a given sub-circuit: we now only want to compute the detectors involving some measurements (right now, the measurement(s) contained in the last time slice of the center plaquette).
We could go even further and say that it would be even nicer to be able to compute detectors directly from a Template instantiation and the accompanying Plaquettes instance, because right now automatic detector computation requires a quantum circuit, which is costly to build from a Template instantiation and a Plaquettes instance (needs to be re-validated by benchmarks).
The needs evolved, and so it would be nice if the interface provided by tqec.circuit.detectors could adapt to the new needs, potentially using the new restrictions to provide a more efficient algorithm/implementation.
With tqec/tqec#356 now being the default way of computing detectors, our needs for automatic detector computation slightly changed.
Before, we needed to be able to find all the detectors that were present in a complete circuit. Here, "complete" is used to explicitly say that the circuit was not part of a larger circuit, and so the detector computation had a global view of the operations being performed.
This is no longer the case with tqec/tqec#356.
In tqec/tqec#356, automatic detector computation is only used on sub-circuits, which raise some intricacies to guarantee the correctness of the computed detectors. For example, we need to ensure that the Pauli flows used to compute the detectors are strictly contained in the sub-circuit considered, which was not a problem before because we had a global view of the circuit.
Also, we are no longer interested in computing all the detectors in a given sub-circuit: we now only want to compute the detectors involving some measurements (right now, the measurement(s) contained in the last time slice of the center plaquette).
We could go even further and say that it would be even nicer to be able to compute detectors directly from a
Templateinstantiation and the accompanyingPlaquettesinstance, because right now automatic detector computation requires a quantum circuit, which is costly to build from aTemplateinstantiation and aPlaquettesinstance (needs to be re-validated by benchmarks).The needs evolved, and so it would be nice if the interface provided by
tqec.circuit.detectorscould adapt to the new needs, potentially using the new restrictions to provide a more efficient algorithm/implementation.