With Pi=∣yi⟩⟨yi∣, the channel has Kraus form Y(ρ)=∑iPiρPi and ∑iPi†Pi=I, so it is completely positive and trace preserving. It measures in the ybasis and prepares the observed basis state, hence is a measure-and-prepare channel. If pi=⟨yi∣ρ∣yi⟩, then Y(ρ)=∑ipiPi and