deltakit.circuit.measurement_noise_profile#
- deltakit.circuit.measurement_noise_profile(error_probability: float) dict[type[_MeasurementGate], Callable[[_MeasurementGate], _MeasurementGate]]#
Return a mapping from deltakit_circuit measurement types to the callables that can construct a gate of that type with a error probability as specified
- Parameters:
error_probability (float) – The error probability that should be applied across all measurement gates
- Returns:
Callable[[MeasurementGateT], MeasurementGateT]] A noise profile. Typically this would they be passed to Circuit.replace_gate
- Return type:
Dict[Type[MeasurementGateT],
Examples
>>> import stim >>> import deltakit_circuit as sp >>> stim_circuit = stim.Circuit.generated( ... "surface_code:rotated_memory_z", rounds=3, distance=3 ... ) >>> deltakit_circuit_circuit = sp.Circuit.from_stim_circuit(stim_circuit) >>> deltakit_circuit_circuit.replace_gates(measurement_noise_profile(0.2))