Open viathor opened 4 years ago
Is this still an issue @viathor, @mpharrigan ? Is there a plan here ?
Misunderstood the question the first time...
Noted in the existing XEB tutorials are separate library call wrappers from cirq.experiments.random_quantum_circuit_generation
, cirq.experiments.xeb_sampling
, and cirq.experiments.xeb_fitting
which seem to already divide generation and fidelity estimation.
However, these functions seem to be designed to be pipelined: the input data structures to each subsequent function is expected to be the output of the previous. It may be good to make these interface data structures simpler in order to make each function/component more usable in other situations.
XEB experiment code is monolithic. In particular, it tightly couples generation of random circuits and fidelity estimation. The latter is potentially useful on its own (e.g. when RQCs have been generated and executed offline), so should be factored out for re-use.
Also, there is more than one formula for estimating fidelity, e.g. on a few qubits one can compute cross-entropies directly while on many qubits one has to resort to formulas based on some assumptions about the shape of the output distribution. Therefore, it makes sense to implement fidelity estimation separate from RQC generation and overall XEB orchestration.