WavePacket is an open-source program package for numeric simulations in quantum dynamics. It can solve time-independent or time-dependent linear Schrödinger and Liouville–von Neumann-equations in one or more dimensions. Also coupled equations can be treated, which allows, e.g., to simulate molecular quantum dynamics beyond the Born–Oppenheimer approximation. Optionally accounting for the interaction with external electric fields within the semi-classical dipole approximation, WavePacket can be used to simulate experiments involving tailored light pulses in photo-induced physics or chemistry. Being highly versatile and offering visualization of quantum dynamics ‘on the fly’, WavePacket is well suited for teaching or research projects in atomic, molecular and optical physics as well as in physical or theoretical chemistry. Building on the previous Part I [Comp. Phys. Comm. 213, 223–234 (2017)] which dealt with closed quantum systems and discrete variable representations, the present Part II focuses on the dynamics of open quantum systems, with Lindblad operators modeling dissipation and dephasing. This part also describes the WavePacket function for optimal control of quantum dynamics, building on rapid monotonically convergent iteration methods. Furthermore, two different approaches to dimension reduction implemented in WavePacket are documented here. In the first one, a balancing transformation based on the concepts of controllability and observability Gramians is used to identify states that are neither well controllable nor well observable. Those states are either truncated or averaged out. In the other approach, the H2-error for a given reduced dimensionality is minimized by H2 optimal model reduction techniques, utilizing a bilinear iterative rational Krylov algorithm.The present work describes the MATLAB version of WavePacket 5.3.0 which is hosted and further developed at the Sourceforge platform, where also extensive Wiki-documentation as well as numerous worked-out demonstration examples with animated graphics can be found. Program summaryProgram Title:WavePacketProgram Files doi:http://dx.doi.org/10.17632/9g8b7jychy.1Licensing provisions: GPLv3Programming language:MatlabJournal reference of previous version: Comput. Phys. Comm. 213 (2017), 223.Does the new version supersede the previous version?: The previous article focused on the treatment of closed quantum systems by discrete variable representations and implementation of various numerical algorithms for solving Schrödinger’s equations. Complementary to that, the present second part is concerned with open quantum systems and optimal control by external fields. In addition, two approaches to dimension reduction useful in modeling of quantum control are described.Reasons for the new version: The reason for having a second article on the WavePacket software package lies in the fact that a complete description of the package would have exceeded the scope of a regular article. Several significant features of the WavePacket package are introduced here which could not be mentioned in the first article, due to length constraints.Summary of revisions: Here we describe the numerical treatment of open quantum systems dynamics modeled by Lindblad master equations. Moreover, we explain the WavePacket functions for optimal control simulations, both for closed and open quantum systems. To address the problem of computational effort, two strategies for model reduction have been included.Nature of problem: Dynamics of closed and open systems are described by Schrödinger or Liouville–von Neumann equations, respectively, where the latter ones will be restricted to the Lindblad master equation. Emphasis is on the interaction of quantum system with external electric fields, treated within the semi-classical dipole approximation. Quantum optimal control simulations are used for the design of tailored fields achieving specified targets in quantum dynamics. With these features, WavePacket can be instrumental for the simulation, understanding, and prediction of modern experiments in atomic, molecular and optical physics involving temporally shaped fields.Solution method: Representing state vectors or reduced density matrices in a discrete basis, Schrödinger or Liouville–von Neumann equations are cast into systems of ordinary differential equations. Those are treated by self-written or Matlab’s built-in solvers, the latter ones offering adaptive time-stepping. The optimal control equations are solved by the rapid monotonically convergent iteration methods developed by Zhu, Rabitz, Ohtsuki and others. In order to reduce the dimensionality of large scale control problems, the balanced truncation method as well as H2-optimal model reduction approaches are available in WavePacket.Additional comments including restrictions and unusual features: The WavePacket program package is rather easy and intuitive to use, providing visualization of quantum dynamics ‘on the fly’. It is mainly intended for low-dimensional systems, typically not exceeding three to five degrees of freedom. Detailed user guides and reference manuals are available through numerous Wiki pages hosted at the SourceForge platform where also a large number of well documented demonstration examples can be found.