Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learn Quantum Computing with Python and IBM Quantum
  • Toc
  • feedback
Learn Quantum Computing with Python and IBM Quantum

Learn Quantum Computing with Python and IBM Quantum

By : Robert Loredo
close
Learn Quantum Computing with Python and IBM Quantum

Learn Quantum Computing with Python and IBM Quantum

By: Robert Loredo

Overview of this book

IBM Quantum Lab is a platform that enables developers to learn the basics of quantum computing by allowing them to run experiments on a quantum computing simulator and on several real quantum computers. Updated with new examples and changes to the platform, this edition begins with an introduction to the IBM Quantum dashboard and Quantum Information Science Kit (Qiskit) SDK. You will become well versed with the IBM Quantum Composer interface as well as the IBM Quantum Lab. You will learn the differences between the various available quantum computers and simulators. Along the way, you’ll learn some of the fundamental principles regarding quantum mechanics, quantum circuits, qubits, and the gates that are used to perform operations on qubits. As you build on your knowledge, you’ll understand the functionality of IBM Quantum and the developer-focused resources it offers to address key concerns like noise and decoherence within a quantum system. You’ll learn how to monitor and optimize your quantum circuits. Lastly, you’ll look at the fundamental quantum algorithms and understand how they can be applied effectively. By the end of this quantum computing book, you'll know how to build quantum programs and will have gained a practical understanding of quantum computation that you can apply to your business.
Table of Contents (18 chapters)
close
14
Other Book You May Enjoy
15
Index

Chapter 4 – Understanding Basic Quantum Computing Principles

Question 1

How would you create a circuit that entangles two qubits where each qubit is different (that is, 01, 10)?

Answer

We can use the following code to create a circuit that entangles two qubits:

qc = QuantumCircuit(2,2)
qc.h(0)
qc.x(1)
qc.cx(0,1)
qc.measure([0,1], [0,1])
qc.draw()

Question 2

Create a circuit with a multi-qubit gate, such as a controlled-Hadamard gate.

Answer

The circuit will just need to be ensured to have two qubits and include a controlled Hadamard gate (ch). In the following example, the first qubit is the control and the second qubit is the target. We add a Hadamard gate to the control qubit to ensure we will get either a 0 or 1; otherwise, the control will never be set:

qc = QuantumCircuit(2,2)
qc.h(0)
qc.ch(0,1)
qc.draw()

Question 3

Create all 4 Bell states in a circuit.

Answer

The circuit will just need to have two qubits and include...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete