code: def _maybe_add_noise_to_payload(self, payload):
          
          if self.measurement_noise is not None:
              payload["measurement-noise"] = self.measurement_noise
          if self.gate_noise is not None:
              payload["gate-noise"] = self.gate_noise
docs: Set the gate noise and measurement noise of a payload.