Should You Learn Cirq or Qiskit for Quantum Programming?

preview_player
Показать описание
What should be your first quantum programming language or library? Usually, people ask me about Qiskit and Cirq. Now of course there are other programming libraries and languages, and I've done some videos on them which you can check out on this channel, and I'll be making more tutorials, so subscribe.

But here I'm going to cover some of the similarities, differences, pros and cons, and also go through some learning resources and how to find interesting papers and projects that you can do, for both Cirq and Qiskit, to help you decide which to learn.

0:00 Quantum Coding!
0:34 What I Use
0:49 Similarities
1:43 Differences in Hardware Access
2:58 Quantum Algorithm Packages
3:09 Tensorflow Quantum
4:24 Qiskit Aqua
5:33 Resources for Qiskit
6:30 Cirq Learning
7:03 Projects
9:11 My Use Cases

Be a channel member to support my videos!
or on Patreon:

So first let's start with the similarities of Qiskit and Cirq. They are both Python libraries, and they are both gate based languages.

And both are open source! So you can fork either one, and contribute to it publicly, or build upon it.

One major difference between the two is access to real quantum hardware.

Google right now does not provide access to their quantum hardware, while IBM does - they provide up to 15 qubit chips for public access, for free.

Now, should this stop you from using Cirq? It's definitely cool to say you ran a circuit on a real quantum chip.

However, since public access is limited to 15 qubits, if you want to use more than 15 qubits, you'll have to fall back to the simulator using Qiskit as well.

IBM's general simulator can go up to 32 qubits (they have more specific simulator types with more qubits, but you'll be using the general)

Google's simulators go up to 30 qubits on the high performance external simulators. They also mention that the simulator can do more, but RAM doubles with each additional qubits, so I'm not sure that's a hard 30 qubit limit.

Now, to no one's surprise - one huge benefit Cirq has is Tensorflow Quantum and working on the quantum machine learning side.

TensorFlow Quantum focuses on quantum data and building hybrid quantum-classical models. It combines the quantum computing algorithms from Cirq, and mashes them with Traditional Tensorflow.

The tutorials cover Hello, Many Worlds, the traditional MNIST classification, and then moves into quantum convolutional neural networks. This quantum data tutorial is important, to build intuition for how you load and represent data when using quantum computing.

Qiskit has a package called Aqua that gives you use of algorithms for even above having to deal with it at the gate level. Aqua stands for Algorithms for QUantum Applications.

So it has some pre-built algorithms for:
Chemistry
Finance
Machine Learning and
Optimization

You can check out the tutorials and also look at the official documentation, because they provide a lot of examples for different projects done with Qiskit. The Optimization section covers problems like Traveling Salesman. With the finance section you can deep dive into pricing options, credit risk analysis, and portfolio optimization. You can also look at machine learning and chemistry applications.

So now that you have an idea of where to find resources for learning each library, Let's talk about some cool papers you can implement. So again since these quantum computing libraries are gate based, you can try them on the other hardware. That may be a good exercise - take a paper written using Qiskit and implement it using Cirq, or vice versa!

Another quick tip for finding papers to replicate is to look up the researchers who work on these projects on Google scholar. So you can see what papers they've published using their own hardware and pick from there!

Don't overanalyze, pick one and get started. The concept you learn about quantum with transfer, and the rest is SMOP (small matter of programming) and syntax.

Disclaimer: Affiliate links may be used in my recommendations! If you buy through my links I provide, I may receive a portion of the sale amount. This doesn't change the price you pay.

#qiskit #cirq #quantumprogramming
Рекомендации по теме
Комментарии
Автор

I'm currently a high schooler and I'm thinking about doing a senior research project on quantum neuroevolutionary optimization of neural networks. Watching this keeps me motivated. Rn I'm going through some introductory quantum mechanics textbooks and the Qiskit quantum computing textbook, and so far, it's been pretty approachable. Thanks for this great content!

imsleepy
Автор

9:11 Comments about Microsoft Q# (QDK)

As far as I know, the QDK forces you to write only the quantum circuit part in Q#.
That is, you can write the other part, such as handlers, in Python.

sanori-cs
Автор

I'm still new to field of computer science/ Software engineering, and I love your channel for giving insightful view of what is ahead of in the future of data science.

seanjoe
Автор

Definitely a great video for beginners in Quantum Computing to decide among frameworks.

I feel like Tensorflow Quantum being implemented on Cirq Circuits gives very less flexibility to tweak with the model which takes away the beauty of Quantum computing and makes it more similar to classical machine learning, which is definitely good for developers but not so good for Quantum researchers, I think.

Otherwise Qiskit and Cirq both are quite similar.
But I prefer Pennylane above both of them, it gives a different level of flexibility in QML problems 🤩🤩.

P.S. - It's my personal experience and can vary from person to person. 😅😅

pinakisen
Автор

I am using the qiskit textbook and after studying it. I found out that people with less background in linear algebra and python will find it a little bit tough especially for doing mathematical proofs for each algorithm. But, overall it's one of the good resources available on the internet for getting started with quantum computing.

therockriders
Автор

Can’t thank you enough, great content! I’m very interested in the field (having both physics and CS background) and was about asking about Q# but covered in the end.

ibrab.
Автор

I suppose you could always go with both. One advantage I've heard about with Cirq that I'm not sure Qiskit has is the ability to function with qudits, or higher-level qubits.

mjkalasky
Автор

Wow, this is an amazing video! I find it great how you communicate so clearly quantum computing topics. Anyone can see how excited you're talking about those. I must confess that, before knowing your channel, I truly believed one could only learn QC with a master/PhD degree. It isn't easy (actually still pretty hard), but at least seems a little more achievable. I want to start studying soon thanks to your recommendations. Hope one day to be part of the awesome QC community!

JohnnySpider
Автор

Always looking forward to your videos. Make videos on quantum simulation and recommend some books on that topic plz. Love your content and ur head bobbing.

bkkavin
Автор

I've only heard of qiskit, and I like it, this is first time I hear about cirq, so I did a quick search, and there's no tutorials, no nothing. and sure, you don't want to queue for a quantum computer, but you wanna know you can run some code on quantum computer. so seems that winner is clear at this point. it's like qiskit has landed on the moon, mars, and pluto, while cirq is like "you have to pay to see my rocket"

mimosveta
Автор

This is an excellent video. Well done Anastasia!

BrandonDriver
Автор

This is a good overview. Thanks!
I have used mostly qiskit up to now and find it easy to learn. I like the qiskit textbook, although it is a little dense in places. I have not really used cirq before so I would like to become more familiar with it

TheCJD
Автор

Could you make an updated version of this topic?😊

myjoybox
Автор

Сборник задач по физике and it seems that there is a Курс по аналитической геометрии и ленейной алгебре. At least I see words Курс and алгебра published by "Наука". Your videos are very informative!

andreioleynik
Автор

Woah, this is very informative! btw, IBM just released Qiskit Metal for simulating superconducting qubits, have you tried that yet?

shivanshusiyanwal
Автор

Good old Сборник Задачник по Физике, I have the same one. The book is savior :) great video!!

khusanakramkhodjaev
Автор

Excellent content, very interesting 👍👍

miguelonex
Автор

Awesome video, I first got introduced to Quantum Computing with Qiskit textbook, I love the fact it was a jupyter notebook I could perform experiment with it but after chapter one it became confusing.

I am currently implementing Quantum tic-tac-toe by Allan Goff although it does not use a Quantum simulator/computer, it is still a fascinating project to work on and game to play.

jacobyoung
Автор

That book you have "Working effectively with legacy code". Any good ?

devsauce
Автор

I read Qiskit textbook until Chapter 3 (my background: engineering student, have experience in programming, no experience in QM or QC). I think the difficulty of the textbook goes up exponentially after Chapter 2.

TheinLinAung