Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
193 views40 pages

Quantum Computing For Beginners

This document serves as a beginner-friendly introduction to quantum computing, covering essential concepts, mathematical foundations, algorithms, hardware, programming tools, and applications. It aims to provide a systematic understanding of quantum principles and challenges, guiding readers from basic to advanced topics. The content includes detailed explanations, examples, and structured chapters to support learning in this rapidly evolving field.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views40 pages

Quantum Computing For Beginners

This document serves as a beginner-friendly introduction to quantum computing, covering essential concepts, mathematical foundations, algorithms, hardware, programming tools, and applications. It aims to provide a systematic understanding of quantum principles and challenges, guiding readers from basic to advanced topics. The content includes detailed explanations, examples, and structured chapters to support learning in this rapidly evolving field.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Quantum Computing For Beginners

Author: Uday Patil

These notes provide a comprehensive and beginner-friendly introduction to quantum


computing, covering fundamental concepts, mathematical foundations, quantum algo-
rithms, hardware technologies, programming tools, and potential applications. Designed
to build a clear and systematic understanding, the material emphasizes both theory and
practical insights, enabling students new to the subject to grasp the exciting principles
til
and challenges of this rapidly evolving field. Through detailed explanations, illustrative
Pa

examples, and carefully structured chapters, these notes aim to guide readers from the
basics of qubits and quantum states to advanced topics such as error correction and
ay

quantum programming, fostering a strong foundation for future study and exploration in
Ud

quantum computing.
© 2025 Uday Patil. All rights reserved.
til
No part of this publication may be reproduced, distributed, or transmitted in any form
Pa

or by any means, without the prior written permission of the author, except as
permitted by copyright law.
ay

For permission requests, contact: [email protected]


Ud

This Notes is a work of educational and informational content intended for learning purposes.
The author disclaim all liability for any direct or indirect damages arising from use of the
material herein.
Quantum Computing Notes 2

Contents
1 Chapter 1: Introduction 5
1.1 What is Quantum Computing? . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Why Do We Need Quantum Computing? . . . . . . . . . . . . . . . . . . 5
1.3 Summary Table: Classical vs Quantum Computing . . . . . . . . . . . . 6

2 Chapter 2: Qubits and Quantum States 6


2.1 What is a Qubit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Superposition Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Bra-Ket (Dirac) Notation . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Bloch Sphere Representation . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Multiple Qubits: Tensor Product . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Entanglement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.7 Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.8 Vectors and Linear Algebra in Quantum States . . . . . . . . . . . . . . 8
2.9 Density Matrices (Advanced, for completeness) . . . . . . . . . . . . . . . 8
2.10 Summary Table: Key Terms and Concepts . . . . . . . . . . . . . . . . . 9
til
Pa

3 Chapter 3: Quantum Gates and Circuits 9


3.1 Introduction to Quantum Gates . . . . . . . . . . . . . . . . . . . . . . . 9
ay

3.2 Single-Qubit Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10


3.3 Multi-Qubit Gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Ud

3.4 Quantum Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


3.5 Mathematical Representation of Circuits . . . . . . . . . . . . . . . . . . 12
3.6 Universality and Decomposition . . . . . . . . . . . . . . . . . . . . . . . 13
3.7 Measurement in Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.8 Quantum Logic vs. Classical Logic . . . . . . . . . . . . . . . . . . . . . 13
3.9 Practical Notes and Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.10 Summary and Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Core Quantum Phenomena 14


4.1 Superposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Entanglement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 Quantum Interference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.4 Decoherence and Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5 Summary and Key Takeaways . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Quantum Algorithms 16
5.1 Introduction to Quantum Algorithms . . . . . . . . . . . . . . . . . . . . 16
Quantum Computing Notes 3

5.2 Why Special Algorithms? . . . . . . . . . . . . . . . . . . . . . . . . . . . 16


5.3 Famous Quantum Algorithms . . . . . . . . . . . . . . . . . . . . . . . . 16
5.4 How Quantum Algorithms Exploit Quantum Phenomena . . . . . . . . . 17
5.5 General Structure of a Quantum Algorithm . . . . . . . . . . . . . . . . 17
5.6 Example: Grover’s Algorithm (Simplified) . . . . . . . . . . . . . . . . . 17
5.7 Quantum Algorithm Summary Table . . . . . . . . . . . . . . . . . . . . 17
5.8 Challenges in Quantum Algorithm Design . . . . . . . . . . . . . . . . . 18
5.9 Practical Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.10 Summary and Key Points . . . . . . . . . . . . . . . . . . . . . . . . . . 18

6 Quantum Computing Hardware 18


6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2 Physical Realizations of Qubits . . . . . . . . . . . . . . . . . . . . . . . 19
6.3 Basic Hardware Components . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.4 Maintaining Quantum Coherence . . . . . . . . . . . . . . . . . . . . . . 19
6.5 Scaling Up Quantum Computers . . . . . . . . . . . . . . . . . . . . . . 20
6.6 Current Hardware Platforms . . . . . . . . . . . . . . . . . . . . . . . . . 20
til
6.7 Quantum Error Correction . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.8 Future Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Pa

6.9 Summary and Key Points . . . . . . . . . . . . . . . . . . . . . . . . . . 21


ay

7 Quantum Programming 22
Ud

7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.2 Quantum Programming Languages and Platforms . . . . . . . . . . . . . 22
7.3 Building a Quantum Program . . . . . . . . . . . . . . . . . . . . . . . . 22
7.4 Basic Example (Pseudocode using Qiskit Syntax) . . . . . . . . . . . . . 22
7.5 Visualization of Quantum Circuits . . . . . . . . . . . . . . . . . . . . . . 23
7.6 Simulators and Cloud Access . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.7 Programming Quantum Algorithms . . . . . . . . . . . . . . . . . . . . . 23
7.8 Challenges in Quantum Programming . . . . . . . . . . . . . . . . . . . . 23
7.9 Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.10 Summary Table: Popular Quantum Programming Tools . . . . . . . . . . 24
7.11 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

8 Applications of Quantum Computing 24


8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
8.2 Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
8.3 Optimization Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.4 Quantum Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.5 Artificial Intelligence and Machine Learning . . . . . . . . . . . . . . . . 26
Quantum Computing Notes 4

8.6 Search and Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 26


8.7 Other Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8.8 Application Summary Table . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.9 Current Limitations and Future Outlook . . . . . . . . . . . . . . . . . . 27

9 Challenges and Future Directions 27


9.1 Major Challenges in Quantum Computing . . . . . . . . . . . . . . . . . 27
9.2 Current Research Directions . . . . . . . . . . . . . . . . . . . . . . . . . 28
9.3 Future Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
9.4 Summary Table: Key Obstacles and Research Trends . . . . . . . . . . . 29
9.5 Key Takeaways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

10 Starting Your Journey in Quantum Computing 30


10.1 Prerequisites and Foundational Knowledge . . . . . . . . . . . . . . . . . 30
10.2 Recommended Learning Path . . . . . . . . . . . . . . . . . . . . . . . . 30
10.3 Useful Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
10.4 Checklist for Beginners . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
10.5 Tips to Succeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
til
10.6 Summary Table: Roadmap to Learning Quantum Computing . . . . . . . 32
Pa

11 Problems and Solutions 32


ay

11.1 Problem 1: Representing Qubit States . . . . . . . . . . . . . . . . . . . 32


11.2 Problem 2: Applying a Quantum Gate . . . . . . . . . . . . . . . . . . . 33
Ud

11.3 Problem 3: Tensor Product of Qubits . . . . . . . . . . . . . . . . . . . . 34


11.4 Problem 4: Measurement Probabilities . . . . . . . . . . . . . . . . . . . 34
11.5 Problem 5: Identify Entanglement . . . . . . . . . . . . . . . . . . . . . . 35
11.6 Problem 6: Constructing a Superposed State . . . . . . . . . . . . . . . . 35
11.7 Problem 7: Action of Hadamard on |1⟩ . . . . . . . . . . . . . . . . . . . 35
11.8 Problem 8: Probability After Several Gates . . . . . . . . . . . . . . . . . 36
11.9 Problem 9: Matrix Representation of CNOT . . . . . . . . . . . . . . . . 37
11.10Problem 10: Orthogonality of Quantum States . . . . . . . . . . . . . . . 37

12 Practice Problems 37
Quantum Computing Notes 5

1 Chapter 1: Introduction
1.1 What is Quantum Computing?
Quantum computing is a new kind of computation that uses the laws of quantum mechan-
ics to process information. Unlike classical computers, which use bits that are either 0 or
1, quantum computers use qubits, which can be in a state of 0, 1, or both simultaneously
thanks to a property known as superposition.
A qubit can be mathematically described as

|ψ⟩ = α|0⟩ + β|1⟩,

where α and β are complex numbers such that |α|2 + |β|2 = 1. When measured, the qubit
collapses to the state |0⟩ with probability |α|2 or to |1⟩ with probability |β|2 .
Quantum computers exploit this and other quantum phenomena like entanglement
and interference to perform computations in ways classical computers cannot.

1.2 Why Do We Need Quantum Computing?


til
Classical computers face significant challenges with certain types of problems because
Pa

their computational power scales linearly with resources. Quantum computers promise
to overcome some of these limitations by leveraging quantum mechanical effects, offering
ay

advantages such as:


Ud

• Exponential speedup in some problems, e.g., factoring large numbers using Shor’s
algorithm.

• Efficient simulation of quantum systems, which is important for chemistry,


material science, and fundamental physics.

• Enhanced search capabilities via algorithms like Grover’s algorithm, which


speeds up unstructured database search.

• Potential breakthroughs in optimization, cryptography, and artificial intelli-


gence.

The power of quantum computing arises from processing many possibilities simultane-
ously through qubits’ superposition and leveraging entanglement to correlate qubits in
non-classical ways, enabling powerful parallel computations that classical bits cannot
replicate.
Quantum Computing Notes 6

1.3 Summary Table: Classical vs Quantum Computing

Aspect Classical Computer Quantum Computer


Basic unit Bit (0 or 1) Qubit (0, 1, or superposition)
State Single definite state Multiple states simultaneously
Computational power Increases linearly Potential exponential increase
Applications General purpose Specialized complex problems
Simulation Difficult for quantum systems Natural and efficient

Quantum computing is an emerging discipline promising to revolutionize computing


by directly harnessing quantum mechanical principles. This introduction has outlined the
motivations and fundamental concepts that make quantum computing both fascinating
and powerful.

2 Chapter 2: Qubits and Quantum States


til
2.1 What is a Qubit?
Pa

A qubit (quantum bit) is the basic unit of quantum information—analogous to a classical


ay

bit, but with more complex behavior due to quantum principles.


Ud

• Classical bit: Can only be 0 or 1.

• Qubit: Can be |0⟩, |1⟩, or any quantum superposition of these two states.

Mathematically, a general qubit state is written as

|ψ⟩ = α|0⟩ + β|1⟩,

where α and β are complex numbers called amplitudes, and the probabilities must add
up to 1:
|α|2 + |β|2 = 1.

Physical realization: Qubits can be built from photons, electrons, atoms,


or superconducting circuits. The “0” and “1” can represent properties like
different polarizations, charge states, or energy levels.

2.2 Superposition Principle


Superposition means a qubit can exist simultaneously in both states |0⟩ and |1⟩ until
measured. This is a core quantum mechanic, enabling powerful computations.
Quantum Computing Notes 7

• If |ψ⟩ = √12 |0⟩ + √12 |1⟩, the qubit is “half-half” and measurement yields |0⟩ or |1⟩
with 50% chance each.

• This property enables quantum parallelism—multiple possible computations at


once.

2.3 Bra-Ket (Dirac) Notation


Quantum states are commonly notated using bras and kets:

• |0⟩, |1⟩ are “kets” (column vectors), representing the pure states.

• ⟨0|, ⟨1| are “bras” (row vectors), used for calculations like inner products.
" # " #
1 0
• Example: |0⟩ = , |1⟩ = .
0 1

2.4 Bloch Sphere Representation


Every single-qubit state can be visualized on the Bloch Sphere:
til
Pa

• North pole: |0⟩

• South pole: |1⟩


ay

• All other points: various superpositions


Ud

• Any pure state:    


θ iϕ θ
|ψ⟩ = cos |0⟩ + e sin |1⟩
2 2
with 0 ≤ θ ≤ π and 0 ≤ ϕ < 2π

2.5 Multiple Qubits: Tensor Product


Combining multiple qubits forms larger quantum systems. Their states use the tensor
product.
Two Qubits:
|ψ⟩ = α00 |00⟩ + α01 |01⟩ + α10 |10⟩ + α11 |11⟩

where |00⟩ = |0⟩ ⊗ |0⟩, etc.

• Four complex numbers needed for two qubits (subject to normalization).

• Number of state components doubles with each new qubit.


Quantum Computing Notes 8

2.6 Entanglement
Some multi-qubit states cannot be separated into individual qubit states—these are en-
tangled.
Example: Bell State
1
|Φ+ ⟩ = √ (|00⟩ + |11⟩)
2
Measurement of one qubit instantly reveals the state of the other, regardless of distance.

2.7 Measurement
Measuring a qubit “collapses” its state to |0⟩ or |1⟩, with probabilities |α|2 and |β|2 .
General rule:

• Before measurement: |ψ⟩ = α|0⟩ + β|1⟩

• After measurement: State is |0⟩ (with |α|2 probability) or |1⟩ (with |β|2 probability).

• Measurement destroys the superposition.


til
2.8 Vectors and Linear Algebra in Quantum States
Pa

Quantum states are vectors in a Hilbert space (complex vector space with inner product).
ay

• State vector:
Ud

" #
α
|ψ⟩ =
β

• Normalization:
|α|2 + |β|2 = 1

• Inner product: For |ϕ⟩ = γ|0⟩ + δ|1⟩,

⟨ψ|ϕ⟩ = α∗ γ + β ∗ δ

2.9 Density Matrices (Advanced, for completeness)


Density matrices represent quantum systems in general (including “mixed” states).

ρ = |ψ⟩⟨ψ|

For mixed states (probabilistic combinations of pure states), the density matrix is a
weighted sum.
Quantum Computing Notes 9

2.10 Summary Table: Key Terms and Concepts


Concept Explanation
Qubit Quantum bit; state is |ψ⟩ = α|0⟩ + β|1⟩
Superposition Qubit can be both 0 and 1 at once
Measurement Collapses qubit to either |0⟩ or |1⟩
Bloch Sphere Geometric representation of a single-qubit
state
Tensor Product Mathematical way to combine multiple
qubits
Entanglement States where qubits are inseparably linked
Dirac Notation Compact math shorthand: |0⟩, ⟨1| etc.

Practice/Checklist:

• Express simple quantum states using vectors and Dirac notation.

• Visualize single-qubit states on the Bloch Sphere.


til
• Calculate probabilities of measurement outcomes.
Pa

• Understand the tensor product for combining qubits.


ay

• Recognize an entangled state.


Ud

3 Chapter 3: Quantum Gates and Circuits


3.1 Introduction to Quantum Gates
Quantum gates are the fundamental operations in quantum computation—analogous to
logic gates in classical computing but acting on qubits. Gates are reversible and described
mathematically as unitary matrices.

• Single-qubit gates: Act on individual qubits.

• Multi-qubit gates: Operate on two or more qubits, enabling entanglement and


complex operations.

Quantum gates manipulate qubits by rotating their state on the Bloch Sphere or by
creating entanglement. Every computation in quantum computers is built from sequences
of these gates.
Quantum Computing Notes 10

3.2 Single-Qubit Gates


Identity Gate: Leaves the qubit unchanged.
" #
1 0
I=
0 1

Pauli Gates:

• X (NOT) gate: " #


0 1
X=
1 0
Flips |0⟩ to |1⟩ and vice versa.

• Y gate: " #
0 −i
Y =
i 0

• Z gate: " #
1 0
til
Z=
0 −1
Pa

Hadamard Gate (H): Creates superposition from |0⟩ or |1⟩.


ay

" #
1 1 1
Ud

H=√
2 1 −1

1
H |0⟩ = √ (|0⟩ + |1⟩)
2
Phase Gate (S): " #
1 0
S=
0 i
Summary Table: Common Single-Qubit Gates
Quantum Computing Notes 11

Gate Matrix Action


 
1 0
I   Identity
0 1
 
0 1
X   Bit-flip (NOT)
1 0
 
0 −i
Y   Bit and phase flip
i 0
 
1 0
Z   Phase flip
0 −1
 
1 1
H √1   Superposition
2
1 −1
 
1 0
S   Phase shift
0 i
til
3.3 Multi-Qubit Gates
Pa

These gates involve two or more qubits:


ay

• CNOT Gate (Controlled-NOT):


Ud

 
1 0 0 0
 
0 1 0 0
 
CNOT = 



0 0 0 1
 
0 0 1 0

- Flips the target qubit if and only if the control qubit is |1⟩. - Essential for creating
entanglement.

• Controlled-Z (CZ) Gate:


 
1 0 0 0
 
0 1 0 0
 
CZ = 



0 0 1 0
 
0 0 0 −1
Quantum Computing Notes 12

• SWAP Gate:  
1 0 0 0
 
0 0 1 0
 
SWAP = 



0 1 0 0
 
0 0 0 1

- Swaps the states of two qubits.

3.4 Quantum Circuits


A quantum circuit is a sequence of quantum gates applied to a set of qubits. Circuits
are often drawn to visualize how quantum information evolves.

Symbol Meaning
|q⟩ Qubit line (horizontal wire)
• Control qubit
⊕ Target qubit for CNOT
til
H Hadamard gate
Pa

Example: Creating Entanglement


ay

To entangle two qubits:


Ud

1. Apply an H gate to the first qubit: puts it in superposition.

2. Apply a CNOT gate with the first as control, second as target.

Resulting state:
1
√ (|00⟩ + |11⟩)
2
This is a Bell state—maximally entangled!

3.5 Mathematical Representation of Circuits


- Each gate is a matrix. - The entire circuit is represented by a product of these matrices.
- The initial state vector is multiplied by the matrices in sequence to get the output state.
Example: Simple Circuit

Final State = Un Un−1 · · · U2 U1 |ψin ⟩

where Ui are the gate matrices.


Quantum Computing Notes 13

3.6 Universality and Decomposition


A set of gates is universal if any quantum operation can be approximated using combi-
nations from the set. Example: {H, T, CN OT } is a universal gate set.

3.7 Measurement in Circuits


At the end of a quantum circuit, qubits are measured:

• Collapses qubits to classical results (0 or 1).

• Probabilities are determined by the square modulus of the qubit amplitudes just
before measurement.

3.8 Quantum Logic vs. Classical Logic


Property Classical Gates Quantum Gates
Reversible? Only some (e.g., NOT) All quantum gates are reversible
til
Representation Boolean algebras Unitary matrices
Pa

Entanglement? No Yes
Superposition? No Yes
ay

3.9 Practical Notes and Tools


Ud

• Quantum circuits can be simulated and tested using online platforms like IBM
Quantum Experience and Qiskit.

• Practice building circuits for superposition, entanglement, and basic algorithms.

• Drawing circuits can be done in LATEX using packages like qcircuit or quantikz.

3.10 Summary and Checklist


• Understand matrices representing each gate.

• Construct quantum circuits from basic gates.

• Know how to create and measure entangled states.

• Compare quantum vs. classical logic operations.

• Try decomposing multi-qubit operations into basic gates.


Quantum Computing Notes 14

This chapter covers the essential building blocks for quantum computation: gates and
circuits, which serve as the foundation for all algorithms and hardware in the quantum
computing realm.

4 Core Quantum Phenomena


4.1 Superposition
Superposition is one of the fundamental principles of quantum mechanics, essential for
quantum computing. It allows a qubit to be in a combination of states simultaneously,
rather than being restricted to a definite state like a classical bit.
Mathematically, a single qubit state can be expressed as

|ψ⟩ = α|0⟩ + β|1⟩,

where α and β are complex probability amplitudes satisfying


til
|α|2 + |β|2 = 1.
Pa

The coefficients α and β represent the probabilities that when the qubit is measured, it
ay

will collapse to the state |0⟩ or |1⟩, respectively.


Superposition enables quantum parallelism, meaning a quantum computer can process
Ud

multiple possible inputs simultaneously, which is a key reason quantum computers can
outperform classical ones in certain tasks.

4.2 Entanglement
Entanglement is a uniquely quantum phenomenon where two or more qubits become
linked such that the state of one qubit instantaneously affects the state of the other(s),
regardless of the distance between them. This correlation cannot be explained by classical
physics.
For two qubits |ψ⟩ and |ϕ⟩, an entangled state cannot be written as a simple tensor
product of their individual states. For example, the Bell state:

1
|Φ+ ⟩ = √ |00⟩ + |11⟩

2

is entangled. Measurement of one qubit determines the state of the other immediately.
Entanglement is crucial for many quantum algorithms and quantum communication
protocols, such as quantum teleportation and superdense coding.
Quantum Computing Notes 15

4.3 Quantum Interference


Quantum interference arises because probability amplitudes (complex numbers) can add
constructively or destructively, affecting the likelihood of different measurement out-
comes.
When quantum states evolve, amplitudes linked to various paths can interfere, rein-
forcing some outcomes and cancelling others. Quantum algorithms exploit interference
to amplify correct answers and suppress wrong ones.

4.4 Decoherence and Noise


Decoherence refers to the loss of quantum coherence—when a qubit interacts with its
environment, it loses its quantum properties, effectively turning a quantum state into a
classical probabilistic mixture.
Decoherence causes errors in quantum computations and limits the time qubits can
retain their quantum information. Minimizing decoherence through error correction and
improved hardware is a major challenge in building practical quantum computers.

Phenomenon Description
til
Superposition A qubit exists in multiple states at once, enabling par-
Pa

allelism.
Entanglement Strong non-classical correlations between qubits.
ay

Quantum Interference Probability amplitudes combine to enhance or reduce


Ud

measurement probabilities.
Decoherence Loss of quantum properties due to environment interac-
tion; main source of errors.

Table 1: Core Quantum Phenomena

4.5 Summary and Key Takeaways


• Quantum superposition allows qubits to encode multiple possibilities simultane-
ously.

• Entanglement creates strong correlations that are essential for quantum advantage.

• Interference is used by algorithms to extract correct answers with higher probability.

• Decoherence is a fundamental obstacle that must be managed to maintain reliable


quantum computation.

These phenomena form the foundation upon which quantum algorithms and quantum
hardware operate. Understanding them is crucial for grasping how and why quantum
computers differ fundamentally from classical ones.
Quantum Computing Notes 16

5 Quantum Algorithms
5.1 Introduction to Quantum Algorithms
Quantum algorithms are step-by-step computational procedures that use quantum gates
and circuits to solve specific problems, often providing speed-ups over the best-known
classical algorithms. They leverage quantum properties such as superposition, entangle-
ment, and interference to achieve their advantages.

5.2 Why Special Algorithms?


Quantum computers work fundamentally differently from classical ones. Therefore, prob-
lems need to be reformulated to fully exploit quantum resources. Some algorithms demon-
strate exponential or quadratic speed-ups over classical alternatives.

5.3 Famous Quantum Algorithms


Shor’s Algorithm
til
• Purpose: Efficient factoring of large integers.
Pa

• Significance: Breaks widely-used classical cryptography (RSA).

• How it works: Uses quantum Fourier transform (QFT) and period finding to
ay

factor numbers exponentially faster than classical algorithms.


Ud

Grover’s Algorithm
• Purpose: Searches an unsorted database or solves “black box” problems.

• Speed-up: Quadratic speed-up (classical: O(N ), quantum: O( N )).

• Key steps: Superposition, oracle marking solutions, and repeated amplitude am-
plification.
Quantum Fourier Transform (QFT)
• Role: Core in many quantum algorithms, similar to the classical discrete Fourier
transform but operates on quantum states.

• Application: Phase estimation, part of Shor’s algorithm.


Deutsch–Jozsa Algorithm
• Purpose: Determines if a function is constant or balanced with just one function
query.

• Quantum advantage: Exponential separation over classical deterministic algo-


rithms.
Quantum Computing Notes 17

5.4 How Quantum Algorithms Exploit Quantum Phenomena


• Superposition: Allows evaluating multiple possibilities in parallel.

• Interference: Combines computational paths so that correct answers are amplified


and incorrect ones cancelled out.

• Entanglement: Synchronizes the behavior of qubits for cooperative behaviour and


efficient computation across the register.

5.5 General Structure of a Quantum Algorithm


1. Prepare qubits in a specific initial state, often |0⟩⊗n .

2. Apply a series of quantum gates to create superpositions and entanglements.

3. Employ oracles or subroutines for problem-specific tasks (e.g., marking solutions).

4. Use interference to amplify correct solution states.

5. Measure the qubits, collapsing them into classical bits with probabilities determined
til
by the computation.
Pa

5.6 Example: Grover’s Algorithm (Simplified)


ay

• Start with n qubits in the state |0⟩⊗n .


Ud

• Apply Hadamard gates to achieve equal superposition.

• Use an oracle that marks the desired state by flipping its phase.

• Amplify the marked state’s amplitude with the Grover diffusion operator.

• Repeat the oracle and amplification steps ∼ N times.

• Measure: the solution appears with high probability.

5.7 Quantum Algorithm Summary Table

Algorithm Problem Solved Quantum Speed-up Classical Time


Shor’s Integer factorization Exponential Exponential
Grover’s Database search Quadratic Linear
Deutsch-Jozsa Function identification Exponential Exponential
QFT Fourier transform Exponential for application Polynomial
Quantum Computing Notes 18

5.8 Challenges in Quantum Algorithm Design


• Quantum algorithms must avoid ”collapsing” the quantum state prematurely.

• Many quantum speed-ups are for specialized problems, not all computational tasks.

• Designing oracles (black-box subroutines) for many real-world tasks is non-trivial.

• Error correction and noise remain significant engineering hurdles.

5.9 Practical Notes


• Many quantum algorithms can be studied and simulated with simple quantum
circuit simulators.

• The field is growing and includes quantum algorithms for optimization, chemistry,
machine learning, and communication.

5.10 Summary and Key Points


til
• Quantum algorithms are essential for harnessing quantum hardware.
Pa

• Famous algorithms (like Shor’s and Grover’s) demonstrate clear quantum advan-
tage.
ay

• Quantum speed-up depends heavily on exploiting superposition, interference, and


Ud

entanglement.

• Practical realization still faces challenges due to noise and error rates.

Mastering quantum algorithms is crucial for anyone seeking to understand the power and
limitations of quantum computing.

6 Quantum Computing Hardware


6.1 Introduction
Quantum computers require special hardware to create, control, and measure qubits,
and to preserve their unique quantum properties. This chapter introduces the physical
principles and engineering challenges behind quantum computing devices.
Quantum Computing Notes 19

6.2 Physical Realizations of Qubits


Qubits can be physically implemented in several different systems, each with its own
advantages and challenges:

• Superconducting qubits: Tiny circuits built from superconducting material;


information is encoded in different current or voltage states.

• Trapped ions: Individual ions (electrically charged atoms) are suspended and
manipulated with lasers. States correspond to different energy levels.

• Photonic qubits: Quantum information stored in single photons using their po-
larization or path.

• Spin qubits: Use the magnetic (spin) state of electrons, often trapped in semicon-
ductor devices (quantum dots).

• Topological qubits: Hypothetical qubits using exotic quasiparticles (anyons); still


primarily in the research phase.
til
6.3 Basic Hardware Components
Pa

• Qubit register: Holds and manipulates quantum information.


ay

• Quantum gates: Physical devices (microwaves, lasers) that implement quantum


Ud

operations.

• Measurement hardware: Converts quantum states to classical outcomes (e.g.,


photodetectors, fluorescence monitors).

• Control electronics: Precisely time and sequence gates, often requiring fast clas-
sical computers and real-time feedback.

• Cryogenic systems: Superconducting and some spin qubits require ultra-low


temperatures (near absolute zero) to minimize noise and interference.

6.4 Maintaining Quantum Coherence


Quantum states are fragile and can quickly decohere (lose their quantum behavior) due
to:

• Interaction with the environment: Heat, vibration, electromagnetic noise, and


stray atoms can disrupt quantum states.

• Imperfect hardware: Control errors from imprecise pulses or cross-talk.


Quantum Computing Notes 20

Solutions:

• Shielding, vacuum chambers, and intense cooling.

• Advanced fabrication to minimize defects.

• Fast operation to complete computations before coherence is lost.

6.5 Scaling Up Quantum Computers


Building large, useful quantum computers faces several challenges:

• Connecting many qubits: As qubit numbers increase, so do sources of error and


crosstalk.

• Error correction: Physical qubits are unreliable; error correction requires encod-
ing “logical qubits” into many physical qubits.

• Fabrication and integration: Creating reliable, identical qubits at scale demands


precision nanotechnology.
til
• Readout and control: Handling measurements and gate operations quickly and
Pa

accurately for thousands or millions of qubits.


ay

6.6 Current Hardware Platforms


Ud

Platform Advantages Challenges Example Companies


Superconducting circuits Fast, scalable Cooling, coher- IBM, Google, Rigetti
ence
Trapped ions Long coher- Slow gates, IonQ, Honeywell
ence, high scaled lasers
fidelity
Photonic qubits Operate at Single photon Xanadu, PsiQuantum
room temp, control
communica-
tions
Spin qubits Compatible Fabrication, Intel, UNSW
with silicon short coher-
ence

Table 2: Major Quantum Hardware Approaches


Quantum Computing Notes 21

6.7 Quantum Error Correction


Because quantum information is so delicate, error correction is essential:

• Physical qubits are error-prone.

• Logical qubits use groups of physical qubits to encode one error-protected bit of
quantum information.

• Algorithms like the surface code are designed for practical error protection.

Quantum error correction adds significant overhead—hundreds or thousands of phys-


ical qubits per logical qubit may be needed for large-scale, reliable machines.

6.8 Future Directions


• Hybrid quantum-classical systems: Integrate quantum chips as accelerators in
conventional supercomputers.

• Room-temperature quantum devices: Research on materials and protocols to


til
avoid cryogenics.
Pa

• Novel qubit designs: Developing more robust, scalable, or easily integrated quan-
ay

tum hardware.
Ud

6.9 Summary and Key Points


• Quantum computers require specialized hardware and extreme environments to
realize qubits.

• Many different physical systems can serve as qubits, each with strengths and weak-
nesses.

• Scaling up to thousands of reliable qubits remains a key engineering hurdle.

• Error correction and noise-resilience are critical for practical quantum computing.

• The field is rapidly evolving, combining advances from physics, engineering, and
materials science.

Hardware innovations are vital to making quantum computers useful for real-world
applications. Understanding these challenges and progress helps explain why quantum
computing is both difficult and promising.
Quantum Computing Notes 22

7 Quantum Programming
7.1 Introduction
Quantum programming translates quantum algorithms into instructions that a quantum
computer can execute. It introduces special programming languages, platforms, and tools
to create and test quantum circuits.

7.2 Quantum Programming Languages and Platforms


• Qiskit: Open-source Python framework by IBM for quantum circuit design and
execution.

• Q#: Microsoft’s quantum programming language integrated with Visual Studio


and Azure.

• Cirq: Google’s Python library for designing, simulating, and running quantum
circuits. l
• Others: PyQuil (Rigetti), Braket (Amazon), and more.
ti
Pa

7.3 Building a Quantum Program


A basic quantum program contains these steps:
ay
Ud

1. Initialize qubits, usually to |0⟩.

2. Apply quantum gates, transforming the qubit states (superposition, entangle-


ment, etc.).

3. Run the circuit, possibly many times (shots), to collect statistics on output.

4. Measure, collapsing quantum states to classical bits for analysis.

7.4 Basic Example (Pseudocode using Qiskit Syntax)


from qiskit import QuantumCircuit, execute, Aer

qc = QuantumCircuit(2) # Two qubits


qc.h(0) # Put first qubit in superposition
qc.cx(0, 1) # Entangle qubits (CNOT)
qc.measure_all() # Measure both

backend = Aer.get_backend(’qasm_simulator’)
Quantum Computing Notes 23

result = execute(qc, backend, shots=1024).result()


counts = result.get_counts()
print(counts)

7.5 Visualization of Quantum Circuits


Many platforms provide circuit visualization. For example, the above code produces a
circuit diagram:

q 0: —H—o— (H = Hadamard, o = control of CNOT)


q 1: ——-X—— (X = target of CNOT)

7.6 Simulators and Cloud Access


• Use simulators to test circuits before running them on real hardware.

• Many companies (IBM, Microsoft, Amazon, Google) offer cloud-based quantum


computers accessible through free or paid accounts.
til
7.7 Programming Quantum Algorithms
Pa

Quantum programming platforms help users:


ay

• Construct quantum circuits gate by gate.


Ud

• Define oracles and custom subroutines.

• Simulate error and noise effects.

• Visualize intermediate and final states.

• Collect and analyze measurement statistics.

7.8 Challenges in Quantum Programming


• Limited qubit numbers and high error rates in current hardware restrict large
programs.

• Debugging quantum programs is subtle since measurement collapses states—careful


simulation and visualization are needed.

• Hybrid algorithms often use both classical and quantum steps (e.g., variational
quantum eigensolver).
Quantum Computing Notes 24

7.9 Best Practices


• Start with simulators before moving to real hardware to avoid noise issues.

• Modularize quantum programs—write reusable functions for common operations.

• Measure often and analyze output probability distributions, not single run results.

• Use version control and notebooks to manage code and results.

7.10 Summary Table: Popular Quantum Programming Tools


Platform Language Notable Features
Qiskit Python Circuits, simulation, real hardware access (IBM)
Q# Q# language Visual Studio, Azure integration
Cirq Python Google hardware, circuit simulation
PyQuil Python Quil language, Rigetti hardware
Braket Python Unified AWS platform
til
Pa

7.11 Conclusion
Quantum programming bridges the gap between theory and implementation, enabling
ay

users to build, test, and run quantum algorithms on actual machines. Getting hands-
Ud

on with these tools is vital for any student or practitioner aiming to master quantum
computing in practice.

8 Applications of Quantum Computing


8.1 Introduction
Quantum computing has the potential to revolutionize various fields by dramatically
increasing computational speed and enabling tasks that are infeasible for classical com-
puters. This chapter provides an overview of the most promising application areas for
quantum computers.

8.2 Cryptography
• Breaking Cryptosystems: Quantum algorithms like Shor’s can factor large in-
tegers efficiently, threatening widely-used RSA and ECC encryption.
Quantum Computing Notes 25

• Quantum-Safe Cryptography: The advent of quantum computers motivates


the development of new cryptographic schemes (post-quantum cryptography) that
are safe against both classical and quantum attacks.

• Quantum Key Distribution (QKD): Uses quantum principles for uncondition-


ally secure communication. Any attempt to eavesdrop on quantum keys can be
detected via the disturbance introduced.

8.3 Optimization Problems


Many problems in science, engineering, transportation, and business involve finding an
optimal solution among a vast set of possibilities:

• Portfolio optimization in finance

• Traveling salesman and logistics

• Machine learning (training and inference)

• Scheduling and resource allocation


til
Pa

Quantum computers—especially with Grover’s and quantum approximate optimiza-


tion algorithms (QAOA)—offer potential speedups or better solutions.
ay
Ud

8.4 Quantum Simulation


Simulating quantum systems (atoms, molecules, chemical reactions, materials) is ex-
tremely challenging for classical computers due to the exponential growth of complexity.

• Chemistry and Material Science: Model chemical reactions, catalytic pro-


cesses, and new materials at the quantum level.

• Drug Discovery: Simulate molecular interactions and protein folding to accelerate


design of new drugs.

• Fundamental Physics: Explore new states of matter, quantum phases, and par-
ticle behavior.

This is considered one of the “killer apps” of quantum computing.


Quantum Computing Notes 26

8.5 Artificial Intelligence and Machine Learning


Several quantum algorithms promise to enhance machine learning and AI:

• Quantum-enhanced training: Algorithms that optimize parameters or find data


patterns faster.

• Quantum neural networks: Model quantum data, improve adaptive learning,


or process cryptographically secure data.

• Large-scale data analysis: Speed up principal component analysis, clustering,


and optimization cores.

8.6 Search and Data Analysis


Quantum algorithms like Grover’s provide a quadratic speedup for searching unsorted
data, which underpins applications such as:

• Database search
til
• Pattern recognition
Pa

• Big data analysis


ay

8.7 Other Applications


Ud

• Quantum sensing: Ultra-precise measurement of time, fields, and fundamental


constants.

• Quantum communication: Secure networking protocols and quantum internet


research.

• Weather and climate modeling: Simulate complex systems for more accurate
predictions.

• Optimization in transportation and network routing


Quantum Computing Notes 27

8.8 Application Summary Table


Domain Example Use Quantum Benefit
Cryptography Codebreaking, secure comms Breaks classical, enables QKD
Chemistry/Materials Simulation, discovery Accurate, fast modeling
Optimization Scheduling, logistics Better/faster solutions
AI/Machine Learning Training, inference Speedup for models
Search/Data Database scans Quadratic speedup

8.9 Current Limitations and Future Outlook


• Hardware constraints: Practical applications are limited until larger, error-
corrected quantum computers are available.

• Noise sensitivity: Most algorithms must be adapted to “noisy intermediate-scale


quantum” (NISQ) devices.

• Hybrid approaches: Some near-term value is expected from hybrid classical-


til
quantum algorithms.
Pa

Outlook: As hardware improves, quantum computers are likely to become crucial


ay

for tasks involving complex systems, secure communication, and optimization, with the
greatest short-term impact expected in quantum simulation and cryptography.
Ud

Exploring these applications guides both the research focus and real-world adoption of
quantum technologies.

9 Challenges and Future Directions


9.1 Major Challenges in Quantum Computing
Despite tremendous progress, quantum computing faces several significant challenges:

• Qubit Stability (Decoherence): Quantum states are fragile and can become
disrupted by even minimal interaction with their environment, leading to loss of
information.

• Error Rates and Noise: Quantum operations are prone to errors due to imperfect
control and environmental interference. Error rates are much higher than in classical
computers.

• Error Correction Overhead: Quantum error correction requires encoding a log-


ical qubit into many physical qubits, greatly increasing hardware requirements.
Quantum Computing Notes 28

• Scalability: Building and controlling large numbers of high-quality qubits is com-


plex. Most current devices manage tens to low hundreds of qubits; practical appli-
cations may require thousands or millions.

• Hardware Limitations: Each physical platform (superconducting, trapped ion,


photonic, spin, etc.) has unique engineering and physics obstacles to large-scale
implementation.

• Algorithm Development: Many high-impact quantum algorithms exist for spe-


cialized problems, but creating new algorithms for broader use is difficult and on-
going.

• Integration with Classical Systems: Quantum computers will likely operate


alongside classical supercomputers, which requires seamless data transfer, hybrid
programming models, and workflow integration.

9.2 Current Research Directions


• Improved Qubit Coherence: New materials, designs, and isolation techniques
til
are being developed to increase the lifetime of quantum states.
Pa

• Better Error Correction and Fault Tolerance: Researchers are enhancing


error-correcting codes and protocols to lower the overhead and make large, fault-
ay

tolerant quantum computers more feasible.


Ud

• Scaling Architectures: Modular and networked approaches (like using photonic


interconnects) are being explored to connect many small devices into larger quantum
processors.

• Noisy Intermediate-Scale Quantum (NISQ) Devices: Focus on making the


best use of current, imperfect machines with algorithms that tolerate noise and
errors, extracting value before full error correction is practical.

• Hybrid Quantum-Classical Algorithms: These combine quantum and classical


processing (as in variational quantum eigensolvers and hybrid optimizers) to solve
useful problems on today’s hardware.

• Discovery of New Quantum Algorithms: Ongoing research aims to expand


the suite of algorithms showing quantum advantage beyond factoring, search, and
simulation.

• Standardization and Software Development: Efforts are underway to create


robust, user-friendly programming languages, compilers, debuggers, and develop-
ment platforms.
Quantum Computing Notes 29

9.3 Future Outlook


• Short-Term (Present to 5 Years): Further improvement of NISQ devices,
demonstration of useful quantum advantage in simulation, optimization, or chem-
istry.

• Medium-Term (5 to 15 Years): Fault-tolerant quantum computers with thou-


sands of logical qubits; practical quantum applications in industry and science;
broader adoption and accessible cloud platforms.

• Long-Term (15+ Years): Fully mature quantum computing, revolutionizing


fields such as cryptography, material science, drug design, logistics, and artificial
intelligence.

9.4 Summary Table: Key Obstacles and Research Trends


Challenge Research Direction
Qubit decoherence Better isolation, new materials, faster
gates
til
Error rates Improved control, more robust error-
Pa

correction codes
ay

Scalability Modular designs, networked quantum


processors, photonic connections
Ud

Limited algorithms Discovery of new applications and


quantum algorithms
Integration with classical Co-design of software and hybrid com-
puting pipelines

9.5 Key Takeaways


• Quantum computing is in an exciting “early adopter” phase, with real progress but
also substantial engineering and scientific barriers.

• Useful, error-corrected machines at scale are still years away, but research and
investment are accelerating.

• The future of quantum computing will likely involve a combination of newly engi-
neered hardware, deeper theoretical insights, and creative new algorithms.

Understanding the challenges and developments in quantum computing helps you


appreciate both the promise and the hard work needed to make quantum computers a
transformative technology.
Quantum Computing Notes 30

10 Starting Your Journey in Quantum Computing


10.1 Prerequisites and Foundational Knowledge
To embark on quantum computing study, it’s helpful to have a foundational understand-
ing of certain topics:

• Mathematics:

– Linear algebra (vectors, matrices, eigenvalues)


– Complex numbers (operations, modulus, phase)
– Basic probability theory (probabilities, distributions)

• Physics: High-school level quantum mechanics or familiarity with key principles


(optional but helpful)

• Programming: Python is commonly used for quantum programming (Qiskit,


Cirq, etc.), so basic Python knowledge is recommended.
til
10.2 Recommended Learning Path
Pa

1. Learn Quantum Fundamentals


ay

• Study superposition, entanglement, and quantum measurement.


Ud

• Practice bra-ket notation and visualizing states on the Bloch sphere.

2. Master Quantum Gates and Circuits

• Understand how gates manipulate qubits.


• Build and analyze simple quantum circuits diagrammatically and mathemati-
cally.

3. Explore Quantum Algorithms

• Study famous algorithms like Deutsch–Jozsa, Grover’s, and Shor’s.


• Simulate their operation with hand calculations or circuit simulators.

4. Get Hands-On with Quantum Programming

• Use platforms like IBM Quantum Experience, Qiskit, Cirq, or Q#.


• Write and execute simple quantum programs, starting with state preparation
and basic algorithms.

5. Stay Current and Go Deeper


Quantum Computing Notes 31

• Read recent articles, follow major institutions (IBM, Google, universities).


• Engage in online courses, workshops, and quantum communities.

10.3 Useful Resources


• Online Courses:

– IBM Quantum Learning (Qiskit Textbook)


– “Introduction to Quantum Computing” (edX, Coursera, FutureLearn)

• Books:

– ”Quantum Computation and Quantum Information” by Nielsen and Chuang


(comprehensive)
– ”Quantum Computing for Computer Scientists” by N. Yanofsky and M. Man-
nucci (beginner-friendly)

• Web Tools and Simulators:


til
– IBM Quantum Experience (online circuits and actual hardware)
Pa

– Qiskit.org and Qiskit Textbook


ay

– Quantum Inspire (QuTech)


Ud

• Communities:

– Stack Exchange Quantum Computing


– Qiskit and Cirq Slack/Discord channels
– Social media groups and academic forums focused on quantum tech

10.4 Checklist for Beginners


• Can you explain the concepts of qubit, superposition, and entanglement in your
own words?

• Have you built or simulated a simple quantum circuit (e.g., Bell state creator)?

• Did you try running a quantum algorithm on a simulator or real device?

• Are you familiar with some current research and development trends in quantum
computing?
Quantum Computing Notes 32

10.5 Tips to Succeed


• Focus on concept understanding before deep mathematics.

• Practice regularly: small code experiments and circuit exercises help you learn
faster.

• Don’t hesitate to use visualizations for state evolution and circuit operation.

• Collaborate, share, and ask questions in quantum communities.

• Be patient—quantum computing is a rapidly evolving and challenging field, but


foundational skills learned today will be useful for years to come.

10.6 Summary Table: Roadmap to Learning Quantum Com-


puting

Step Description
til
Quantum Principles Learn superposition, entanglement, measurement
Pa

Linear Algebra Basics Vectors, matrices, eigenvalues, tensor product


Quantum Circuits Gates, circuit diagrams, simple computations
ay

Quantum Algorithms Study and model key algorithms (Deutsch–Jozsa, Grover’s, Shor’s)
Ud

Programming Practice Simulate and run circuits (Qiskit, Cirq, Q#)


Advance and Network Courses, books, communities, current research

With steady effort, curiosity, and hands-on practice, you will develop both theoretical
understanding and practical skill in quantum computing!

11 Problems and Solutions


11.1 Problem 1: Representing Qubit States
Problem: Express the qubit state
r
1 2
|ψ⟩ = √ |0⟩ + |1⟩
3 3

as a vector in C2 . Verify that the state is normalized.


Quantum Computing Notes 33

Solution: Using the standard basis,


   
1 0
|0⟩ =   , |1⟩ =   ,
0 1

so   r    
√1
1 1 2 0  3 
|ψ⟩ = √   + = q  .
3 0 3 1 2
3

Check normalization:
2
r 2
1 2 1 2
√ + = + = 1,
3 3 3 3

thus normalized.

11.2 Problem 2: Applying a Quantum Gate


Problem: Given the qubit state
til
Pa

1 1
|ϕ⟩ = √ |0⟩ + √ |1⟩,
2 2
ay

apply the Pauli-Z gate to |ϕ⟩ and write the resulting state vector.
Ud

Solution: The Pauli-Z gate is


 
1 0
Z= .
0 −1

Express |ϕ⟩ as a vector:


     
1 1 1 0 1 1
|ϕ⟩ = √   + √   = √   .
2 0 2 1 2 1

Apply Z:      
1 0 1 1
Z|ϕ⟩ =   √1   = √1   .
0 −1 2 1 2 −1

This corresponds to the state


1
√ (|0⟩ − |1⟩).
2

Quantum Computing Notes 34

11.3 Problem 3: Tensor Product of Qubits


Problem: Compute the tensor product of the two qubits:

|ψ⟩ = |0⟩ + |1⟩, |ϕ⟩ = |0⟩ − |1⟩

with normalization ignored for simplicity.


Solution: First, write vectors:
   
1 1
|ψ⟩ =   , |ϕ⟩ =   .
1 −1

The tensor product |ψ⟩ ⊗ |ϕ⟩ is:


   
1·1 1
       
1 1 1 · (−1) −1
   
 ⊗ =  =  .
   
1 −1  1·1   1 
   
til
1 · (−1) −1
Pa

Corresponding to the 2-qubit state:


ay

|00⟩ − |01⟩ + |10⟩ − |11⟩.


Ud

11.4 Problem 4: Measurement Probabilities


Problem: A qubit is in the state

3 4
|ψ⟩ = |0⟩ + |1⟩.
5 5

Calculate the probability of measuring |0⟩ and |1⟩.


Solution: Probabilities are the square of the amplitude magnitudes:
2
3 9
P (0) = = = 0.36,
5 25

2
4 16
P (1) = = = 0.64.
5 25

Quantum Computing Notes 35

11.5 Problem 5: Identify Entanglement


Problem: Determine if the two-qubit state

1
|Φ⟩ = √ (|00⟩ + |11⟩)
2

is entangled or separable.
Solution: Try to write |Φ⟩ = |α⟩ ⊗ |β⟩.
Suppose
|α⟩ = a0 |0⟩ + a1 |1⟩, |β⟩ = b0 |0⟩ + b1 |1⟩,

then
|α⟩ ⊗ |β⟩ = a0 b0 |00⟩ + a0 b1 |01⟩ + a1 b0 |10⟩ + a1 b1 |11⟩.

For |Φ⟩, the coefficients for |01⟩ and |10⟩ are zero, so:

a0 b1 = 0, a1 b0 = 0.

This implies either a0 = 0 or b1 = 0 and a1 = 0 or b0 = 0 simultaneously, which is


til
impossible without making the state the zero vector. Since no solution exists, |Φ⟩ cannot
Pa

be factorized, so it is entangled.

ay

11.6 Problem 6: Constructing a Superposed State


Ud

Problem: Write a qubit state that, when measured, yields |0⟩ with probability 0.8 and
|1⟩ with probability 0.2. Express the state in vector form.
Solution: Let |ψ⟩ = α|0⟩ + β|1⟩. Probabilities are |α|2 = 0.8 and |β|2 = 0.2.
√ √
Choose α = 0.8 ≈ 0.894 and β = 0.2 ≈ 0.447 (taking real, positive values).
 
0.894
|ψ⟩ ≈ 0.894|0⟩ + 0.447|1⟩ =  
0.447

11.7 Problem 7: Action of Hadamard on |1⟩


Problem: What is the result when the Hadamard gate is applied to |1⟩? Express the
result in Dirac notation and as a vector.
Quantum Computing Notes 36

Solution: Hadamard gate:


 
1 1 1
H=√ 
2 1 −1

 
0
Apply to |1⟩ =  :
1

    
1 1 1 0 1
H|1⟩ = √     = √1  
2 1 −1 1 2 −1

Thus,
1
H|1⟩ = √ (|0⟩ − |1⟩)
2

11.8 Problem 8: Probability After Several Gates


til
Pa

Problem: A qubit starts in |0⟩. It is passed through the following gates: Hadamard
(H), then Z, then H again. What is the probability of measuring |0⟩ at the end?
ay

Solution: Stepbystep:
1
Ud

1. Start: |0⟩ =  
0
 
1
2. After H: H|0⟩ = √12  
1
3. After Z:    
1 1 1 1
Z√   = √  
2 1 2 −1

4. After H again:
       
1 1 1 1 1 − 1 1 0 0
H √   = √ √  = =
2 −1 2 2 1+1 2 2 1

Result: Final state is |1⟩. Probability of measuring |0⟩ is 0; probability of |1⟩ is 1.



Quantum Computing Notes 37

11.9 Problem 9: Matrix Representation of CNOT


Problem: Write the matrix form of the CNOT gate acting on two qubits. Which basis
states are affected by the CNOT?
Solution: The CNOT (control = qubit 1, target = qubit 2) matrix is:
 
1 0 0 0
 
0 1 0 0
 
CNOT = 



0 0 0 1
 
0 0 1 0

The CNOT flips the target qubit if the control is |1⟩. So: - |00⟩ → |00⟩ - |01⟩ → |01⟩ -
|10⟩ → |11⟩ - |11⟩ → |10⟩

11.10 Problem 10: Orthogonality of Quantum States


Problem: Are the states |ψ1 ⟩ = |0⟩ and |ψ2 ⟩ = √12 (|0⟩ + |1⟩) orthogonal? Compute their
til
inner product.
Pa

Solution:  
1
ay

|ψ1 ⟩ =  
0
Ud

 
1 1
|ψ2 ⟩ = √  
2 1
 
h i 1 1 1 1 1
⟨ψ1 |ψ2 ⟩ = 1 0 · √   = √ · 1 + √ · 0 = √
2 1 2 2 2

Since the inner product is not zero, the states are not orthogonal.

12 Practice Problems
1. Basic Qubit State: Write the qubit state corresponding to a 30% probability
of measuring |0⟩ and 70% probability of measuring |1⟩. Express it in both Dirac
notation and vector form.

2. Gate Application: Apply the Hadamard gate H to the qubit |0⟩. What is the
resulting state? Write down the vector and show the probabilities of measuring |0⟩
and |1⟩.
Quantum Computing Notes 38

3. Tensor Product Calculation: Calculate the tensor product of |+⟩ = √1 (|0⟩+|1⟩)


2
and |−⟩ = √12 (|0⟩ − |1⟩). Write the resulting 2-qubit state.

4. Entanglement Check: Determine if the two-qubit state

1
|Φ⟩ = (|00⟩ + |01⟩ + |10⟩ + |11⟩)
2

is entangled or separable. Justify your answer.

5. Measurement Probability: A qubit has state



2 i 5
|ψ⟩ = |0⟩ + |1⟩.
3 3

Verify normalization and compute the exact probabilities of measuring |0⟩ and |1⟩.

6. Matrix Multiplication: Given:


til
   
0 1 0.6
X= , |ψ⟩ =   ,
Pa

1 0 0.8
ay

calculate X|ψ⟩.
Ud

7. Create Bell State Circuit: Describe a sequence of gates to create the Bell state
|Φ+ ⟩ = √12 (|00⟩ + |11⟩) from initial state |00⟩ using single-qubit and CNOT gates.

8. Interpret Bloch Sphere Angles: Given a qubit state


π  π 
|ψ⟩ = cos |0⟩ + eiπ/3 sin |1⟩,
4 4

identify the angles θ and ϕ representing this state on the Bloch sphere.

9. CNOT Action: If the control qubit is |1⟩ and the target qubit is √12 (|0⟩ + |1⟩),
write the combined initial state and the resulting state after applying the CNOT
gate.

10. State Orthogonality: Check whether the states


r r
1 2 2 1
|ψ⟩ = √ |0⟩ + |1⟩, |ϕ⟩ = |0⟩ − √ |1⟩
3 3 3 3
Quantum Computing Notes 39

are orthogonal by computing their inner product.

Bibliography
1. Nielsen, M. A., & Chuang, I. L. (2010). Quantum Computation and Quantum
Information (10th Anniversary Edition). Cambridge University Press.

2. Yanofsky, N. S., & Mannucci, M. A. (2008). Quantum Computing for Computer


Scientists. Cambridge University Press.

3. IBM Quantum. (n.d.). https://quantum-computing.ibm.com/

4. Watrous, J. (2018). The Theory of Quantum Information. Cambridge University


Press.

5. Qiskit Textbook. (2024). Learn Quantum Computation using Qiskit. https://


qiskit.org/textbook/

6. Preskill, J. (1998). Lecture Notes for Physics 229: Quantum Information and Com-
til
putation. California Institute of Technology.
Pa

7. Montanaro, A., & Campbell, E. (2021). Introduction to Quantum Computing. Uni-


versity of Bristol Lecture Notes.
ay
Ud

8. Schumacher, B., & Westmoreland, M. D. (2010). Quantum Processes, Systems, and


Information. Cambridge University Press.

9. Wikipedia contributors. (2025, July). Quantum Computing. In Wikipedia, The


Free Encyclopedia. Retrieved from https://en.wikipedia.org/wiki/Quantum_
computing

You might also like