Giter Site home page Giter Site logo

python-projects's Introduction

Python Examples

Examples of personal and pofessional projects in Python

Machine Learning Example:

This project uses data (~100,000 rows) of engineered molecules to predict properties which are difficult to measure in practice. However, there are molecular properties that are easy to measure which can act as predictors of other properties that are more difficult to access.

Key libraries used here include are numpy, pandas, sklearn, keras, matplotlib and seaborn.

Please find model and data visualisations in the accompanying slides at: https://docs.google.com/presentation/d/1iiCG0XYOAxON6B8cKhYWHjurm69qLtmoDEYENoU40II/edit?usp=sharing

The bulk of this project can be found in the model.py file: https://github.com/anthayes92/Python-Examples/blob/master/Machine%20Learning/model.py

The broad steps include data preprocessing e.g analysing correlations:

Creating and tuning a neural network:

Analysing and testing the model's predictive perfomance:

Data Analysis Example:

This collaborative project (consisting of 3 physics PhDs with a shared passion for bouldering) used data scraped from the popular climbing website: https://www.8a.nu/

Here we see part of this analysis in which the BMI of climbers around Europe is compared to that of the general population using publicly available EU 2014 census data. This focuses on the European countries for which there is the most data available on climbers (via "8a" users).

The results are divided between males and females:

Note that a significant proportion of female rock climbers are underweight compared to the general population!

The full analysis is available here: https://github.com/anthayes92/Python-Showcase/blob/master/Data%20Analysis%20Example/Full_Analysis.pdf

Quantum state learning (in StrawberryFields)

This project uses software developed by Xanadu called StrawberryFields: https://strawberryfields.readthedocs.io/en/latest/ and builds on the machine learning method for state preparation introduced in: https://arxiv.org/abs/1807.10781

In the present work I use machine learning optimisation algorithms, provided by the TensorFlow backend of StrawberryFields, to engineer continuous variable states of particular interest to quantum metrology. The Python script for these states is available here: https://github.com/anthayes92/Python-Showcase/blob/master/SF%20quantum%20state%20learning%20/learner/cv_states.py

The state of interest is the so called "squeezed entangled state" which has been shown to exhibit high precision gains for applications such as gravitational wave detection but is difficult to engineer in practise: https://journals.aps.org/pra/abstract/10.1103/PhysRevA.93.033859

This was tried with a few different optimisation algorithms, the Adam optimiser was found to give the best fidelities ~0.7. The results of this are given here: https://github.com/anthayes92/Python-Showcase/tree/master/SF%20quantum%20state%20learning%20/sim_results/SES_z%3D2_d20_c10_r500

where the upper two plots are quasi-probability distributions of the target and learnt quantum states.

Future work (ideally on better suited hardware!) would include optimisation of hyperparameters to increase fidelities (>0.9), state engineering of other non-Guassian states of interest to quantum metrology such as the "squeezed cat state" and engineering of multimode (more than 2 mode) states.

Example of published research in Quantum Metrology

In this project we see an example of Python code used to produce results for the published paper: https://iopscience.iop.org/article/10.1088/2058-9565/aac30b

The main interest of this code is the simulated evolution of quantum mechaical states: https://github.com/anthayes92/Python-Showcase/blob/master/Quantum%20Metrology/state_evolution.py

and the numerical optimisations of these processes which generate the data to be analysed: https://github.com/anthayes92/Python-Showcase/blob/master/Quantum%20Metrology/optimisations---data_generation.py

python-projects's People

Contributors

anthayes92 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.