## Introduction

With the ability to directly obtain the Wigner function and density matrix of photon states, quantum tomography (QT) has made a significant impact on quantum optics1,2,3, quantum computing4,5 and quantum information6,7. By an appropriate sequence of measurements on the evolution of each degree of freedom (DOF), the full quantum state of the observed photonic system can be determined. The first proposal to extend the application of QT to reconstruction of complete quantum states of matter wavepackets8 had generated enormous interest in ultrafast diffraction imaging9,10,11,12,13,14,15,16,17,18,19,20 and pump-probe spectroscopy of molecules21. This interest was elevated with the advent of ultrafast electron and X-ray diffraction techniques using electron accelerators and X-ray free electron lasers to add temporal resolution to the observed nuclear and electron distributions22,23. In this respect, quantum tomography holds great promise to enable imaging of molecular wavefunctions beyond classical description. This concept could become a natural area for quantum tomography of quantum states of matter24,25,26,27,28. However, the great interest in this area has been tempered by the illustration of an “impossibility theorem”, known as the dimension problem29,30. To obtain the density matrix of a system, the previoiusly established QT procedure relies on integral transforms (e.g. the tomographic Radon transform), which preserves dimensionality1. Unlike its quantum optics sibling, only a single evolutionary parameter, time, is available for the molecular wavepacket. This dimension problem prevents the use of existing QT algorithms to study quantum molecular dynamics because all rotational and most vibrational wavepackets cannot be retrieved.

Here we present an approach to resolve the notorious dimension problem. Solving this challenging problem is important to push imaging molecular dynamics to the quantum regime. Our approach makes quantum tomography a truly useful method in ultrafast physics which enables the making of quantum version of a “molecular movie”12,17,27,28,31,32,33,34, without being limited in one dimension. As a proof-of-principle, we apply our QT retrieval approach to an ultrafast electron diffraction dataset to retrieve a quantum rotational wavepacket. We first demonstrate this approach using a numerical simulation of ultrafast diffraction imaging of laser-aligned nitrogen molecules26. The analysis with this QT approach correctly recovers the density matrix of the rotational wavepacket (schematically shown in Fig. 1), which is otherwise impossible to obtain with previously established QT procedures. We then apply this approach to ultrafast diffraction experiments to obtain the quantum density matrix from experimental data.

## Results

The modern formulation of quantum tomography based on integral transform1,8,21 originates from the retrieval of wavefunction phases lost in the measurement. Dating back to 1933, Pauli and Feenberg proposed that a wavefunction ψ(x, t) = ψ(x, t)eiϕ(x, t) can be obtained by measuring the evolution of 1D position probability distribution Pr(x, t) = ψ(x, t)2 and its time derivative ∂Pr(x, t)/∂t for a series of time points35. Equivalently, a pure quantum state can also be recovered by measuring Pr(x, t) at time t and monitoring its evolution over short time intervals, i.e., Pr(x, t + NΔt) = ψ(x, t + NΔt)2 for (N = 0, 1, 2,  ). Reconstructing the phase of wavefunction can be considered as the origin of quantum tomography. For a system with Hamiltonian $$\hat{H}={\hat{H}}_{0}+{\hat{H}}_{{{{{{{{\rm{int}}}}}}}}}$$, the established 1D QT method makes use of knowledge of the non-interacting part of the Hamiltonian $${\hat{H}}_{0}$$, so that its eigenfunctions can be pre-calculated and used in the tomographic reconstruction of density matrix through integral inversion transform. However, the dimension problem as demonstrated in the pioneering works29,30 mathematically leads to singularity in the inversion from the evolving probability distribution to the density matrix and makes it challenging for higher dimensional QT.

We solve the QT dimension problem by exploiting the interaction Hamiltonian $${\hat{H}}_{{{{{{{{\rm{int}}}}}}}}}$$ and the analogy between QT and crystallographic phase retrieval (CPR)36 in a seemingly distant field, crystallography. Further exploiting the interaction Hamiltonian $${\hat{H}}_{{{{{{{{\rm{int}}}}}}}}}$$ provides us a set of physical conditions, such as the selection rules of transitions subject to $${\hat{H}}_{{{{{{{{\rm{int}}}}}}}}}$$ and symmetry of the system. These physical conditions can be imposed as constraints in our QT approach, which is not feasible in the established QT methods based on integral transform. By compensating with the additional physical conditions as constraints in the iterative QT procedure, the converged solution can be obtained as the admissible density matrix that complies with all the intrinsic properties of the investigated physical system.

We start by presenting the correspondence between QT and CPR. The research on CPR has been the focus of crystallography for decades9,24,34,36,37,38. In crystallography, the scattered X-ray or electron wave encodes the structural information of molecules. The measured X-ray diffraction intensity is I(s) ~ f(s)2, where s = kf − kin is momentum transfer between incident and diffracted X-ray photon or electron, f(s) is the electronically elastic molecular form factor. For X-ray diffraction, the form factor is connected to the electron density by a Fourier transform $${f}_{{{{{{{{\rm{X}}}}}}}}}({{{{{{{\bf{s}}}}}}}}) \sim {{{{{{{\mathscr{F}}}}}}}}[\,{{\mbox{Pr}}}\,({{{{{{{\bf{x}}}}}}}})]$$, Pr(x) is the probability density of electrons in a molecule, and x is the electron coordinate. The form factor of electron diffraction has a similar expression $${f}_{{{{{{{{\rm{e}}}}}}}}}({{{{{{{\bf{s}}}}}}}})=[{{{\Sigma }}}_{\alpha }{N}_{\alpha }\exp (i{{{{{{{\bf{s}}}}}}}}\cdot {{{{{{{{\bf{R}}}}}}}}}_{\alpha })-{f}_{{{{{{{{\rm{X}}}}}}}}}({{{{{{{\bf{s}}}}}}}})]/{s}^{2}$$, where Nα, Rα are the charge and position of αth nucleus. However, the phase of the form factor, which is essential for reconstructing the molecular structure, is unknown in the diffraction experiment, only the modulus f(s) can be obtained from measured diffraction intensity.

Phase retrieval is a powerful method that prevails in crystallography and single particle coherent diffraction imaging24,37,38. Its basic idea is illustrated in Fig. 2. Employing projective iterations between real space and Fourier space and imposing physical constraints in both spaces, the lost phases of the form factor f(s) can be reconstructed with high fidelity. Fourier space constraint utilizes measured diffraction intensity data, and real space constraints comes from a priori knowledge, e.g. the positivity of electron density. We present the new method of quantum tomography based on this conceptual approach by applying it to rotational wavepackets of nitrogen molecules prepared by impulsive laser alignment, using the ultrafast electron diffraction (UED). Quantum tomography of rotational wavepackets is impossible in the previously established QT theory, because the full quantum state of a rotating linear molecule is a 4D object $$\langle \theta ,\phi | \hat{\rho }| \theta ^{\prime} ,\phi ^{\prime} \rangle$$, while the probability density evolution Pr(θ, ϕ, t) extracted from measured diffraction patterns is only 3D. It is obvious that the inversion problem to obtain the density matrix is not solvable by dimensionality-preserving transform.

We first demonstrate the capability of our approach to correctly recover the density matrix despite the dimension problem, using numerical simulation of ultrafast diffraction of impulsively aligned nitrogen molecule with an arbitrarily chosen temperature of 30 K. The order of recovered density matrix sets the requirement on the resolution. From Eq. (3), the characteristic time scale of rotation is $$\frac{1}{{{\Delta }}\omega }=\frac{2{{{{{{{\mathcal{I}}}}}}}}}{| {{\Delta }}J| (J+1)}$$, where $${{{{{{{\mathcal{I}}}}}}}}$$ is the moment of inertia of nitrogen molecule, ΔJ = J1 − J2 and J = J1 + J2 for any two eigenstates with J1, J2. Using the Nyquist-Shannon sampling theorem, the required temporal resolution δt should be $$\delta t\le \frac{1}{2{{\Delta }}\omega }$$. The spatial resolution δθ and δϕ can be determined with the argument that the nodal structure of spherical harmonic basis in Eq. (2) must be resolved, i.e. $$\delta \theta \; < \;\frac{\pi }{2{J}_{\max }}$$. To recover density matrix up to the order $${J}_{\max }=8$$, it demands time resolution δt ~ 102 fs and spatial resolution δθ ~ 10−1 rad. Quantum tomography of the rotational wavepacket gives the result shown in Fig. 3. After 50 iterations, both density matrix and probability distribution are precisely recovered. The error of density matrix is $${\epsilon }_{50}(\hat{\rho })=2.9\times 1{0}^{-2}$$ and error of probability achieves ϵ50(Pr) = 3.8 × 10−5 (see Supplementary Eqs. 33 and 34 for the definition of $$\epsilon (\hat{\rho })$$ and ϵ(Pr)).

We then apply this iterative QT method to the ultrafast electron diffraction (UED) experiment to extract the quantum density matrix of N2 rotational wavepacket, prepared at a temperature of 45 K. The experimental parameters are described in detail in a previous publication39. We use a tabletop kilo-electron-volt (keV) gas-phase UED setup to record the diffraction patterns of nitrogen molecules that are impulsively aligned by a femtosecond laser pulse. The details of the keV UED setup has been introduced in39,40, which is schematically shown in Fig. 1. Briefly, an 800 nm pump laser pulse with a pulse duration of 60 fs (FWHM) and pulse energy of 1 mJ is used to align the molecules. A probe electron pulse with kinetic energy of 90 keV and 10,000 electrons per pulse is used and the diffraction pattern of the electrons scattered from the molecules is recorded. The nitrogen molecules are introduced in a gas jet using a de Laval nozzle. The laser pulse has a tilted pulse front to compensate the group velocity mismatch between the laser and electron pulses, and an optical stage is used to control the time delay between the pump and probe pulse with a time step of 100 fs. The pump laser launches a rotational wave packet, which exhibits dephasing and subsequent revivals of alignment in picosecond time scale. The experimental diffraction patterns at several time delays are shown in Fig. 4a–d. The temporal evolution of diffraction patterns can be characterized by the anisotropy, defined as (SH − SV)/(SH + SV), where SH and SV are the sum of the counts in horizontal and vertical cones in the diffraction patterns at 3.0 < s < 4.5 Å−1, with an opening angle of 60 degrees. The temporal evolution of angular probability distribution Pr(θ, ϕ, t) can be retrieved using the method described in39, followed by a deconvolution using a point spread function with FWHM width of 280 fs to remove the blurring effect due to the limited temporal resolution of the setup. Data is recorded from before excitation of the laser up to 6.1 ps after excitation. In order to complete the data up to a full cycle, which is needed for the quantum tomography, the angular probability distribution evolution is extended to obtain the data from 6.1 ps to 11 ps using a reflection of the data from 6.1 ps to 1.2 ps based on the symmetry of the evolution of the rotational wavepacket. The diffraction patterns and corresponding angular distributions at various time delays are shown in Fig. 4. Using our QT method, we obtain the complex density matrix in Fig. 5, which completely determines the rotational quantum state of the system. The error of recovered probability distribution converges to ϵ(Pr) = 6.4 × 10−2. The difference between recovered angular probability distribution and the experimental result comes from the restriction of order of recovered density matrix due to limited temporal and angular resolution in the experiment.

## Discussion

In summary, we have demonstrated an iterative quantum tomography approach that is capable of extracting the density matrix of high-dimensional wavepacket of molecules from its evolutionary probability distribution in time. The notorious dimension problem, which has prohibited for almost two decades the quantum tomographic reconstruction of molecular quantum state from ultrafast diffraction, has thus been resolved. This quantum tomography approach can be straightforwardly extended to obtain other quantum states, such as vibrational states (see Supplementary Note 8) or electronic states. The retrieval of the full density matrix can be used to study important new information about the quantum dynamics. For example, the passage of a nuclear wavepacket through a conical intersection, a region in the potential energy surface where the ground excited states intersect, has been widely studied41 because it is crucial for the relaxation of photoexcited molecules. A conical intersection produces a coherent superposition of two states which can be directly observed in the off-diagonal terms of the density matrix. Thus, a full quantum retrieval would provide direct evidence of the presence of a conical intersection and the moment at which the wavepacket reaches it. We expect this advance to have a broad impact in many areas of science and technology, not only for making the quantum version of molecular movies, but also for QT of other systems when quantum state information is tainted by insufcient evolutionary dimensions or incomplete measurements.

## Methods

### Iterative quantum tomography

From a dataset consisting of a series of time-ordered snapshots of diffraction patterns

$$I({{{{{{{\bf{s}}}}}}}},t)=\int\nolimits_{0}^{2\pi }d\phi \int\nolimits_{0}^{\pi }\sin \theta d\theta \,{{\mbox{Pr}}}\,(\theta ,\phi ,t)| f({{{{{{{\bf{s}}}}}}}},\theta ,\phi ){| }^{2},$$
(1)

where the form factor f is related to the molecule orientation. The time-dependent molecular probability distribution Pr(θ, ϕ, t) can be obtained by inverse Fourier and Abel transform39 or by solving the Fredholm integral equation of the first kind (see Supplementary Note 6 for details). The probability distribution of a rotational wavepacket is

$$\,{{\mbox{Pr}}}\,(\theta ,\phi ,t)=\mathop{\sum}\limits_{{J}_{1}{m}_{1}}\mathop{\sum}\limits_{{J}_{2}{m}_{2}}\langle {J}_{1}{m}_{1}| \hat{\rho }| {J}_{2}{m}_{2}\rangle {Y}_{{J}_{1}{m}_{1}}(\theta ,\phi ){Y}_{{J}_{2}{m}_{2}}^{* }(\theta ,\phi ){e}^{-i{{\Delta }}\omega t},$$
(2)

where $${{\Delta }}\omega ={\omega }_{{J}_{1}}-{\omega }_{{J}_{2}}$$ is the energy spacing of rotational levels. As shown in Fig. 2, we devise an iterative procedure to connect the spaces of density matrix and temporal wavepacket density. For the system of rotational molecules, the dimension problem limits the invertible mapping between density matrix and temporal wavepacket density to the reduced density of fixed projection quantum numbers m1, m2,

$${{{\mbox{Pr}}}}_{{m}_{1},{m}_{2}}(\theta ,t)=\mathop{\sum}\limits_{{J}_{1}{J}_{2}}\langle {J}_{1}{m}_{1}| \hat{\rho }| {J}_{2}{m}_{2}\rangle {\tilde{P}}_{{J}_{1}}^{{m}_{1}}(\cos \theta ){\tilde{P}}_{{J}_{2}}^{{m}_{2}}(\cos \theta ){e}^{-i{{\Delta }}\omega t},$$
(3)

where $${\tilde{P}}_{J}^{m}(\cos \theta )$$ is the normalized associated Legendre polynomial defined in Supplementary Eq. 2. The analytical solution of the inverse mapping from $${{{\mbox{Pr}}}}_{{m}_{1},{m}_{2}}(\theta ,t)$$ to density matrix $$\langle {J}_{1}{m}_{1}| \hat{\rho }| {J}_{2}{m}_{2}\rangle$$ is elaborated in Supplementary Note 3. However, due to the dimension problem, there is no direct way to obtain $${{{\mbox{Pr}}}}_{{m}_{1},{m}_{2}}(\theta ,t)$$ from the measured wavepacket density, only their sum is traceable through $${\sum }_{{m}_{1},{m}_{2}}{\delta }_{{m}_{1}-{m}_{2},k}{{{\mbox{Pr}}}}_{{m}_{1},{m}_{2}}(\theta ,t)=\int\nolimits_{0}^{2\pi }{{\mbox{Pr}}}\,(\theta ,\phi ,t){e}^{ik\phi }d\phi$$.

Our method starts from an initial guess of density matrix and an iterative projection algorithm is used to impose constraints in the spaces of density matrix and spatial probability density. The initial guess of quantum state, $${\hat{\rho }}_{{{{{{{{\rm{ini}}}}}}}}}={\sum }_{{J}_{0}{m}_{0}}{\omega }_{{J}_{0}}\left|{J}_{0}{m}_{0}\right\rangle \left\langle {J}_{0}{m}_{0}\right|$$, is assumed to be an incoherent state in the thermal equilibrium of a given rotational temperature, which can be experimentally determined26. $${\omega }_{{J}_{0}}=\frac{1}{Z}{g}_{{J}_{0}}{e}^{-\beta {E}_{{J}_{0}}}$$ is the Boltzmann weight, and $${g}_{{J}_{0}}$$ represents the statistical weight of nuclear spin, for the bosonic 14N2 molecule, $${g}_{{J}_{0}}$$ is 6 for even J0 (spin singlet and quintet) and 3 for odd J0 (spin triplet).

In the probability density space, constraint is imposed by uniformly scaling each reduced density $${{{\mbox{Pr}}}}_{{m}_{1},{m}_{2}}(\theta ,t)$$ with the measured total density Pr(θ, ϕ, t). Constraints in the density matrix space enable us to add all known properties of a physical state to the QT procedure, which supply additional information to compensate the missing evolutionary dimensions. The constraints contain general knowledge of the density matrix, i.e. the density matrix is positive semidefinite, Hermitian and with a unity trace. Besides, the selection rules of the alignment laser-molecule interaction imply further constraints on physically nonzero m-blocks of the density matrix and invariant partial traces of density matrix elements subject to projection quantum number m (see Supplementary Note 5 for details of the algorithm).