Geospacial data visualisation


The city of Florence is situated in a flat expanse, stretching approximately 40 km in length and 10 km in width, nestled within the heart of Tuscany alongside Prato and Pistoia. Surrounded by mountains, this land has a rich geological history, dating back hundreds of millions of years when it was entirely submerged beneath a vast lake. Approximately 100,000 years ago, the waters receded, finding an escape route through the Arno River, yet leaving behind a mosaic of lakes and swamps across the expansive flat terrain. It was only during the Roman era that hydraulic engineering efforts successfully reclaimed and transformed this land.

The Etruscans, an ancient civilization predating the Romans, left their mark in the Florentine region around the 8th century BC. Notably, settlements such as Fiesole, Artimino, and Gonfienti were established in close proximity to present-day Florence. Gonfienti, in particular, stands out as an exception to typical Etruscan preferences, as it was built in a flat area, contrary to their usual practice of constructing towns atop hills for defensive reasons.

Leveraging the Google API for terrain elevation data in the Florentine flatland and employing the Cartopy Python plotting library, I endeavored to reconstruct the ancient water levels during Etruscan times. This involved analyzing 51,200 points within a 50 by 15-kilometer range, encompassing both the flatland and the encircling mountains. The resultant visual representation, created using Matplotlib and Cartopy, is interactive (when running the Python script), featuring a slider enabling adjustment of the hypothetical water level.

The map suggests that the water level likely did not exceed 45 meters above sea level, preventing “inundation” of significant Etruscan sites, such as burial grounds near Carmignano and Gonfienti. A more plausible scenario involves a lower water level. Despite the marshy terrain, there’s a likelihood of connections between sites within the flatland, such as those near Carmignano and Gonfienti. Notably, the map reveals an elevated path, strategically positioned above the depressed surroundings, potentially serving as a route across the flatland, traversing possible reclaimed areas.

REST API and Quantum application

REST API and a simple quantum application generating random numbers

Randomness plays a vital role in numerous computer applications, especially in various types of computer simulations. The generation of random numbers is essential for these simulations, and they extensively rely on these random numbers throughout the process.

Generating random numbers can be easily achieved using software libraries in various programming languages. However, it’s important to note that these libraries generate pseudo-random numbers, meaning that the generated numbers can be considered random only to a certain extent. The initialization of the pseudo-random generator can be done by setting a specific method to establish the “seed,” or it can be left unset, with the system automatically initializing the seed using the system clock. However, both methods of seed initialization can introduce biases in the simulation, which is why an independent seed source could be valuable.

To address this issue, the website quantum-random.com provides a solution by offering quantum random numbers. These numbers are not correlated with any activity of the client computer and are considered truly random, as they are generated using the properties of quantum mechanics.

This has been implemented using a micro-service web-app structure and an external quantum computer. In this picture you can see a schematics view of the system.

The generation of quantum random numbers is accomplished by employing an external quantum computer. The quantum algorithm utilized for this purpose is relatively straightforward. It involves applying a Hadamard gate to a specific number of qubits, which may vary depending on the available quantum machine. Following the application of the Hadamard gate, the state is measured. Once a set of quantum numbers is generated through this process, they are injected into the database to be served by the web application.

The web application is accessible over the internet through an Nginx web server, which handles the request redirection to a Node.js application. The application itself is straightforward, featuring a landing page that provides a link to the REST API. This API allows users to retrieve random numbers in a JSON format. To interface with a PostgreSQL database, the web application utilizes Sequelize, a popular ORM (Object-Relational Mapping) tool.