surface_sim.experiments.arbitrary_experiment.schedule_from_mid_cycle_circuit#
- schedule_from_mid_cycle_circuit(circuit, layouts, gate_to_iterator, tick_iterators)[source]#
Returns the equivalent schedule from a stim circuit for contains mid cycle gates and/or codes.
- Parameters:
- circuit
Stim circuit.
- layouts
List of layouts whose index match the qubit index in
circuit. This function only works for layouts that only have one logical qubit.- gate_to_iterator
Dictionary mapping the names of stim circuit instructions used in
circuitto the functions that generate the equivalent logical circuit. The value forTICKwill be ommited as they should be specified intick_iterators.- tick_iterators
Sequence of (half) QEC round iterators that are going to be used in cyclic order when encountering
TICKinstructions. Each iterator is applied to all the active layouts.
- Returns:
- schedule
List of operations to be applied to a single qubit or pair of qubits. See Notes for more information about the format.
Notes
The format of the schedule is the following. Each element of the list is an operation to be applied to the qubits: -
tuple[LogOpCallable, Layout]performs a (logical) single-layout operation -tuple[LogOpCallable, Layout, Layout]performs a (logical) two-qubit gate.For example, the following circuit
with
tick_iterators = [to_mid_cycle_iterator, to_end_cycle_iterator]is translated to