surface_sim.detectors.Detectors.update#
- detectors.Detectors.update(new_stab_gens, new_stab_gens_inv)#
Update the current stabilizer generators with the dictionary descriving the effect of the logical gate. It allows to perform more than one logical gate between QEC rounds.
See module
surface_sim.log_gatesto see how to prepare the layout to run logical gates.Note that it does not really update the stabilizer generators but it stores the change. They are only updated when calling
build_from_ancandbuild_from_datafunctions due to the"post-gate"frame. This behavior is due to the"post-gate"frame.- Parameters:
- new_stab_gens
Dictionary that maps ancilla qubits (representing the stabilizer generators) to a list of ancilla qubits (representing the decomposition of propagated stabilizer generators through the logical gate in terms of the stabilizer generators). If the dictionary is missing ancillas, their stabilizer generators are assumed to not be transformed by the logical gate. See
get_new_stab_dict_from_layoutfor more information. For example,{"X1": ["X1", "Z1"]}is interpreted as that the logical gate has transformedX1toX1*Z1.- new_stab_gens_inv:
Same as
new_stab_gensfor the logical gate inverse.
Notes
The
new_stab_gensdictionary (or equivalently matrix) can be calculated by\[S'_i = U_L^\dagger S_i U_L\]with \(U_L\) the logical gate and \(S_i\) (\(S'_i\)) the stabilizer generator \(i\) before (after) the logical gate. From this reference.
The
new_stab_gens_invdictionary can be calculated by\[S'_i = U_L S_i U_L^\dagger\]