Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Quantum Computing with Silq Programming

You're reading from   Quantum Computing with Silq Programming Get up and running with quantum computing with the simplicity of this new high-level programming language

Arrow left icon
Product type Paperback
Published in Apr 2021
Publisher Packt
ISBN-13 9781800569669
Length 310 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Thomas Cambier Thomas Cambier
Author Profile Icon Thomas Cambier
Thomas Cambier
Srinjoy Ganguly Srinjoy Ganguly
Author Profile Icon Srinjoy Ganguly
Srinjoy Ganguly
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Essential Background and Introduction to Quantum Computing
2. Chapter 1: Essential Mathematics and Algorithmic Thinking FREE CHAPTER 3. Chapter 2: Quantum Bits, Quantum Measurements, and Quantum Logic Gates 4. Chapter 3: Multiple Quantum Bits, Entanglement, and Quantum Circuits 5. Chapter 4: Physical Realization of a Quantum Computer 6. Section 2: Challenges in Quantum Programming and Silq Programming
7. Chapter 5: Challenges in Quantum Computer Programming 8. Chapter 6: Silq Programming Basics and Features 9. Chapter 7: Programming Multiple-Qubit Quantum Circuits with Silq 10. Section 3: Quantum Algorithms Using Silq Programming
11. Chapter 8: Quantum Algorithms I – Deutsch-Jozsa and Bernstein-Vazirani 12. Chapter 9: Quantum Algorithms II – Grover's Search Algorithm and Simon's Algorithm 13. Chapter 10: Quantum Algorithms III – Quantum Fourier Transform and Phase Estimation 14. Section 4: Applications of Quantum Computing
15. Chapter 11: Quantum Error Correction 16. Chapter 12: Quantum Cryptography – Quantum Key Distribution 17. Chapter 13: Quantum Machine Learning 18. Other Books You May Enjoy

Defining computational thinking

The title of this book is Quantum Computing with Silq Programming, which means that quantum programming is at the heart of this book, and programming is a discipline that comes from computer science. Quantum computing is essentially a blend of many disciplines, including mathematics, quantum physics, quantum mechanics, and computer science. The concepts of quantum mechanics and physics will be introduced throughout the book as and when required. We have already covered the basic mathematics required for quantum computing, and now we are going to focus on another crucial aspect – computer science.

Computational thinking involves approaches to or methods of problem solving where we utilize ideas from computer science and express the problems and their solutions in such a way that the computer can execute them. This process involves breaking a large problem into smaller parts and then recognizing the pattern present in those small problems, finally developing a step-by-step solution to that problem. This is an efficient process to problem solving where once we convert a real-world complex problem so that a computer can understand it, a computer can then be used to solve the problem. This kind of thinking process is not only important to solve problems in science but is equally beneficial in other fields as well, such as social science, medical science, education, and business.

Computational thinking has four very important characteristics or skills associated with it:

  • Decomposition
  • Pattern recognition
  • Data representation and abstraction
  • Algorithmic design

In this section, we are going to discuss the first three skills, and then in the next section, we will discuss algorithms. Algorithms deserve a separate special section because they are a very significant aspect on their own, and covering them will later help us to understand various quantum algorithms. The algorithms covered here will be basic; discussing anything more advanced is beyond the scope of the book. In the next section, we will start our discussion of decomposition.

Decomposition

Decomposition is the first pillar of the computational thinking process. In the real world, problems are very complex to solve and require a lot of effort to reach a particular solution; therefore, it is much easier to divide a problem into smaller sub-problems and then work on them individually, because smaller ones are usually easier to solve. It may be that the smaller sub-problems are complex in themselves, and in that case, they can be divided into further smaller sub-problems. This process is also known as decomposition.

For example, suppose that you want to develop a mobile banking application so that offline transactions can be shifted completely to online. For this kind of problem, you can start by considering for which platform you would like to make your application, such as Android or iOS. Suppose you chose Android: you would then need to know some programming basics for Android as well. You will also be required to use Android tools to make the app. After all this, you might go about designing the app and its various functionalities step by step to complete the mobile banking application. That would all be a process of decomposition.

Now let's move on to pattern recognition and learn about its usefulness with regard to the computational thinking process.

Pattern recognition

Now we move on to another important pillar of the computational thinking process, pattern recognition. In the previous section, we discussed decomposition, where we divide a big problem into smaller sub-problems and then work on them. Often, we find some kind of pattern in the sub-problems that occurs frequently for most sub-problems. It's helpful to find this pattern to solve the sub-problems. Once we solve it once in one sub-problem, the rest becomes easy, because the same pattern is followed by other sub-problems as well. This then entails a repetitive process that can be followed until the problem is solved.

For example, consider the banking application we mentioned previously. Here, we want to include a feature where people can upload their photo and their proof of identity, and then the application will match the photo provided by the customer and the proof of identity to issue a bank passbook. This is where pattern recognition comes into the picture. The photo-matching technique consists of comparing the various pixels of the customer image with their proof of identity, and this process is repeated until a match of a person is accurately found. This is applied to a large number of customers in the bank who register for their banking application.

We have now looked at the first two pillars of computational thinking. Let's now move on to data representation and abstraction.

Data representation and abstraction

Now we will discuss the third component of the computational thinking process, that is, data representation and abstraction. When we are solving sub-problems, we will often find that some of the details are relevant to solving the problems and others are not. So, the process of data representation and abstraction involves the identification of those characteristics that are relevant to solving the problem and removing those characteristics that are not relevant. This process is also known as abstraction and is one of the most crucial elements in computer science and programming.

Considering the same bank application example, we can apply data representation and abstraction to the problem as explained. Every bank customer who registers for the banking application needs to provide some important details, such as their name, address, phone number, date of birth, income tax details, and email address. Now, in all of this data, there is a possibility that the name, date of birth, or address might be the same for two different customers. To differentiate customers, banks provide a unique account number to each of their customers to represent the data more efficiently so that registration can be performed easily. Also, data such as hobbies and food preferences does not hold any importance and can be filtered out.

There is another aspect of the computational thinking process that includes three characteristics – abstraction, automation, and analysis. These are very similar to the characteristics that we saw in the previous sections. Abstraction involves formulating the problem itself, such as constructing a banking application. Then, we move to automation, where the solution is expressed, such as coding various elements of the bank processes in the application using Android; and finally, we reach analysis, where the solution developed is executed on a computer and then evaluated for performance improvements.

The final pillar of computational thinking, algorithms, is discussed in the next section, as it is a significant part of computational thinking and programming.

You have been reading a chapter from
Quantum Computing with Silq Programming
Published in: Apr 2021
Publisher: Packt
ISBN-13: 9781800569669
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime