Pennylane Tutorials Need to be Explored.

Basic Qubit rotation:

Quantum Gradients with BackPropagation.

Plugins and Hybrid Device.

Turning Keras Layers into Quantum Layers!

Algos and DS from Python-Cook Book(David beaz)

Question: You have -element Tuple of Sequence that you have to un-pack into N number of variables.

Question: You have to unpack N-element of tuple or sequence into collection of variables which are less than N. (basically overcome too many values to unpack!)

Question: You have to keep limited history of last few items of iteration or some kind of processing. (Basically tail version of Linux)

Question: Find largest or smallest elements from a sequence, find top 3 , top 10 or smallest 3 or smallest 10

Question: Create a Priority Queue which sorts items based on priority assigned and always return item with highest priority.

Question: Create a dictionary that maps keys to more than one value, aka multidict.

Question: You want to create a dictionary, and you also want to control the order of items when
iterating or serializing.

Question: You want to perform various actions like sort, min value, ma value on dict data.

Question: You have two dictionaries and want to find out what they might have in common (same
keys, same values, etc.).

Question: Remove duplicate values from sequence but preserve it’s order.


Your program has become an unreadable mess of hardcoded slice indices and you want
to clean it up.


You have a sequence of items, and you’d like to determine the most frequently occurring
items in the sequence.


You have a list of dictionaries and you would like to sort the entries according to one
or more of the dictionary values.

Questions: Sort object of Class but they don’t support comparison operatoins!

You want to sort objects of the same class, but they don’t natively support comparison

Question: Implement a Groupby in python.

You have a sequence of dictionaries or instances and you want to iterate over the data
in groups based on the value of a particular field, such as date.

Question: Filter a list in Sequence.

You have data inside of a sequence, and need to extract values or reduce the sequence
using some criteria.

Question: You want to make a dictionary that is subset of another dictionary.

You want to make a dictionary that is a subset of another dictionary.


You have code that accesses list or tuple elements by position, but this makes the code
somewhat difficult to read at times. You’d also like to be less dependent on position in
the structure, by accessing the elements by name.


You need to execute a reduction function (e.g., sum() , min() , max() ), but first need to
transform or filter the data.


You have multiple dictionaries or mappings that you want to logically combine into a
single mapping to perform certain operations, such as looking up values or checking
for the existence of keys.

UPSC Books (Cont.)

  1. Indian polity by Lakshamikant
  2. A brief history of Modren india, Rajiv Ahir
  3. NCERT (6th to 10th social science and science)
  4. india after gandhi or india ince independence (main events in the book)
  5. Certificate Physical and Human geography (part 1, part 2 weather and climate>
  6. Atlas Oxfoard or BlackSwan
  7. indian ecoomy by sanjiv verma or ramesh singh
    8 Environment and ecology, 20 vdeos at unacademy
  8. Economic Survey latest edition(make lots nd lots of note, V v.important!!)
    10.lexicon book
    hindu Daily,
    yozna mantri
    previous year Question papers

Tasks Related to Penny-lane Work

  1. Under-Stand Device Operations and Observables: pennylane/devices/
  2. Continuous-Variable-Quantum Operations: pennylane/ops/
  3. Quantum-Channels : pennylane/ops/
  4. Discreate-Variable-Quantum-Operations: pennylane/ops/
  5. Quantum-Tapes: pennylane/tape
  6. Quantum Gradient Transforms: pennylane/gradients
  7. Quantum optimisers: pennylane/gradients
  8. QNode, Devices and Quntum-tape Transformers : pennylane/transforms

CRI-O(Container Runtime Interface)

CRIO for Kubernetes is what JRE for Java.

1. Kubernetes connects to kubelet to launch a POD.
POD: Pod is single bock for Kubernetes consisting of one or more container, sharing the same IPC, NET and PID namespaces and living in the same cgroup

2. Kubelet forwards the request to CRIO demon via CRI to launch new POD.

3. CRIO uses the container’s image library to pull the image from the container’s registry.  

4. downloaded image gets unpacked in container’s root file-system.(Just like we install some OS)  

5. after the rootfs is created CRI-O generates the OCI(Open Container interface) specification json-file explaining how to run Container.

6. Each container is maintained by a “conmon” process, it does monitoring,logging and handling PTY for the container.  

7. Networking for the pod is setup through use of CNI(Container network interface)

Now What is CNI and why do we need it?

 CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted.

Application containers on Linux are a rapidly evolving area, and within this area networking is not well addressed as it is highly environment-specific.


After reading the above, the following makes more sense.

Some more Aspects Kubernetes!!

  1. RepicationControler: it is “kind” of kubernetes which is responsible to take care about number of replications to use for service, container-image, Container-port, Service-name
  2. Service: It is responsible to make your Custer talk to outside world, It could be loadBalance, or Proxy service.

Now something a little more about Networking!!

  1. Cluster_IP-> it is the most basic type of service, An IP is assigned to service so Other services Could use this Service. Outside word can talk to your POD but wil have to go through some sort of PROXY!!
  2. TargetPort-> It allows you to separate the port from where you want to expose your service and where it is actually running inside container!!
  3. Nodeport-> it’s bit special and coulb be little scary as well but just hang-tight, nodeport makes service available to each node via statis port, so assume ou have three nodes, IP1, IP2, IP3 each are having same service running inside, You will assign some port number say 8081 and each node will be accessible on same port using Node’s IP and port. something like:

IP1:8081, IP2:8081, IP3:8081

4. ExternalIP: Another approach to making a service available outside of the cluster is via External IP addresses.

5. LoadBalancer: When running in the cloud, such as EC2 or Azure, it’s possible to configure and assign a Public IP address issued via the cloud provider. This will be issued via a Load Balancer such as ELB. This allows additional public IP addresses to be allocated to a Kubernetes cluster without interacting directly with the cloud provider.

For more one can follow following POST on linkedin!

Understanding YAML in-Depth!!

Basically there are three parts of Every YAML file.

  1. MetaData(we define it)
  2. spec (specifications) (we define that too)
  3. state(that depennds on kubernetes brain!! which is “etcd!”)

rest is version and kind, version define which API version we are going to use and kind defines the type of deployment or POD we are going to implement here/!!

When you use the Kubernetes API to create the object (either directly or via kubectl), that API request must include that information as JSON in the request body. Most often, you provide the information to kubectl in a .yaml file. kubectl converts the information to JSON when making the API request.


Metadata: It helps uniquely to understand an object,  in

cluding a name string, UID, and optional namespace

spec – What state you desire for the object

to be continued –>

RUn Nginx in Kubernetes (Deployment and Scaling replicas) Part-2

apiVersion: apps/v1
kind: Deployment
  name: nginx-deployment
    app: nginx
  replicas: 3
      app: nginx
        app: nginx
      - name: nginx
        image: nginx:1.7.9
        - containerPort: 80

Take above yaml file as an example.

Now run Following command to create Deployment.

kubectl create -f nginx-depoy.yaml

Ways to check your pod has been Created or not.

khangura@metal-machine:~$ kubectl get pod

hello-minikube-6ddfcc9757-k7qqv 1/1 Running 0 24h
nginx-deployment-5d59d67564-57sk7 1/1 Running 0 2m3s
nginx-deployment-5d59d67564-6d9t8 1/1 Running 0 2m3s
nginx-deployment-5d59d67564-bpsrj 1/1 Running 0 2m3s

We can always Update the deployment like increase/scale number of replicas.

Use following to update the Deployment.

kubectl edit deployment nginx-deployment # it will use our basic editor

Kubernetes Basics(pods creation and understanding)

Create a Cluster Using MiniKube:

start your Cluster:

$ minikube start # start your Kubernetes cluster

$ kubectl get po -A # get list of all pods and your cluster.

Get to know your cluster.

(base) khangura@metal-machine:~$ kubectl get po -A
kube-system coredns-74ff55c5b-zxngm 1/1 Running 1 66d
kube-system etcd-minikube 1/1 Running 1 66d
kube-system kube-apiserver-minikube 1/1 Running 4 66d
kube-system kube-controller-manager-minikube 1/1 Running 1 66d
kube-system kube-proxy-dgvds 1/1 Running 1 66d
kube-system kube-scheduler-minikube 1/1 Running 1 66d
kube-system storage-provisioner 1/1 Running 14 66d
kubernetes-dashboard dashboard-metrics-scraper-c95fcf479-th7gh 1/1 Running 1 66d
kubernetes-dashboard kubernetes-dashboard-6cff4c7c4f-pvs5r 1/1 Running 10 66d

Remember each different service name has different significance.

etcd-minicube – etcd is configuration management system.

apiserver-minicube – for your cluster to interact with clients.

controller-manager-minikube : – A cluster manager node.

there is much ore deep to each node, Need to follow docs to understand things into more deep dive, Right-Now need to remember that Each unit of POD plays significant role in the structure of Cluster.

$ minikube dashboard # To start minikube Dashboard and to analyse how things are going.

$ kubectl create deployment hello-minikube

Create a Sample deploymen, Remember that, You can’ expose Pods You need to expose deployent to external posrts.

$ kubectl expose deployment hello-minikube --type=NodePort --port=8080

Link with external port.

You can check status of your deployment.

 $ kubectl get services hello-minikube

Use kubectl to forwrd your port.

$ kubectl port-forward service/hello-minikube 7080:8080