# Optimized Computation of Tight Focusing of Short Pulses Using Mapping to Periodic Space
## 4 Conclusions  
We have presented an open-source implementation (see [45]) of a method for optimized numerical computation of tight focusing of short electromagnetic pulses with arbitrary longitudinal and transverse variation of polarization, phase, and amplitude. The method is based on mapping 3D space to and from a periodic domain, which can have a much smaller size than that required for the straightforward computation. For example, for the case of a two-cycle pulse focused with f-number = 0.3, the computational costs for both run time and memory can be reduced by a factor of almost 6, while the introduced error with respect to the field strength does not exceed 0.1% of the peak value. Figure 8: Example of focal spot calculated from realistic profile: (**a**) typical transverse intensity profile (a. u.) and (**b**) wavefront (in radians) without correction of extra aberrations during beam transport from the end of the laser to the experiment and (**c**) normalized focal intensity obtained applying our method with a f-number \(f=3\). We use a spectral solver to avoid numerical dispersion and to make it possible to advance the field state over an arbitrary time interval within one iteration. This provides an opportunity to perform computations of practical interest within minutes on a personal computer. The method and its implementation have been validated by the comparison with the straightforward computations (i.e., without using the described method) and also with the results of analytical computations based on the paraxial approximation for Gaussian beams. We have also considered tight focusing of a laser pulse with a circular flat-top transverse profile. We apply the method to compute the peak achievable intensity as a function of f-number, indicating the potential benefit of using tight focusing for reaching high field strength with current and future laser facilities. Two realistic applications are also demonstrated including the focusing of an ideal and a real laser beam profile with imperfect wavefronts. These extend the potential utilization of our technique with performing simulations with real experimental data and an enhanced correction of experimental focus quality even for low repetition rate lasers that will have a high impact on future experiments. The Hi-Chi project is available online at [[https://github.com/hi-chi/pyHiChi](https://github.com/hi-chi/pyHiChi)]([https://github.com/hi-chi/pyHiChi](https://github.com/hi-chi/pyHiChi)). The scripts required to reproduce the numerical results are located in the \"doc/Tight Focusing\" folder. Conceptualization, A.G.; methodology, A.G.; software, E.P. and V.V. ; validation, E.P., T.B. and A.G.; formal analysis, E.E. and A.G.; investigation, E.P., T.B., J.F., A.M., A.D.A.G., P.F. and L.V. ; resources, A.G., I.M. and L.V. ; data curation, E.P., T.B., J.F., A.G. and L.V. ; writing--original draft preparation, A.G., E.P., T.B., J.F., I.M. and L.V. ; writing--review and editing, E.E., T.B., M.M., L.V. and I.M. ; visualization, E.P., T.B., J.F. and L.V. ; supervision, I.M. and A.G.; project administration, I.M. and A.G.; funding acquisition, A.G. and I.M. All authors have read and agreed to the published version of the manuscript. The work is supported by the Lobachevsky University academic excellence program (Project 5-100). [PERSON] acknowledges the support of the Swedish Research Council (Grant No. 2017-05148), and [PERSON] also acknowledges the support of the Swedish Research Council (2016-05409 and 2019-02376). Not applicable. The scripts required to reproduce the numerical results in this paper are included in the Supplemental Material. The code is freely available and may be downloaded from [[https://github.com/hi-chi/pyHiChi](https://github.com/hi-chi/pyHiChi)]([https://github.com/hi-chi/pyHiChi](https://github.com/hi-chi/pyHiChi)). The authors acknowledge the use of computational resources provided by the Joint Supercomputer Center of the Russian Academy of Sciences and by the Swedish National Infrastructure for Computing (SNIC).