Unit 3 Quantum Computing Notes
Unit 3 Quantum Computing Notes
Quantum Computer
A quantum computer is a machine that performs calculations based on the laws of quantum
mechanics, which is the behavior of particles at the sub-atomic level.
Quantum Computing
Quantum computing is an emerging field in computer science that uses the principles of
quantum mechanics to perform computational tasks.
Quantum computing uses quantum bits or qubits, which can exist in a superposition of states.
This makes quantum computers capable of parallel processing and solving certain problems
exponentially faster.
For example, if storing For example, for every extra qbit you get, you can store
one number takes 64 bits, twice as many numbers. For example, with 3 qbits, you get
5.
then storing N numbers coefficients for |000}, |001}, |010}, |011}, |100}, |101},
takes N times 64 bits. |110} and |111}.
Quantum computing is a modern way of computing that is based on the science of quantum
mechanics and its unbelievable phenomena. It is a combination of physics, mathematics,
computer science and information theory. It provides high computational power, less energy
consumption and exponential speed over classical computers by controlling the behavior of small
physical objects i.e. microscopic particles like atoms, electrons, photons, etc.
The basic working of quantum computing and the quantum properties it follows like
superposition, entanglement and interference.
Superposition –
In classical computing bits has two possible states either zero or one. In quantum computing, a
qubit (short for “quantum bit”) is a unit of quantum information—the quantum analogue to a
classical bit. Qubits have special properties that help them solve complex problems much faster
than classical bits. One of these properties is superposition, which states that instead of holding
one binary value (“0” or “1”) like a classical bit, a qubit can hold a combination of “0” and “1”
simultaneously. Qubits have two possible outcomes zero or one but those states are superposition
of zero and one. In quantum world qubit don’t have to be in one of those states. It can be in any
proportion of those states. As soon as we measure its value, it has to decide whether it is zero or
one. This is called superposition. It is the ability of the quantum system to be in multiple states at
same time.
In classical computing for example there are 4 bytes. The combination of 4 bytes can represent
2^4=16 values in total and one value a given instant. But in a combination 4 qubits all 16
combination are possible at once.
• Qubits exhibit superposition, allowing them to exist in multiple states simultaneously.
• A qubit can exist in a linear combination of the 0 and 1 states. This is represented as |0⟩
and |1⟩.
• Mathematically, the wavefunction of a qubit in superposition is represented as,
|ψ⟩ = α|0⟩ + β|1⟩
The probability of the state is directly proportional to the square of the magnitude of its
coefficient.
|α|^2 is the probability of identifying the qubit state 0 and |β|^2 is the probability of
identifying the qubit state 1. These probabilities when summed up must give a total of 1 or say
100% mathematically, i.e.
|α|^2 + |β|^2 = 1.
Measurement:
• When a qubit in superposition is measured, it collapses into one of the basis states |0⟩ or
|1⟩.
• The outcome of the measurement is probabilistic, with the probabilities determined by
the squared magnitudes of the two coefficients.
In many quantum computing schemes, the qubit is represented by the spin state of a particle.
Spin, a quantum property of particles is typically in any of two directions, up or down. But it can
be put into a superposition state so it is up and down at the same time.
Significance of Superposition:
Entanglement –
Interference -
All subatomic particles along with light pose dual nature, i.e. particle and wave nature both. The
quantum particle may experience interference. If each particle goes through both the slits
(Young’s double-slit experiment) simultaneously due to superposition, they can cross its own
path interfering with the path direction. The idea of interference allows us to intentionally bias
the content of the qubit towards the needed state. However, it can also result in a quantum
computer to combine its various computations into one making it more error-prone
Quantum computing has the potential to revolutionize various fields, including cryptography,
optimization, drug discovery, and material science. However, building practical and scalable
quantum computers is a complex and ongoing challenge due to issues like qubit stability, error
correction, and decoherence. Researchers and companies are actively working to develop
quantum hardware and software to harness the power of quantum computing for a wide range of
applications.
QUANTUM BIT OR QUBIT
Quantum Bit or Qubit is the fundamental unit of quantum information that represents subatomic
particles such as atoms, electrons, etc. as a computer’s memory while their control mechanisms
work as a computer’s processor. It can take the value of 0, 1, or both simultaneously. It is a
million times more powerful than today’s strongest supercomputers. Production and
management of qubits are tremendous challenges in the field of engineering. They acquire both,
digital as well as analog nature which gives the quantum computer their computational power.
Their analog nature indicates that quantum gates have no noise limit and their digital nature
provides a norm to recover from this serious weakness. Therefore, the approach of logic gates
and abstractions created for classical computing is of no use in quantum computing. Quantum
computing may adopt ideas only from classical computing. But this computing needs its own
method to overcome the variations of processing and any type of noise. It also needs its own
strategy to debug errors and handle defects in design.
Qubit has two quantum states similar to the classical binary states. The qubit can be in either
state as well as in the superposed state of both states simultaneously. There is a representation of
these quantum states also known as Dirac notation.
In this notation, the state label is kept between two symbols | and ⟩. Therefore, states are written
as |0⟩ and |1⟩ which are literally having analog values and both are participating to give any value
between 0 and 1 given that sum of probability of occurrence of each state must be 1. Thus any
quantum bit wave function can be expressed as a two-state linear combination each with its own
complex coefficient i.e. |w⟩ = x |0⟩ + y |1⟩ where x and y are coefficients of both the states. The
probability of the state is directly proportional to the square of the magnitude of its coefficient.
|x|2 is the probability of identifying the qubit state 0 and |y|2 is the probability of identifying the
qubit state 1. These probabilities when summed up must give a total of 1 or say 100%
mathematically, i.e. |x|2 + |y|2 = 1.
2. Entanglement: Qubits can be entangled, which means that the state of one qubit is correlated
with the state of another, even when they are separated by a significant distance. Entanglement
allows for the creation of quantum systems in which changes to one qubit's state affect the state
of another, offering potential advantages in quantum computation and communication.
3. Measurement: When a qubit is measured, it collapses from its superposition of states to a
single, definite state (0 or 1). The probability of measuring a particular state depends on the
coefficients of the superposition.
The superposition and entanglement properties of qubits make quantum computers well-suited
for certain types of problems, such as factorization, optimization, and simulations of quantum
systems, where classical computers may struggle or require a significant amount of time.
However, building and maintaining stable qubits while mitigating the effects of decoherence and
errors remain ongoing challenges in the development of practical quantum computers.
The Bloch sphere is a geometric representation that provides a visual depiction of the state of a
single qubit in quantum mechanics. It is a useful tool for understanding and visualizing the
concept of superposition, which is one of the fundamental properties of qubits.
The Bloch sphere represents a single qubit in a three-dimensional space. The state of a qubit can
be described by a quantum state vector, typically denoted as |ψ⟩, and it can be expressed in terms
of two complex probability amplitudes, α and β:
Here, |0⟩ and |1⟩ are the basis states representing the classical 0 and 1 states, and α and β are
complex numbers.
The Bloch sphere visualization of a qubit involves mapping this quantum state vector to a point
on the surface of a sphere. The Bloch sphere has the following properties:
The Bloch vector, which starts at the origin of the sphere (the center) and ends on the surface of
the sphere, represents the state of the qubit. The direction and length of this vector determine the
state of the qubit. The angle θ (polar angle) represents the probability of measuring the state |0⟩,
and the angle φ (azimuthal angle) represents the phase relationship between |0⟩ and |1⟩.
To show this correspondence, consider the qubit description of the Bloch sphere; any pure state
ψ can be written as a complex superposition of the ket vectors ∣0⟩ and ∣1⟩; moreover since global
phase factors do not affect physical state, we can take the representation so that the coefficient of
∣0⟩ is real and non-negative. Thus ψ has a representation as
The range of values for θ and φ such that they cover the whole sphere (without “repetitions”) is θ
∈ [0,π) and φ ∈ [0,2π). Angle θ corresponds to lattitude and angle φ corresponds to longitude.
Examples:
Assume that θ = 0.
MULTIPLE QUBITS:
When working with multiple qubits in a quantum system, you can extend the Bloch sphere
representation to describe the combined state of the qubits. For two qubits, you would need to
work in a four-dimensional space, which makes the visualization more challenging. A complete
description of the combined state of multiple qubits is usually represented using a quantum state
vector that incorporates all possible combinations of the individual qubit states.
When add more qubits to the system, the space required to represent the combined state grows
exponentially, making it increasingly difficult to visualize. Nevertheless, the principles of
superposition and entanglement that apply to individual qubits still hold for multi-qubit systems,
and quantum computing algorithms take advantage of these properties to perform complex
computations efficiently. Visual representations like the Bloch sphere can help with conceptual
understanding but may become less practical as the number of qubits in a system increases.
SINGLE-QUBIT GATES
Single-qubit gates are fundamental quantum gates that operate on individual qubits, modifying
their quantum states. A single-qubit has two basis states ∣0⟩ and ∣1⟩.
0 1
[ ]
1 0
0 −𝑖
[ ]
𝑖 0
The Pauli-Z gate introduces a phase flip without changing the qubit's basis states.
Mathematically, it is represented as follows:
1 0
[ ]
0 −1
The Hadamard gate introduces superposition by transforming the basis states into equal
superpositions. Mathematically, it is represented as:
The circuit representation of Hadamard Gate :
The identity gate leaves the qubit state unchanged. It is represented as:
1 0
[ ]
0 1
MULTIPLE-QUBIT GATES:
A two-qubit system has 4 computational basis states denoted as ∣00⟩, ∣01⟩, ∣10⟩, ∣11⟩. A multi-
qubit system of N qubits has 2N basis states. Multiple-qubit gates are operations that act on two
or more qubits simultaneously.
INPUT OUTPUT
x y x y
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
The Toffoli gate is named after Tommaso Toffoli and also called as Controlled
Controlled NOT (CCNOT) gate.
CCNOT gate acts on 3 qubits and performs the NOT operation on the third qubit only
when the first two qubits are in 1> state, and otherwise leaves it unchanged.
3. SWAP Gate:
The SWAP gate is a two-qubit gate. If the two qubits are in states |00⟩ and |11⟩, the gate
has no effect on them. If the qubits are in states |01⟩ and |10⟩, the gate will swap their states.
After applying the Swap gate, the qubits will be in states |10⟩ and |01⟩, respectively.
INPUT OUTPUT
a b a¹ b¹
0 0 0 0
0 1 1 0
1 0 0 1
1 1 1 1
The Fredkin gate, also known as the Controlled-SWAP (CSWAP) gate, is a three-qubit
quantum gate. The Fredkin gate is named after its inventor, Edward Fredkin.
The Fredkin gate has three inputs and three outputs that transmits the first bit unchanged
and swaps the last two bits if, and only if, the first bit is 1.
The first step in designing a quantum circuit is to clearly define the problem you want to solve
more efficiently using quantum computing.
Choose the quantum gates that will be applied to the qubits in your circuit. Common gates
include the Hadamard gate, Pauli-X, Pauli-Y, Pauli-Z gates, and the CNOT (Controlled-NOT)
gate.
Arrange the selected quantum gates in a sequence to create the quantum circuit. The order and
placement of gates are crucial, as they determine how the quantum information is manipulated.
Decide how qubits will be initialized (often in the |0> state) and where measurements will be
placed in the circuit. Measurements are typically performed at the end of the circuit to extract
classical information.
Quantum circuit design often involves optimizing the circuit to minimize the overall complexity.
This can lead to more efficient quantum computations.
Before running a quantum circuit on a physical quantum computer, it is common to simulate the
circuit on a classical computer to verify its correctness and understand its expected behaviour.
Quantum Error Correction:
Error correction techniques to be incorporated to mitigate the effects of noise and errors in
quantum computations.
If available, we can run our quantum circuit on quantum hardware, such as a quantum processor.
Quantum computers are still in the early stages of development, so access may be limited.
Analyze Results:
After running the quantum circuit, analyze the measurement results to obtain the desired output
for your problem or algorithm. Quantum measurements are probabilistic, so we may need to
repeat the computation multiple times to obtain statistically significant results.
Faster computations
These type of computers can perform computation at a much faster rate than normal computers.
Quantum computers have computation power higher than supercomputers also. They can process
data at 1000 times faster than normal computers and supercomputers. Some calculations if
performed by a normal computer can take 1000 years is done by quantum computers in a few
seconds.
Quantum computers are best for doing data simulation computing. There are many algorithms
created that can simulate various things like weather forecasting, chemical simulation etc.
Medicine creation
These type of computers can work better in the medical field. They can detect diseases and can
create a formula for medicines. Different type of diseases can be diagnosed and tested in
scientific laboratories using these computers.
Google search
Quantum computers are used by Google to refine searches. Now every search on Google can
speed up by using these computers. Most relevant results can be populated using quantum
computing.
High privacy
These computers can make high encryption and is good at cryptography. It is impossible to break
the security of quantum computers. Recently China has launched a satellite that uses quantum
computing and china claimed that this satellite cannot be hacked.
Quantum computing is also used in making radar missiles. The accuracy of radar weapons can be
improved by using this technology.
These type of computers perform well in artificial intelligence. They can make decisions more
precisely than normal computers. Scientists can do better research using these computers.
Machine learning
Quantum computing is applied nicely by using machine learning techniques. Users can use less
code and uses machine learning process for improving outcome.
Algorithm creation
For every type of computation, it needs to write a new algorithm. Quantum computers cannot
work as classical computers, they need special algorithms to perform tasks in their environment.
As the processing in these computers is done very deeply so it needs a temperature of negative
460 degrees F. This is the lowest temperature of the universe and it is very difficult to maintain
that temperature.
Due to the high range price they are not available for public use. Also, the errors in these type of
computers are high because they are still in the development phase. Quantum computers work
fine in 10 qubits but after increasing qubits like 70 qubits, the accuracy is not right. There are
experiments already going on to make the results of these computers precise.
Internet Security
It is assumed by the scientists that if a quantum computer is implemented in the best way then
whole internet security breaks. This is due to the facts that these computers can decrypt all the
codes on the internet.
Cryptography
Optimization Problems
Artificial Intelligence
Better batteries
Cleaner fertilization
Cybersecurity
Drug development
Electronic materials discovery
Financial modeling
Solar capture
Traffic optimization
Weather forecasting and climate change
Quantum Simulation
It could also have commercial applications in areas such as medical and healthcare fields,
chemical catalysts, storage of energy, pharmaceutical advancement and device displays.
***
Note:
Information Bit based information storage Quantum bit (qubit) based information
storage using voltage/ charge storage using electron spin
Bit values Bits having a value of either 0 or 1 Qubits having a value of 0,1 or sometimes
Comparison key Classical computer Quantum computer
and can have a single value at any negative and can have both values at the
instant same time