Quantum Computing for Data Scientists and Quantum Machine Learning

: Quantum computation and quantum information have sparked tremendous interest across a wide range of scientific disciplines, from physics to chemistry and engineering, as well as computer science, mathematics, and statistics. Data science is the application of statistical methodologies, computer algorithms, and domain scientific data to extract knowledge and insights from large amounts of data and solve complicated real-world issues. As a result, quantum machine learning has carved itself a distinct niche in the world of computers. When the potential of quantum computing characteristics is employed for machine learning, quantum technology advances to an advanced degree. When quantum computing capabilities are incorporated into standard methods, they give extraordinary parallel computing power for addressing complicated problems. The core of this work is a comparison of the fundamental principles of quantum computing and their superiority over traditional computing. This paper discusses application-based algorithms including QSVM, QPCA, and Q-KNN, as well as Grover's algorithm, the most common and foundational quantum machine learning technique.


I. INTRODUCTION
Computers have come a long way since Charles Babbage designed the first computer prototype in the nineteenth century; they're now an indispensable part of modern life, but what if we're ready for another computing revolution in the coming decades?IBM has introduced the "IBM quantum one", the world's first commercially accessible integrated quantum computing device.It differs from any other supercomputer in the world.Because quantum computers can analyze a vast number of alternative scenarios at the same time, they may be able to calculate orders of magnitude faster.For instance, while attempting to identify the shortest and most energy-efficient route between two points.
So, what distinguishes machines like IBM from standard supercomputers?The answer is in the name: the "IBM quantum one."It is a quantum computer that reflects the progression of classical (or binary) computing, which served as the foundation for the world as we know that exists today.

II. CLASSICAL COMPUTING VS QUANTUM COMPUTING
Data in traditional computing is represented in binary bits of the familiar ones and zeros.At its most basic, this data is delivered to a computer as instructions.The computing power of a processing unit for a traditional computer, such as a graphics car or CPU, is most often determined by the number of transistors on board.The transistor, like a light switch on the wall, either prevents or allows current to flow through it and can be either on one or off zero at any off zero at any given time.
For comparison, the ryzen 9 5950x, one of the most powerful CPUs available for a personal computer today, has around 10 billion transistors on board.
Quantum computers, on the other hand, are quite distinct machines.Data is encoded in quantum bits, or qubits, which implies that it is encoded in both ones and zeros at the same time.So, how exactly does this work?
Because of the nature of quantum computers, this is the case.As the name implies, quantum computers work at the subatomic or quantum level rather than on and off the physical systems that comprise qubits by utilizing the state of quantum particles such as the spin of an electron or the orientation of a photon.Thus, qubits can exist in several states at once, a characteristic known as "quantum superposition".They can also be connected in a process known as "quantum entanglement," which permits data to be represented as both a one and a zero at the same time.Because of this increased processing capability, a quantum computer with enough qubits might have more computational states than atoms in the known universe.
However, the unique method in which quantum computer's function necessitates unique operating circumstances, especially, their cooling systems.While air-or water-cooling works well for normal computers, quantum computers require specialized cooling systems.Due to the volatile nature of the particles that make up the qubits that power these machines, they're incredibly sensitive to the slightest vibration or fluctuation in temperature or electromagnetic environment, losing their fleeting quantum properties within microseconds.As a result, most quantum computers must be kept in a sealed, cushioned environment and operate at temperatures close to absolute zero.Because of these operational requirements, their incompatibility with everyday computing activities, and the millions of dollars required to obtain one of them for home use, we won't be seeing quantum computers in our living rooms anytime soon.Some experts even think that 100 years from now, we'll still be dependent on traditional computers to get through our daily duties, but that doesn't mean we won't be able to harness the power of these incredible devices.Aside from IBM's quantum computer, there are other commercially accessible quantum computers in the cloud today.Google also provides cloud-based usage of "ion Q" quantum computers with Sycamore processor on the Google cloud marketplace.Researchers, businesses, and developers may use this ground-breaking technology to do extraordinarily complicated computations, allowing previously impossible research projects to be realized.This might be utilized to accelerate progress in healthcare, energy, manufacturing, machine learning, and artificial intelligence.Industries throughout the world that use quantum computers will be better able to address complicated challenges.

III. WHY WOULD QUANTUM COMPUTERS BE SO MUCH FASTER THAN CLASSICAL COMPUTERS?
The classical computer takes ones and zeros as inputs, arranges them in the CPU or core processor made up of classical components like transistors and processes them using arithmetic and logical operations, and gets an output/answer.
(1, 0) In the case of a quantum computer, we start off with a different definition of the bit.The bit is known to be at the superposition of ones and zeros, in other words, it is a sort of parallel one and zero at the same time.
(α|1 >+ β|0) In this case, we can explore all possible questions for a given set of statements, and the computer itself will exist in many superposition states of possible processes going on the inside, and it is that parallelism that provides the exponential speeds for a particular problem.for instance, "the problem of factorization of very large numbers" takes exponential time to perform when performed in classical computers, whereas quantum computers take polynomial time.

IV. HOW DO YOU MAKE A QUANTUM BIT?
For instance, if we take an outermost electron in a phosphorous atom as a qubit (this single phosphorous atom is embedded in a silicon crystal right next to a tiny transistor).Now the electron has a dipole called spin and has 2 orientations up or down which are like the classical 1 and 0. To influence the orientation of the electron, we need to apply a magnetic field.

IV.I. ELECTRON RESONANCE FREQUENCY:
You can put the electron in spin-up state by hitting it with a pulse of microwaves, and that pulse needs to be a very specific frequency, that frequency depends on the magnetic field that the electron is sitting in.

IV.II. ELECTRON RADIO:
The electron is a little bit like a radio, only tuned into one station, when that station is broadcasted the electron excites and turns into spin-up state.So, the electron can be stopped at any point, i.e., we have created a special quantum superposition of the spin-up and spin-down state between a specific phase between 2 superpositions.

V.QUANTUM ENTANGLEMENT
In the 1930s, Albert Einstein was disappointed with quantum mechanics and suggested a thought experiment in which, according to the theory, an occurrence at one place in the cosmos may immediately affect another event arbitrarily far away.He referred to this as "spooky activity at a distance" because he believed it was nonsensical because it appeared to entail faster-than-light communication, which his theory of relativity ruled impossible.But now we can carry out this experiment, and the findings are terrifying, but in order to grasp them, we must first understand spin.All fundamental particles have a feature known as spin; no, they aren't literally spinning, but the analogy works; they have angular momentum and a spatial orientation.We can measure a particle's spin, but we must choose which direction to measure it in, and this measurement can only result in one of two outcomes: either the particle spin is aligned with the direction of measurement, which we'll call spin up, or it is opposite the direction of measurement, which we'll call spin down.
What if the spin of the particle is vertical but we detect it horizontally?Well, it has a 50% chance of being spin up and a 50% chance of being spin down, and measuring it spin affects the spin of the particle.What if we measure spin at a 60-degree angle from the vertical?Now that the particle's spin is better aligned with this measurement, monitoring its spin modifies the particle's spin.The probability is given by the square of the cosine of half the angle.Now, two of these particles may be used in an experiment like the one described by Stein, but they must be prepared in a certain way.For instance, created spontaneously from energy.Because the universe's total angular momentum must remain constant, you know that if one particle is observed to have spin up, the second particle measured in the same direction must have spin down.Spins must be opposing only if the two particles are detected in the same direction.Here's why: Assume their spins are vertical and opposed; if they're both measured horizontally, each has a 50/50 probability of being spin up, therefore there's a 50% chance that both measures would return the same spin conclusion, which would violate the concept of conservation of angular momentum.
According to quantum theory, these particles are entangled, which means their spin is simply opposite that of the other particle, so when one particle is measured, and it's determined.You instantly know what the other particle's measurement will be; this has been extensively and repeatedly proven experimentally; it makes no difference what angle the detectors are positioned at or how far apart they are; they always measure the same thing.This implies that the measurements of the two qubits are perfectly correlated, a condition seen in entanglement research.You instantly know what the other particle's measurement will be; this has been extensively and repeatedly proven experimentally; it makes no difference what angle the detectors are positioned at or how far apart they are; they always measure the same thing.This implies that the measurements of the two qubits are perfectly correlated, a condition seen in entanglement research.

VI. QUANTUM COMPUTING FOR COMPUTER SCIENTISTS
I guess the above information seems hard to understand but is appropriate, as we were trying to understand quantum functionalities based on language developed in the classical world.The optimal way of understanding quantum computing is through the universal language of mathematics.Consider the operations that can be performed on one classical bit in the case of matrices, they include: identity, negation, constant-0, constant-1.In these operations, only identity and negation are reversible.And the thing with quantum computers is that they only use reversible operations, in fact, all quantum operations are their own inverses.Reversible means given the operation and output value, you can find the input value, i.e., for Ax=b, given b and A, you can uniquely find x.

VI.I OPERATIONS ON QBITS
We operate on qbits the same way we operate on binary bits: the matrices, most of the matrix operations like bit flip, negation, can be performed on quantum bits.There are several important matrix operations that can be performed, which only make sense in a quantum context.

VI.II THE HADAMARD GATE
In quantum computing, the Hadamard gate places a qubit in an equal superposition of states and emphasizes the need of a negative sign in the bottom right corner of the gate's matrix to ensure reversibility.It further clarifies that superposition implies a qubit is in both states at the same time, rather than surreptitiously in one or the other.The Hadamard gate can convert a qubit from superposition to conventional bits and may also be employed in a deterministic quantum computing system.Addition is not an example of a problem in which quantum computing outperforms traditional computation.The Hadamard gate takes a 0-or 1-bit and puts it into exactly equal superposition.we can transition out of superposition without measurement.we can thus structure quantum computation deterministically instead of prababilistically.
(-1/√2 to make sure that the function is reversible)

VII. THE UNIT CIRCLE STATE MACHINE
In this unit circle, the X and Y axes pass through a circle having a radius of one around the origin.The x-value is represented at the top of the circle, and the y-value is represented at the bottom, with the zero value at position one, zero and the one value at position zero, one.
The bit flip operator is introduced as a transition operator around the unit circle, where zero is converted to one, one is converted to zero, and zero negative one is converted to negative one.Superposition values are unaffected by the bit flip operator.
The Hadamard gate accepts values ranging from zero to one over two, one over two, one over two, one, two, one over two negative one over two.The unit circle is a basic depiction, and a sphere would be utilized if complex numbers were employed.
The concept of quantum circuit nomenclature is presented, and an example of a circuit with gates and lines representing qubits is demonstrated.

VIII. THE DEUTSCH ORACLE
The Deutsch oracle is a basic quantum circuit designed to demonstrate quantum computing's ability to solve certain sorts of problems quicker than traditional computers.The circuit accepts a function f(x) as input, which transforms an input bit string x to a single output bit.The function is either constant (it returns the same output bit for all possible input bit strings) or balanced (it returns the same output bit for all possible input bit strings) (i.e., it returns 0 for exactly half of the possible input bit strings and 1 for the other half).
The Deutsch oracle is made up of two qubits: one input and one output.The input qubit is prepared in a superposition of 0 and 1, and the output qubit is set to 0 at the start.A sequence of quantum gates, including a Hadamard gate on the input qubit, a unitary transformation that implements the function f(x), and another Hadamard gate on the input qubit, are applied to these qubits by the circuit.The final state of the output qubit is then measured, and this measurement tells us whether the function f(x) is constant or balanced.
If f(x) is constant, the output qubit will always be 0, regardless of the input qubit, and the measurement will always produce 0. If f(x) is balanced, the output qubit will be a superposition of 0 and 1, and the measurement will return 1 with a probability of 1/2.Thus, by measuring the Deutsch oracle's output qubit, we can ascertain if f(x) is constant or balanced with only one query to the function, whereas a traditional computer would require at least two inquiries to get this information.
As an example, consider the following function f(x), which converts two-bit strings to single bits: For this function, we may use the Deutsch oracle as follows: 1.Prepare the input qubit to be in the state: where |0> and |1> are the qubit's basic states.

Apply a Hadamard gate to the input qubit to create a superposition of the base states:
3. On the two qubits, apply the unitary transformation U f, which implements the function f(x).In this instance, we have: where XOR stands for bitwise exclusive OR. 4. To the input qubit, add another Hadamard gate.

Calculate the output qubit
is balanced, the output qubit will be in the state (|0> -|1>)/√2, and if f(x) is constant, it will be in the state |0>.Thus, we may ascertain if f(x) is balanced by measuring the output qubit.

IX. QUANTUM MACHINE LEARNING
By enabling quicker and more efficient algorithms for optimization, simulation, and other activities, quantum computing has the potential to change machine learning.Quantum machine learning (QML) is a new subject that investigates the interface between quantum computing and machine learning.There are three types of QML algorithms: quantum-inspired classical algorithms, quantum-enhanced classical algorithms, and completely quantum algorithms The term "quantum-inspired classical algorithms" refers to classical algorithms that are inspired by quantum computing and employ techniques such as amplitude estimation and quantum walks.These methods are commonly used for clustering, dimensionality reduction, and feature selection.
Classical algorithms that incorporate quantum computing as a subroutine to speed up specific computations are known as quantum-enhanced classical algorithms.These techniques are commonly employed for optimization issues and can yield an exponential speedup over traditional algorithms.Fully quantum algorithms are machine learning algorithms that employ quantum circuits to execute tasks.These algorithms are still in their infancy and are currently constrained by the number of qubits accessible on contemporary quantum computers.
The quantum support vector machine (QSVM) is a QML algorithm that can give exponential speedup over conventional SVMs for certain sorts of situations as an example of quantum-enhanced classical algorithms.QSVM works by first mapping the data to a high-dimensional feature space with a quantum circuit, and then classifying the data with a classical SVM.The quantum circuit can accelerate the feature mapping process exponentially, resulting in faster and more efficient categorization.Google, as an example, has created a quantum machine learning algorithm that may be used to model chemical interactions.The programme uses a quantum computer to simulate the behaviour of molecules and accurately anticipate their responses.This method might be useful in drug development and materials research, where the ability to properly forecast chemical reactions could minimise the time and expense of producing novel treatments and materials.

X.I CASE STUDY
The work of researchers at the University of Waterloo in Canada provides a case study of the application of quantum computing in machine learning at a university.The Institute for Quantum Computing at the university is a renowned research facility in the field of quantum computing and its applications.
The Institute is working on developing quantum machine learning algorithms to anticipate the behaviour of molecules.Professor Peter Wittek and his colleagues are leading this research, which includes utilizing a quantum computer to replicate the behaviour of molecules in real time.
To forecast the characteristics of molecules, the team employs a quantum technique known as the variational quantum eigen solver (VQE).VQE works by mapping the behaviour of molecules to a quantum circuit and then optimising the circuit with a classical computer to decrease the energy of the molecule.The quantum circuit is then performed on a quantum computer to determine the molecule's energy, which may subsequently be used to forecast its behaviour.
The University of Waterloo researchers are aiming to improve the VQE algorithm and apply it to larger and more complicated molecules.They are also investigating various quantum machine learning techniques, such as quantum neural networks, for forecasting molecular behaviour.This research has enormous implications for drug development and materials science, where the ability to precisely anticipate the behaviour of molecules might greatly cut the time and expense of producing novel medications and materials.The University of Waterloo's research is advancing the area of quantum machine learning and paving the road for new and novel uses of quantum computing.

X.II THE QUANTUM SUPPORT VECTOR MACHINE (QSVM)
The quantum support vector machine (QSVM) is a quantum-enhanced variant of the famous support vector machine (SVM) technique for classification and regression.QSVM employs a quantum circuit to translate data to a high-dimensional feature space, which is subsequently utilized to categorize the data via a classical SVM.The QSVM method begins by encoding the data that will be categorised into quantum states.Each data point is represented as a binary vector, which is then amplitude encoded onto qubits.The binary vector is transformed to a quantum state in which each qubit is in a superposition of its 0 and 1 states, with amplitudes equal to the binary vector values.The binary vector [1, 0, 1] would, for example, be encoded onto qubits in the state (1/√2) |101 + (1/ √2) |001.
Following that, the encoded data is supplied into a quantum circuit, which conducts a unitary transformation on the quantum state.This transformation converts the quantum state to a high-dimensional feature space where the data can be separated more readily using a classical SVM.The unitary transformation is frequently based on a specific feature map and is generally designed to be efficiently implementable on a quantum computer.Following that, the encoded data is supplied into a quantum circuit, which conducts a unitary transformation on the quantum state.This transformation converts the quantum state to a high-dimensional feature space where the data can be separated more readily using a classical SVM.The unitary transformation is frequently based on a specific feature map and is generally designed to be efficiently implementable on a quantum computer.
After mapping the data to the high-dimensional feature space, a traditional SVM may be used to categorise the data.The SVM finds a hyperplane that divides the data points into various groups.The hyperplane is chosen with the goal of maximising the margin, which is the distance between the hyperplane and the nearest data points.The hyperplane in QSVM is determined by the feature vectors of the data points in the high-dimensional feature space.
For some types of situations, the QSVM technique can give an exponential speedup over standard SVMs.The quantum circuit can complete the feature mapping step considerably quicker than a classical computer, which is constrained by the curse of dimensionality.The number of qubits accessible on contemporary quantum computers, as well as the difficulties of executing Consider a binary classification issue in which we wish to differentiate between two varieties of cars based on their length and breadth.We have a training set of ten data points, each represented by a vector with two features.The following table displays the data points: The first register in this case comprises N computational basis states |i, and the second register holds the classical data points |x i.This quantum state may be created using a variety of ways, including amplitude encoding and phase encoding.
The first register in this case comprises N computational basis states |i, and the second register holds the classical data points |x i.This quantum state may be created using a variety of ways, including amplitude encoding and phase encoding.
The quantum transformation is the second stage, which includes applying a unitary matrix U to the quantum state.U is defined as follows: U = e^{-i A} A is a Hermitian matrix defined by.This matrix is known as the "quantum feature map," and it encodes the dataset's covariance matrix.A = 2|ψ⟩⟨ψ| -I.
Finally, we measure the quantum state's first register, yielding a result |k with probability p k.After then, the second register collapses to the quantum state: QUANTUM PRINCIPAL COMPONENT ANALYSIS (QPCA) QPCA (Quantum Principal Component Analysis) is a quantum method that extracts the principal components of a data set tenfold quicker than traditional techniques.Giovanni Carleo, Matthias Troyer, and Emanuele Cirillo were the first to propose it in 2017.Data encoding, quantum transformation, and measurement are the three basic processes of QPCA.Assume we have a traditional dataset with N data points, each having d characteristics.QPCA encodes the data into an N-qubit quantum state, which is represented as follows: |ψ⟩ = (1/√N) ∑_{i=1}^N |i⟩|x_i⟩