We present a dynamic logic for reasoning about information flow in quantum programs. In particular, we give a finitary syntax and a relational semantics for a Logic of Quantum Programs (LQP), that is capable of dealing with quantum measurements, unitary evolutions and entanglements in compound quantum systems. We present a sound proof system for this logic, and we show how to characterize by logical means various forms of entanglement (e.g. the Bell states) and various quantum gates. As an example of application, we use our logic to give a formal proof for the correctness of the Teleportation protocol (proof which can be easily adapted to check Logic-Gate Teleportation).