surface_sim.experiments.experiment_from_schedule#
- experiment_from_schedule(schedule, model, detectors, anc_reset=True, anc_detectors=None, meas_to_obs=None, reset_state=True, num_log_meas=0)[source]#
Returns a stim circuit corresponding to a logical experiment corresponding to the given schedule.
- Parameters:
- schedule
List of operations to be applied to a single qubit or pair of qubits. See Notes of
schedule_from_circuitfor more information about the format.- model
Noise model for the gates.
- detectors
Object to build the detectors.
- anc_reset
If
True, ancillas are reset at the beginning of the QEC round. By defaultTrue.- anc_detectors
List of ancilla qubits for which to define the detectors. If
None, adds all detectors. By defaultNone.- meas_to_obs
Dictionary with keys corresponding to the logical measurement indices and values corresponding to the observable indices that the measurement has support on. This information is used to build the observables in the circuit. By default, it defines an observable for every logical measurement.
- reset_state
Flag to reset the state of
modelanddetectors. It is useful when building circuits sequentially in chuncks so that the state is kept. IfFalse, the qubit coordinates are not included inexperiment. By default,True.- num_log_meas
Number of logical measurements in the circuit before processing the operations in the given schedule. It is useful when building circuits sequentially in chuncks so that the state is kept. By default,
0.
- Returns:
- experiment
Stim circuit corresponding to the logical equivalent of the given schedule.
Notes
The scheduling of the gates between QEC rounds is not optimal as there could be more idling than necessary. This is caused by using
merge_logical_operations.