Ok,
It sounds to me like the ignition switch itself was damaged or not reinstalled correctly when the lock cylinder was replaced. The engine is dying because the run position of the ignition switch isn't making a good contact. When the car is started and the key moves back to the run position, the switch is not making contact, causing loss of power to the computer.
Let me know if you have any more questions!
If my answers have helped you in any way, please hit the
ACCEPT button, and Bonuses and feedback are greatly appreciated!!