{"id":19489954,"url":"https://github.com/cchandre/kh","last_synced_at":"2026-04-29T16:33:08.486Z","repository":{"id":151252866,"uuid":"379262469","full_name":"cchandre/KH","owner":"cchandre","description":"Kramers-Henneberger reductions of Hamiltonian dynamics","archived":false,"fork":false,"pushed_at":"2025-06-23T14:28:30.000Z","size":1282,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-06T06:47:01.123Z","etag":null,"topics":["amo","attosecond-physics","averaging","hamiltonian","kramers-henneberger","matlab","numpy","schrodinger-equation","strong-field-ionization","tdse"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cchandre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-22T12:31:10.000Z","updated_at":"2025-06-23T14:28:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"2cc79b61-988e-453d-8bf6-8801a32b4cee","html_url":"https://github.com/cchandre/KH","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cchandre/KH","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchandre%2FKH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchandre%2FKH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchandre%2FKH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchandre%2FKH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cchandre","download_url":"https://codeload.github.com/cchandre/KH/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cchandre%2FKH/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32434767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amo","attosecond-physics","averaging","hamiltonian","kramers-henneberger","matlab","numpy","schrodinger-equation","strong-field-ionization","tdse"],"created_at":"2024-11-10T21:10:32.789Z","updated_at":"2026-04-29T16:33:08.460Z","avatar_url":"https://github.com/cchandre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bogolyubov’s averaging applied to the Kramers-Henneberger Hamiltonian\n* [**KHBogolyubov.mlx**](https://github.com/cchandre/KH/blob/main/KHBogolyubov.mlx): Matlab livescript for the manuscript *Bogolyubov’s averaging theorem applied to the Kramers-Henneberger Hamiltonian* by E. Floriani, J. Dubois, C. Chandre\n\n\n\u003cins\u003eReference:\u003c/ins\u003e E. Floriani, J. Dubois, C. Chandre, *Bogolyubov's averaging theorem applied to the Kramers-Henneberger Hamiltonian*, [Physica D](https://doi.org/10.1016/j.physd.2021.133124) 431, 133124 (2022); [arxiv:2107.01946](https://arxiv.org/abs/2107.01946)\n\n```bibtex\n@article{floriani2021,\n         title = {Bogolyubov's averaging theorem applied to the Kramers-Henneberger Hamiltonian}, \n         author = {Floriani, E. and Dubois, J. and Chandre, C.},\n         journal = {Physica D},\n         volume = {431},\n         pages = {133124},\n         year = {2022},\n         doi = {10.1016/j.physd.2021.133124},\n         URL = {https://doi.org/10.1016/j.physd.2021.133124}\n}\n```\n\n___\n# Time-dependent Schrödinger equation in the dipole approximation (TDSE)\n\nNumerical integration of the following Schrödinger equation (in the dipole approximation and in atomic units)\n```math\ni \\frac{\\partial \\psi}{\\partial t} = \\left( -\\frac{\\Delta}{2} + V(x) + x E(t) \\right) \\psi(x,t),\n```\nwhere $E(t)=E_0 f(t) \\Phi(\\omega t)$ with $f(t)$ the laser envelope, and $\\Phi$ a $2\\pi$-periodic function. The frequency $\\omega$ is defined by the laser wavelength, and the amplitude of the electric field $E_0$ is defined by the laser intensity. Here $V$ is the ionic potential. \n\n- [`TDSE_params.py`](https://github.com/cchandre/KH/blob/main/TDSE_params.py): to be edited to change the parameters of the TDSE computation (see below for a list of parameters)\n\n- [`TDSE_classes.py`](https://github.com/cchandre/KH/blob/main/TDSE_classes.py): contains the TDSE class and main functions\n\n- [`TDSE.py`](https://github.com/cchandre/KH/blob/main/TDSE.py): contains the methods to execute TDSE\n\nOnce [`TDSE_params.py`](https://github.com/cchandre/KH/blob/main/TDSE_params.py) has been edited with the relevant parameters, run the file as \n```sh\npython3 TDSE.py\n```\nor \n```sh\nnohup python3 -u TDSE.py \u0026\u003eTDSE.out \u003c /dev/null \u0026\n```\nThe list of Python packages and their version are specified in [`requirements.txt`](https://github.com/cchandre/KH/blob/main/requirements.txt)\n\n##  Parameters\n\nThe file [`TDSE_params.py`](https://github.com/cchandre/KH/blob/main/TDSE_params.py) should contain the following parameters:\n\n- *Method*: string; 'eigenstates', 'wavefunction', 'HHG', 'ionization'; choice of method\n  - 'eigenstates': plot the first *k* eigenstates and eigenvalues of the potential specified in *InitialState[1]*, where *k* is equal to *InitialState[0]*+1\n  - 'wavefunction': displays the wavefunction as a function of time obtained by integrating the TDSE equation\n  - 'HHG': compute the high-harmonic generation (HHG) spectrum as a function of time \n  - 'ionization': computes the ionization probability as well as displaying the wavefunction as a function of time\n  - 'Husimi': computes the Husimi representation of the wavefunction as a function of time; 'p_husimi' and 'sigma_husimi' need to be defined\n- *laser_intensity*: float; intensity of the laser field in W cm\u003csup\u003e-2\u003c/sup\u003e\n- *laser_wavelength*: float; wavelength of the laser field in nm\n- *laser_E*: lambda function returning an array of *n* floats; *n* components (where *n* is the dimension of configuration space) of the electric field (dipole approximation); the electric field is then given by *E0* * *laser_envelope*(t) * *laser_E*(\u0026omega; t) where *E0* = sqrt(*laser_intensity*)\n- *te*: array of 3 floats; duration of the ramp-up, plateau and ramp-down in laser cycles\n- *V*: lambda function; ionic potential\n- *InitialState*: integer or array [integer or tuple of integers or lambda function, string]; integer = index of the initial eigenstate (0 corresponds to the ground state, 1 is the first excited state...); string = potential with which the initial state is computed ('V', 'VKH2' or 'VKH3'); in case a tuple of integers is entered, the initial state is a linear combination of the various states in the tuple with the coefficients given in *InitialCoeffs*; if *InitialState* or *InitialState*[0] is a lambda function, the initial state is computed on the grid using this function\n- *L*: array of *n* floats; size of the box in each direction\n- *N*: array of *n* integers; number of points in each direction\n\nSome additional (optional) parameters could be defined in [`TDSE_params.py`](https://github.com/cchandre/KH/blob/main/TDSE_params.py):\n\n- *laser_envelope*: string; 'trapez', 'sinus', 'const'; envelope of the laser field during ramp-up and ramp-down\n- *InitialCoeffs*: array of floats; the initial state is a linear combination of eigenstates $\\Psi_k(x)$ of the potential defined in *InitialState*[1], i.e., $\\psi(x,0)=\\sum_k c_k \\Psi_k(x)$ where $k$ belongs to *InitialState*[0]; if not specified, the coefficients are equal to 1\n- *DisplayCoord*: string; 'lab', 'KH2' or 'KH3'; if KH (Kramers-Henneberger), the wave function is moved to the KH frame (for display and for saving) of order 2 or 3; if not specified, 'lab' is the default\n- *delta*: float or array of *n* floats; size of the absorbing boundary in each direction (if float, the size is taken equal in all dimensions)\n- *Lg*: float or array of *n* floats; size of the box for the initial computation of the initial state along each dimension; if float, [-*Lg*, *Lg*] in each dimension; if not specified, *Lg*=*L*\n- *nsteps_per_period*: integer; number of steps per laser period for the integration; the time-step is then defined as 2\u0026pi; /\u0026omega; / *nsteps_per_period*\n- *scale*: string; 'linear' or 'log'; the axis scale type to apply for the representation of the wavefunction (if *Method*='wavefunction')\n- *legend*: string; location of the legend; for more details, see [matplotlib legend](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html)\n- *xlim*: tuple of floats; x-axis view limits (in atomic units)\n- *ylim*: tuple of floats or string; y-axis view limits (in atomic units); if 'auto', let the y-axis scale automatically\n- *figsize*: tuple of floats; width and height in inches of the figure\n- *SaveWaveFunction*: boolean; if True, saves the animation of the wavefunction  as an animated `.gif` image\n- *PlotData*: boolean; if True, displays the wavefunction on the screen as time increases (only for 1D and 2D)\n- *SaveData*: boolean; if True, the time evolution of the wave function are saved in a `.mat` file\n- *dpi*: integer; number of dots per inch for the movie frames (if *SaveWaveFunction* is True)\n- *refresh*: integer; the wavefunction is displayed every *refresh* time steps\n- *darkmode*: boolean; if True, plots are done in dark mode\n- *tol*: relative accuracy for eigenvalues (stopping criterion) (default=10\u003csup\u003e-10\u003c/sup\u003e, 0 implies machine precision); see [eigsh](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.eigsh.html)\n- *maxiter*: maximum number of Arnoldi update iterations allowed (default=1000); see [eigsh](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.eigsh.html)\n- *ncv*: number of Lanczos vectors generated (default=100); see [eigsh](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.eigsh.html)\n- *Nkh*: integer; number of points in one period to compute the Kramers-Henneberger potentiel *V*\u003csub\u003eKH\u003c/sub\u003e(x) (default=2\u003csup\u003e12\u003c/sup\u003e)\n- *ode_solver*: string; choice of splitting symplectic integrator; for a list see [pyHamSys](https://pypi.org/project/pyhamsys/) (default='BM4')\n\n\u003cins\u003eReference:\u003c/ins\u003e E. Floriani, J. Dubois, C. Chandre, *Scars of Kramers-Henneberger atoms*, [arxiv:2407.18575](https://arxiv.org/abs/2407.18575)\n\n```bibtex\n@misc{floriani2024,\n      title={Scars of Kramers-Henneberger atoms}, \n      author={Elena Floriani and Jonathan Dubois and Cristel Chandre},\n      year={2024},\n      eprint={2407.18575},\n      archivePrefix={arXiv},\n      primaryClass={nlin.CD},\n      url={https://arxiv.org/abs/2407.18575}, \n}\n```\n\n---\n\nFor more information: \u003ccristel.chandre@cnrs.fr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcchandre%2Fkh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcchandre%2Fkh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcchandre%2Fkh/lists"}