Packet narrowing and quantum entanglement in photoionization and photodissociation