An approach to optimizing a variational quantum circuit using a gradient-free optimizer and study the change in cost function with increasing the number of layers in the circuit.

Variational Quantum Circuits (also known as VQC) are basically quantum algorithms consisting of one or more parameterized gates where the gate parameters are trainable. VQC is commonly used in Quantum Machine Learning and many other optimization problems.

As shown in the picture, a VQC starts with initial state preparation (in QML problems, various feature mapping techniques are used for that, whereas it can be left as zero state also as per the…


Introduction

RRAW which stands for “Python Reddit API Wrapper” is a python package that allows simple access to Reddit’s API. It has a well documented official website which can be referred to for code snippets. Here I will discuss steps to install, configure and write some python script to scrape Reddit posts.

Installation & Upgrade

pip install prawpip install --upgrade praw

Requirements

Pandas should be installed previously, which will help to manage and store scraped data in CSV file more easily. If not installed, use the below command to install it.

conda install pandas

Sign Up and Registration

If you already have a Reddit profile, go and log…


Using the same data for both training and testing of a Machine Learning model refrains us from detecting if a model is overfitted or not, as it will certainly behave accurate because of being tested on something it has already seen while training. So we split the data in training and testing set mostly in the 70–30 percent ratio and their names are self-explanatory.

PINAKI SEN

Interested in Machine Learning and Quantum Computing, passionate about learning new technologies, LinkedIn — https://www.linkedin.com/in/senpinaki222/

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