<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self, ket: State) -> State: """Apply the action of this Kraus quantum operation upon a state"""

        res = [op.run(ket) for op in self.operators]
        probs = [asarray(ket.norm()) * w for ket, w in zip(res, self.weights)]
        probs = np.asarray(probs)
        probs /= np.sum(probs)
        newket = np.random.choice(res, p=probs)
        return newket.normalize()