loom.executor.legacy_functions.noise_annotated_stim_circuit

Copyright 2024 Entropica Labs Pte Ltd

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

loom.executor.legacy_functions.noise_annotated_stim_circuit.noise_annotated_stim_circuit(stim_circ, before_measure_flip_probability=0, after_clifford_depolarization=0, after_reset_flip_probability=0)[source]

This function takes as input a pure (sans noise) stim circuit, and outputs a the circuit with the desired noise model

Parameters:
  • stim_circ (stim.Circuit) – The input noiseless stim circuit

  • before_measure_flip_probability (float, optional) – X_ERROR probability before a measurement. Default set to 0 will add no measurement errors

  • after_clifford_depolarization (float, optional) – applies DEPOLARIZING_ERROR1 and DEPOLARIZING_ERROR2 after each single and two qubit clifford gate in the circuit. Default set to 0 will add no depolarization errors

  • after_reset_flip_probability (float, optional) – Apply an X_ERROR with this probability after a reset gate. Default set to 0 will add no reset errors

Returns:

stim circuit annotated with the input noise model

Return type:

stim.Circuit