Module 3-BPHYS102
Module 3-BPHYS102
Module 3-BPHYS102
Quantum Computing:
Principles of Quantum Information & Quantum Computing:
Introduction to Quantum Computing, Moore‘s law & its end, Differences between Classical &
Quantum computing. Concept of qubit and its properties. Representation of qubit by Bloch
sphere. Single and Two qubits. Extension to N qubits.
Dirac representation and matrix operations:
Matrix representation of 0 and 1 States, Identity Operator I, Applying I to|0⟩and |1⟩ states, Pauli
Matrices and its operations on |0⟩and |1⟩states, Explanation of i) Conjugate of a matrix and ii)
Transpose of a matrix. Unitary matrix U, Examples: Row and Column Matrices and their
multiplication (Inner Product), Probability, and Quantum Superposition, normalization rule.
Orthogonality, Orthonormality. Numerical Problems
Quantum Gates:
Single Qubit Gates: Quantum Not Gate, Pauli – X, Y and Z Gates, Hadamard Gate, Phase Gate
(or S Gate), T Gate
Multiple Qubit Gates: Controlled gate, CNOT Gate, (Discussion for 4 different input states).
Representation of Swap gate, Controlled -Z gate, Toffoli gate.
Pre requisites: Matrices
Self-learning: Moore’s law
Quantum information is problem solving and data processing using a quantum system as the
information carrier, rather than binary ‗1‘s and ‗0‘s used in conventional computation. Quantum
information systems could be able to transmit data that is fundamentally secure and solve
problems that are beyond the power of modern computers.
Source: https://www.nature.com
1
There are several models of quantum computation with the most widely used being quantum
circuits, which are based on the quantum bit "qubit". Qubit is somewhat analogous to the bit in
classical computation. Qubits can be in a 1 or 0 quantum state, or they can be in
a superposition of the 1 and 0 states. However, when qubits are measured the result of the
measurement is always either a 0 or a 1; the probabilities of these two outcomes depend on
the quantum state that the qubits were in immediately prior to the measurement. Any quantum
computation algorithm can be represented as a network of quantum logic gates.
Source: Wikipedia
Moore’s law & its end: Moore's Law states that the number of transistors on a microchip
doubles about every two years, though the cost of computers is halved. In 1965, Gordon E.
Moore, the co-founder of Intel, made this observation that became known as Moore's Law.
Moore's Law implies that computers, machines that run on computers, and computing power all
become smaller, faster, and cheaper with time, as transistors on integrated circuits become more
efficient. Experts agree that computers should reach the physical limits of Moore's Law at some
point in the 2020s.The high temperatures of transistors eventually would make it impossible to
create smaller circuits. This is because cooling down the transistors takes more energy than the
amount of energy that already passes through the transistors. Shrinking transistors have
powered advances in computing for more than half a century, but soon engineers and scientists
must find other ways to make computers more capable. Instead of physical processes,
applications and software may help improve the speed and efficiency of computers. Cloud
computing, wireless communication, the Internet of Things (IoT), and quantum computing all
may play a role in the future of computer tech innovation.
Source: https://www.investopedia.com/terms/m/mooreslaw.asp
2
Differences between classical & quantum computing
Quantum computers will soon be able to tackle certain types of problems — especially those
involving a daunting number of variables and potential outcomes, like simulating drug
interactions or optimizing supply chain logistics — much faster than any classical computer.
Some key differences between quantum computers and classical computers include:
2. A quantum computer‘s power grows exponentially in relation to the number of qubits linked
together. This differs from a conventional computer, which sees its power increase in direct
proportion to the number of transistors. This is one reason why quantum computers could
eventually handle some types of calculations much better than classical computers.
3. Though quantum computers could drastically outperform classical computers at some tasks —
such as optimizing delivery routes or simulating a chemical reaction — they are difficult to build
and there are lots of types of calculation where they aren‘t expected to offer many advantages.
As such, most everyday processing will likely be better handled by conventional computers even
when powerful quantum computers begin to emerge.
Source:https://www.cbinsights.com/research/quantum-computing-classical-computing-comparison-infographic/
3
Source: https://www.educative.io/blog/intro-to-quantum-computing
Quantum superposition and the concept of qubit
Classical computers are based on ―bits‖ – imagine them as little switches pointing to either a 1 or
a 0. Quantum computing relies on quantum bits, or ―qubits‖, which can also represent a 0 or a 1.
Qubits can also achieve a mixed state, called a ―superposition‖ where they are both 1 and 0 at the
same time. This ambiguity – the ability to both ―be‖ and ―not be‖ – is key to the power of
quantum computing. Two bits in classical computer can be in four possible states (00, 01, 10, or
11), but only one of them at any time. This limits the computer to processing one input at a time.
In a quantum computer, two qubits can also represent the exact same four states (00, 01, 10, or
11). The difference is, because of superposition, the qubits can represent all four at the same
time. If one adds more bits to a regular computer, it can still only deal with one state at a time.
But as one add qubits, the power of the quantum computer grows exponentially. If we have ―n‖
qubits, we can simultaneously represent 2n states. But to get that exponential speed-up, the fate
of all the qubits has to be linked together in a process called quantum entanglement. To make a
4
qubit, we need an object that can attain a state of quantum superposition between two states. An
atomic nucleus is one kind of qubit. The direction of its magnetic moment (it‘s ―spin‖) can point
in different directions, say up or down with respect to a magnetic field.
Source:https://cosmosmagazine.com/science/quantum-computing-for-the-qubit
curious/#:~:text=Quantum%20computing%20relies%20on%20quantum,the%20power%20of%20quantum%20computing.
Properties of a qubit:
(ii) If measurements are carried out with a qubit in superposed state then the results that we get
will be probabilistic (not deterministic as we get in bits in classical computer).
(iii) Owing to the quantum nature, the qubit changes its state at once when subjected to
measurement implying that one cannot copy information from qubits the way we do it in the
present day computers, as there will be no similarity between the copy and the original. This is
known as no-cloning principle.
Bloch sphere is a physical representation of all possible qubit states. Each qubit is in its essence a
vector on Bloch‘s sphere. Each vector on the sphere can be represented in two basis: θ and 𝜑.
The first is θ which is the angle between the vector and the z-axis. The second is 𝜑 which is the
angle between the vector and the positive x-axis measuring counter-clockwise. We can achieve
all possible vectors in the Bloch sphere using these two angles, even with limits on them. θ is
between 0 and π, inclusive. 𝜑 is between 0 and 2π, inclusive.
5
“Equation” for a single qubit: Qubits are in the notation |> in order to distinguish them from
normal bits.
|ψ⟩=cos(θ/2)|0⟩+sin(θ/2)𝑒 𝑖𝜑 |1⟩
The z-axis represents |0⟩ and |1⟩ —these are analogous to the North and South pole of Earth
where the North is |0⟩ and South is |1⟩ — and thus, any vector that is not directly |0⟩ or |1⟩ would
account for some superposition of both. In terms of the equation, |0⟩ would be θ=0 and 𝜑 doesnot
matter. Similarly, |1⟩ would be θ=π and 𝜑 would also be irrelevant. While on the z-axis, the z-
axis is 0 and 1 and these represent actual values as a classical bit does, the other axes do not.
Source: https://you.stonybrook.edu/qcomputing/2018/07/06/bloch-sphere/
Figure above shows an example of a qubit. The quantum system has a spin-up state to be taken
as 1, and a spin down state to be taken as 0. It also has a state of superposition of the above
mentioned two states at equal probability. This superposed state corresponds to a mixed state
effectively representing a horizontally oriented spin.
With two such qubits, (figure below) the four states of two ordinary bits can be taken at once and
represented as one state
If we consider a register composed of 3 classical bits, then the register can store only one out of 8
possible configurations given by 000, 001, 010, 011, 100, 101, 110, 111. But 3 qubits can store
all eight number in a quantum superposition. If we keep adding qubits to the register we increase
its capacity exponentially ie. 4 qubits can store 16 different numbers. Using N qubits any of 2N
states can be formed with just one state. Hence, it becomes possible to perform super-parallel
processing of problems which need to have 2N inputs. With the increase in the number of qubits,
the effect grows exponentially.
6
Source: Source: Current Trends In Engg. Applications
---------------------------------------------------------------------------------------------------------------------
Linear algebra: Linear algebra is the study of vector spaces and of linear operations on those
vector spaces. A deeper understanding of linear algebra is a must to understand quantum
mechanics. The standard quantum mechanical notation (Dirac notation) for a quantum state ψ in
a vector space is |𝜓>. The notation |.> indicates that the abstract mathematical object which is
associated with the physical entity, the quantum state, is a state vector. |.> is called ket vector.
Examples of ket vectors |𝜓>, |𝑢>, |𝑣>, |𝜑>,…
Basis and linear independence: A spanning set for a vector space is a set of vectors |𝑣1 >,
|𝑣1 >,…, |𝑣𝑛 > such that any vector |𝑣> in the vector space can be written as a linear combination
of vectors in that set
Matrix representation: The state vectors |0> and |1> can be written as column vectors (a
matrix with only one column)
1 0
|0> = |1> = (3.2)
0 1
These are called column vectors since they have single column.
For n=2, from (1), the representation of the vector notation of quantum states becomes
where |𝑣 >, |𝑣1 >, |𝑣2 > are ket vectors that can be represented as column matrices.
1
|𝑣1 > =
0
0
|𝑣2 > =
1
1 0
|𝑣> = 𝛼1 + 𝛼2
0 1
𝛼1
This on matrix addition becomes |𝑣> = 𝛼
2
7
Any vector |𝑣 > in C2 can be expressed as a linear combination of vectors |𝑣1 > and |𝑣2 > and
hence vectors |𝑣1 > and |𝑣2 > span vector space C2. In general, a vector space Cn can have
many different spanning sets. Another spanning set for C2 is the set
1 1 0
|𝑣1 > = |𝑣2 > =
2 1 1
𝛼1
Since an arbitrary vector|𝑣>= 𝛼 can be a linear combination of |𝑣1 >, |𝑣2 >
2
𝑎1 + 𝑎2 𝑎1 − 𝑎2
𝑣>= 𝑣1 > + |𝑣2 >
2 2
Therefore a set of non-zero vectors |𝑣1 >,…, |𝑣𝑛 > are linearly dependent if there exists complex
numbers a1, …, an; ai≠ 0 for at least one value of i such that
It can be shown that any two sets of linearly independent vectors which span a vector space V
contain the same number of elements. Such a set is called as basis for V.
Problem: Show that (1,-1), (1,2) and (2,1) are linearly dependent.
I|𝑣> =|𝑣>
To understand this we need to draw an analogy between identity operator and identity matrix.
For example consider a column vector
8
1 1 0
|𝜑> = . Now if this is multiplied by an identity matrix 𝐼 =
−1 0 1
1 0 1 1
𝐼|𝜑> = =
0 1 −1 −1
Keeps the state |𝜑> intact 𝐼|𝜑>=|𝜑>
Problem: Show that I|0> = |0> I|1> = |1> using the matrix form of I, |0>, and |1>
W. Pauli introduced a set of three 2×2 matrices to describe a particle of spin ½ in non-relativistic
quantum mechanics which is now of relevance to quantum computation and quantum
information.
0 1 0 −𝑖 1 0
𝜎1 = , 𝜎2 = , 𝜎3 =
1 0 𝑖 0 0 −1
Problem: Carry out the matrix multiplication of 𝜎1 , 𝜎2 , 𝜎3 with |0>, and |1> respectively.
Problem: Consider A, a linear operator from V to V such that A|0> = |1> and I|1> = |0>
Obtain the matrix representation of A.
i.e. 𝐴+ = A∗ T
1
Example: 𝐴 = 𝐴+ = 1 −𝑖
𝑖
A is said to be a Hermitian matrix if 𝐴+ = 𝐴
1 4 + 3𝑖
Problem: Check if matrix 𝐴 = is Hermitian.
4 − 3𝑖 5
9
Unitary matrix: A matrix U is Unitary if 𝑈𝑈 + = 𝐼 . An operator is Unitary if and only if each of
its matrix representations is Unitary. Unitary operators assume significance since they preserve
the inner product between vectors.
1 1
2 2
Problem: Show that 𝐴 = 𝑖 𝑖 is Unitary.
2 2
Row and column matrices and their multiplication (inner product), probability, and
quantum superposition, normalization rule. Orthogonality, orthonormality
Similarly a row matrix can also be identified with a vector called bra vector
Where
𝛼1 +
𝛼2 = 𝛼1∗ 𝛼2∗
Thus bra is the complex conjugate transpose of ket and conversely ket is the complex conjugate
transpose of bra. Flipping between kets and bras is called ‗taking the dual‘.
Example
1 2
If |𝜑> = then
𝑖 2
< 𝜑| = 1 2 −𝑖 2
1
Problem: Find the bra vector of |0> =
0
Inner product: If there are two states
𝛼1
|𝜓> = 𝛼
2
𝛽1
|𝜑> =
𝛽2
One way of multiplying |𝜓> and |𝜑> is by taking their inner product as
10
𝛽1
𝛼1∗ 𝛼2∗ = 𝛼1∗ 𝛽1 + 𝛼2∗ 𝛽2
𝛽2
< 𝜓|𝜑 > is called the inner product and the result is always a scalar product by which several
properties can be understood.
1 0 𝛼
|𝜓> = 𝛼 +𝛽 = 𝛽
0 1
let us take an inner product with itself
𝛼
< 𝜓|𝜓 >= 𝛼 ∗ 𝛽 ∗ 𝛽 = 𝛼𝛼 ∗ + 𝛽𝛽 ∗ = 𝛼 2
+ 𝛽 2
We know that 𝜓𝜓 ∗ = 𝜓 2
represents the probability [𝜓 ∗ =< 𝜓|
2 2 2
We have < 𝜓|𝜓 >= 𝜓 = 𝛼 + 𝛽 =1
0
< 0|1 >= 1 0 = 1.0 + 0.1 = 0
1
Two states |𝜓 > and |𝜑 > are said to be orthogonal if their inner product is zero
1
Problem: Verify if |𝜔 >= and |𝑣 >= 1 −1 are orthogonal
1
Problem: Find 𝐴 if |𝜓 >= 𝐴 2 0 > +3𝑖 1 >
11
1 1 1 1
Problem: Check for orthogonality |𝑖 > = |−𝑖 >=
2 𝑖 2 −𝑖
Source: Course notes VTU Physics Syllabus Committee November 2022
Quantum Superposition
Quantum superposition is a fundamental principle of quantum mechanics. It states that, any two
(or more) quantum states can be added together ("superposed") and the result will be another
valid quantum state; and conversely, that every quantum state can be represented as a sum of two
or more other distinct states. Mathematically, it refers to a property of solutions to
the Schrödinger equation; since the Schrödinger equation is linear, any linear combination of
solutions will also be a solution(s) .
An example is a quantum logical qubit state, as used in quantum information processing, which
is a quantum superposition of the "basis states" |0> and |1> . Here |0> is the Dirac notation for
the quantum state that will always give the result 0 when converted to classical logic by a
measurement. Likewise |1> is the state that will always convert to 1. Contrary to a
classical bit that can only be in the state corresponding to 0 or the state corresponding to 1, a
qubit may be in a superposition of both states. This means that the probabilities of measuring 0
or 1 for a qubit are in general neither 0.0 nor 1.0, and multiple measurements made on qubits in
identical states will not always give the same result.
The principle of quantum superposition states that if a physical system may be in one of many
configurations—arrangements of particles or fields—then the most general state is a combination
of all of these possibilities, where the amount in each configuration is specified by a complex
number.
For example, if there are two configurations labelled by 0 and 1, the most general state would be
c0|0> +c1|1>
where the coefficients are complex numbers describing how much goes into each
configuration.
Source: wikipedia
--------------------------------------------------------------------------------------------------------------------
Quantum Gates:
A classical computer is built using an electrical circuit having wires and logic gates. Likewise, a
quantum computer is built from a quantum circuit containing wires and elementary quantum
gates to transmit and manipulate quantum information.
There are single bit gates in classical computing like the NOT gate that work on only a single bit.
Similarly, single qubit gates are those that act on only a single quantum bit.
12
1. Quantum NOT Gate
Quantum NOT gate for qubits is defined as a process that takes the |0> state to the state |1> and
vice versa. It is the quantum analogue for the NOT gate. In the case of superposition, the
𝛼
quantum NOT gate acts linearly. The state α|0> + β|1> (= 𝛽 ) is taken to the state
𝛽
α|1> + β|0>(= ).
𝛼
The the quantum NOT gate is represented by the matrix
0 1
𝑋=
1 0
𝛼 𝛼 𝛽
For the quantum state 𝛽 , the output of the NOT gate is X 𝛽 =
𝛼
0 1 0 −𝑖 1 0
𝑋= , 𝑌= ,𝑍=
1 0 𝑖 0 0 −1
The truth table for the X, Y and Z Pauli matrices are shown below
13
3. Hadamard Gate
The Hadamard gate is defined as
1 1 1
𝐻=
2 1 −1
Hadamard gate transforms |0> into (|0>+|1>)/√2 and |1> into (|0>-|1>)/√2
14
1 0
𝑆=
0 𝑖
Its effect on |0> is to produce |0> as output
1 0 1 1
=
0 𝑖 0 0
Similarly, its effect on |1> is to produce i|1> as output
1 0 0 0
=
0 𝑖 1 𝑖
The truth table and an S gate is shown below
5. T Gate
Multiple Qubit Gates: We can generalize from single to multiple qubit gates. Similar to
classical multiple input gates such as AND, OR, XOR, NAND, NOR, etc we have multiple qubit
gates.
Controlled gate is one in which the operation is of the kind ―If A is true, then do B‖. A is
usually referred to as the control qubit and B as the target qubit. If the control qubit is 0, then the
target qubit is not altered. If the control qubit is 1, then the target qubit is transformed. However
the control qubit remains unaltered in both the cases.
1. CNOT Gate
15
The prototypical multi-qubit quantum logic gate is the controlled NOT or CNOT gate. The
circuit of the CNOT gate is shown below.
|10>
16
2. Representation of Swap gate
17
3. Controlled -Z gate
18
4. Toffoli gate
19
Source:
Quantum Computing, Vishal Sahani, McGraw Hill Education, 2007 Edition.
20