Sign in

Saptashwa Bhattacharyya

Understanding SVM Series: Part 1

In this post, I will give an introduction of Support Vector Machine classifier. This post will be a part of the series in which I will explain Support Vector Machine (SVM) including all the necessary minute details and mathematics behind it. It will be easy, believe me! Without any delay let’s begin —

Suppose we’re given these two samples of blue stars and purple hearts (just for schematic representation and no real data are used here), and our job is to find out a line that separates them best. What do we mean by best here ?

Figure 1: Samples in a 2D plane with some separation between them

Let’s see the…


No Cloning Theorem and Bell States

Spring in Saitama, Japan (Image Credit: Author)

The idea if quantum teleportation is fascinating to say the least but it has been realized in real life by the scientists over large distance. This post will highlight how we can think and build intuition for quantum teleportation and discuss a simple quantum circuit to achieve such feat. Many of the concepts that will be introduced here, e.g. quantum gates, tensor product, Bell states and entanglement, are all discussed before in separate posts, so fell free to check them if you need.

Let’s introduce a story line so that our learning process will be way more fun. It’s a…


Stationary Hawking Radiation from Simulated Black Hole

Simulated view of a black hole in front of the Large Magellanic Cloud (Image Credit: Alain R)

‘Black Hole’, two words that fascinate all of us, a ‘place’ of no escape for anything that passes beyond the event horizon, a complex system like that has been created artificially in laboratory and, researchers observed stationary hawking radiation from it. This fascinating report has been published recently in the prestigious journal Nature. Let’s at least try to touch the surface of this extremely complicated laboratory model of black hole and some theories behind it.

Hawking Radiation: The concept behind Hawking Radiation relies on uncertainty principle in quantum mechanics. Large fluctuations in energy can happen for a brief period of…


Deep Learning with Class Imbalanced Data

Foggy Afternoon in Nagano, Japan (Image: Author’s Own Work)

Class Imbalance:

In machine learning sometimes we are dealt with a very good hand like MNIST fashion data or CIFAR-10 data where the examples of each class in the data-set are well balanced. What happens if in a classification problem the distribution of examples across the known classes are biased or skewed ? Such problems with severe to slight bias in the data-set are common and today we will discuss an approach to handle such class imbalanced data. Let’s consider an extreme case of imbalanced data-set of mails and we build a classifier to detect spam mails. Since spam mails are relatively…


When N Hadamard Gates Act on N Qubits

Image Credit: Author

One of the most important and commonly occurring multiple qubit gates is Hadamard gate. Before we have seen matrix representation of Hadamard gate and on a separate post studied several simple quantum circuits involving Hadamard gate. In this post we will explore uniform superposition, which is the basis of Grover’s Algorithm. This post will be short and involve some mathematics but if you have gone through the previous posts and have a grasp on graduate level math, this won’t be difficult at all. Let’s get started!

2 Hadamard Gates in Parallel:

We have discussed this circuit before and here let’s review it once again. We…


Pandas Groupby & Crosstab and Folium & Basemap

Image by Dariuz Sankwoski (Source: Pixabay)

The Global Terrorism Database (GTD) is maintained by National Consortium for the Study of Terrorism and Response to Terrorism (START). The database file used in this notebook can be downloaded from Kaggle page (available in .csv format). It consists of the data of worldwide terrorist attacks from 1970 to 2017 including more than 180,000 attacks and 100 features. The GTD defines terrorism as —

“The threatened or actual use of illegal force and violence by a non-state actor to attain a political, economic, religious, or social goal through fear, coercion, or intimidation.”

Here in this post, we will use the…


Quantum Circuits and Bloch Sphere

Reflection ! (Image Source: Author)

Previously I have described about building simple quantum circuits and thinking quantum gates as matrix operators. Also using superposition of qubits, we learnt to how to create entangled states. If you suddenly find yourself here in this post without reading the previous two posts, it may be little difficult to follow along. Before diving deep into an important concept known as ‘Phase Kickback’, in this post I will describe various quantum circuits and how to build intuition to get started with multiple qubits and quantum gates. Since Bloch Sphere is often used to visualize quantum states, we will also learn…


Paper Review: General and Adaptive Robust Loss Function

Toy Train: (Image by Author)

Recently, I came across the amazing paper presented in CVPR 2019 by Jon Barron about developing a robust and adaptive loss function for Machine Learning problems. This post is a review of that paper along with some necessary concepts and, it will also contain an implementation of the loss function on a simple regression problem.

Problem with Outliers and Robust Loss:

Consider one of the most used errors in machine learning problems- Mean Squared Error (MSE). As you know it is of the form (y-x)². One of the key characteristics of the MSE is that its high sensitivity towards large errors compared to small ones. A…


Entangled Qubits with Hadamard Gate and CNOT Gate

Tranquil! (Source: Author)

Today we will peek into one of the most important and fascinating topics of Quantum Mechanics — Entanglement! In this post you can expect to learn

  1. What are Bell States?
  2. How to simply identify entangled states ?
  3. What is “Spooky Action at a Distance”?
  4. Creating superposition of qubits using Hadamard Gate.
  5. How to logically think and design entangled state using Quantum Gates?

Even though it is written as generally as possible, still anyone having understanding of bachelor level quantum mechanics will find it more intuitive. I have used IBM Quantum Experience which provides (for free) cloud based software to use…


Getting Started with Quantum Computing using Python

‘Q-cars’ (Source: Author’s own work)

After the quantum supremacy research paper published in nature by the Google scientists at the end of last year, one thing is for sure, and that is — we are now entering a completely new paradigm. IBM Quantum Experience, since their launch in 2016, have been providing cloud based software for general public to use their quantum computers anytime. We also have another relatively easy to understand open source framework, Qiskit, which helps us in working with the quantum computers at the level of circuits, pulses, and algorithms. We can take leverage of these free stuffs and, get started with…

Saptashwa Bhattacharyya

PhD, Astrophysics. Using Deep Learning, Searching Dark Matter! https://www.linkedin.com/in/saptashwa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store