Configuring Emacs, the cool way

A super cool method to set the configuration of emacs, following DistroTube

Emacs requires tweaking the init.el file in the .emacs.d dir in home

init.el is written in emacs-lisp and a bit obscure to understand

One can use the wonderful emacs org-mode to code the init.el by using an auxiliary placed in any directory

The steps are described below (generated by emacs org-mode)

In addition to set a proper configuration, it also useful to use emacs as a client, which speeds up running emacs.

This is done, first running the emacs daemon

/usr/bin/emacs --daemon

And then any time we launch emacs we use

emacsclient -c -a 'emacs'

In Linux systems, the emacs daemon can be launched at startup by adding the service to the systemd as detailed here

1 How to configure emacs by a file

1.1 Set your init.el in .emacs.d

Write the following init.el in .emacs.d


Here is the org configuration file with its path You can set any file

In this file we have various functions

  • Org Babel

Org Babel is a wonderful tool to use different languages in a single org file

  • org-babel-load-file

Loads Emacs Lisp source blocks in the org file

  • expand-file-name

Replace the file name with absolute path

  • user-emacs-directory

Is the directory where the Emacs-specific files are placed .emacs.d typically, where the search of the file starts

1.2 Write

In the .org file for the configuration we will write different parts as pieces of emacs lisp code. For example

#+begin_src emacs-lisp
(add-to-list 'default-frame-alist '(width . 180))
(add-to-list 'default-frame-alist '(height . 90))

#+begin_src emacs-lisp
(set-face-attribute 'default (selected-frame) :height 150)

Boson sampling solitons by quantum machine learning

We use a neural network variational ansatz to compute Gaussian quantum discrete solitons in an array of waveguides described by the quantum discrete nonlinear Schroedinger equation. By training the quantum machine learning model in the phase space, we find different quantum soliton solutions varying the number of particles and interaction strength. The use of Gaussian states enables measuring the degree of entanglement and the boson sampling patterns. We compute the probability of generating different particle pairs when varying the soliton features and unveil that bound states of discrete solitons emit correlated pairs of photons. These results may have a role in boson sampling experiments with nonlinear systems and in developing quantum processors to generate entangled many-photon nonlinear states.

Quantum machine learning and boson sampling

Training Gaussian boson sampling by quantum machine learning

published in Quantum Machine Intelligence 3, 26 (2021)


We use neural networks to represent the characteristic function of many-body Gaussian states in the quantum phase space. By a pullback mechanism, we model transformations due to unitary operators as linear layers that can be cascaded to simulate complex multi-particle processes. We use the layered neural networks for non-classical light propagation in random interferometers, and compute boson pattern probabilities by automatic differentiation. This is a viable strategy for training Gaussian boson sampling. We demonstrate that multi-particle events in Gaussian boson sampling can be optimized by a proper design and training of the neural network weights. The results are potentially useful to the creation of new sources and complex circuits for quantum technologies.

Our Replica Symmetry Breaking experiments in the motivations of the Nobel Prize to Giorgio Parisi !!!

The main goal of the Light and Complexity project (ERC StG 2007) was to observe replica symmetry breaking (a process predicted by Giorgio Parisi) in random lasers and nonlinear waves.

After our successful experiments in 2015 and 2017, the results are now cited in the motivations of the 2021 Nobel Prize to Giorgio Parisi !

See also