We're celebrating World Quantum Day 2022! Join us


Simulate and benchmark two-qubit XEB circuits.

Used in the notebooks

Used in the tutorials

This uses the estimator from cirq.experiments.fidelity_estimation.least_squares_xeb_fidelity_from_expectations, but adapted for use on pandas DataFrames for efficient vectorized operation.

sampled_df The sampled results to benchmark. This is likely produced by a call to sample_2q_xeb_circuits.
circuits The library of circuits corresponding to the sampled results in sampled_df.
cycle_depths The sequence of cycle depths to benchmark the circuits. If not provided, we use the cycle depths found in sampled_df. All requested cycle_depths must be present in sampled_df.
param_resolver If circuits contain parameters, resolve according to this ParamResolver prior to simulation
pool If provided, execute the simulations in parallel.

A DataFrame with columns 'cycle_depth' and 'fidelity'.

ValueError If cycle_depths is not a non-empty array or if the cycle_depths provided includes some values not available in sampled_df.