Implementation of QKD BB84 Protocol in Qiskit
Implementation of QKD BB84 Protocol in Qiskit
Qiskit
2022 19th International Bhurban Conference on Applied Sciences and Technology (IBCAST) | 978-1-6654-6051-4/22/$31.00 ©2022 IEEE | DOI: 10.1109/IBCAST54850.2022.9990073
Muhammad Haroon Saeed Hassan Sattar Muhammad Hanif Durad Zeshan Haider
National Institute of Lasers and Department of Computer & Department of Computer & National Institute of Lasers and
Optronics College, Pakistan Information Sciences, Pakistan Information Sciences, Pakistan Optronics College, Pakistan
Institute of Engineering and Institute of Engineering and Institute of Engineering and Institute of Engineering and
Applied Science, Nilore, Applied Sciences, Nilore, Applied Sciences, Nilore, Applied Science, Nilore,
Islamabad 45650, Pakistan Islamabad 45650, Pakistan Islamabad 45650, Pakistan Islamabad 45650, Pakistan
[email protected] [email protected] [email protected] [email protected]
Abstract— Quantum cryptography is a practical method of secret security and secrecy of BB84 protocol that utilizes polarization
communication that guarantees the foolproof secrecy. This paper superposition states of the single photons for key distribution
presents the simulation for implementation of a Quantum Key between the two parties relies fundamentally upon two basic
Distribution (QKD) protocol BB84, the pioneering, and most basic features of the quantum theory i.e. (i) Quantum measurement
and fundamental protocol. We use the quantum computing always disturb a quantum state [7] (ii) Quantum states cannot be
platform developed by IBM named as Qiskit for the simulation of cloned or copied [8]. Basic physics of the BB84 protocol is well
the BB84 protocol, implementing it with and without an Eve known and can be found in many good references [9], [10]. The
eavesdropper for studying the relative outcomes. Recently, Qiskit present article, however discusses it very briefly, as can be seem
is globally very popular for quantum simulations because it
in the next sections.
provide us the opportunity to simulate quantum logic circuit on
classical computer as well as real quantum computers owned by Our end results will be focused on compiling, executing
IBM. As per our best knowledge, there is no any proposal BB84 key exchange protocol developed in Python on a Quantum
published for quantum circuit by anyone for BB84 QKD. We Computer from IBM Quantum Experience and recording results
performed experimentation on local as well as cloud simulators: for comparisons with simulator based results. We will be
1) The “qasm_simulator” was used as local machine simulator, implementing BB84 in Python Qiskit [11], executing it in
and 2) The “ibmqx2” simulator was used as IBM cloud quantum simulators and IBM cloud quantum service, recording the
simulator. The outcome of local as well as IBM simulator with and observed changes in outcomes in both platforms with and
without an eavesdropper, between the two parties involved in key without an eavesdropper entity between the two parties involved
exchange were recorded and presented in the results section.
in key exchange. We will be developing the Qubits sharing
strategy for Alice, Bob and Eve entities involved in the key
Keywords— Quantum Key Distribution, Quantum Cryptography, distribution.
Qubits , BB84 Protocol Organization of this paper is as follow; Section II contains
review of core concepts useful for understanding cryptography.
I. INTRODUCTION In Section III, the necessary quantum properties explained
Traditional and classical cryptography has worked for quite briefly. Section IV is mainly on brief introduction of BB84
a long time and is still broadly being used, however, with the protocol of quantum key distribution (QKD). In Section V the
advent of quantum technologies especially quantum computers, important tools for quantum simulation presented. The results of
all these classical crypto-system are rendered insecure and hence our simulation of QKD BB84 protocol perform on Qiskit covers
unreliable [1], [2]. in the Section VI and the last Section is dedicated for summary
and future work.
Now, in order to guarantee security and secrecy, one would
need to utilize a totally irregular and truly random key, long as II. REVIEW OF CORE CONCEPTS
much as the plaintext, and never use it repeatedly, a code known
as one-time Pad (OTP) [3]. When this arbitrary key is produced, A. Symmetric and Asymmetric Cryptography
one can apply for instance the bitwise XOR to the plaintext and, Encryption is an instrument to change the type of any content
being the XOR symmetrical, recipient simply needs to reapply to keep it from being read by others. In Symmetric-key
the XOR with a same key to the ciphertext to get the plaintext. encryption (otherwise called secret-key cryptography), the
OTP has, however, never acquired widespread popularity for one message is then encrypted utilizing a key and with same key, the
major practical reason: there is no 100% secure way to distribute messages can be decrypted, simplifying it to utilize however less
the random key among the communicating parties [4]. It is protected. It also needs a secure way of moving the key from one
precisely this point where quantum theory enters into party to another [12]. BB84 protocol discussed here belong to
cryptographic domain backed by the entirely counterintuitive this category but with the guaranteed secure solution to the key
and nonlocal traits of the superposition states [5]. One of the distribution problem.
most widely use and pioneering protocol for key distribution
using quantum mechanics is BB84 [6]. To be more exact, the
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 689
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022
The size of ciphertext is smaller or same as plaintext, with known as qubit, a fundamental pre-requisite for quantum
encryption measure being amazingly fast, transferring enormous informatics [16].
amounts of information and having an extremely low resource
utilization. Symmetric-key encryption can just give Storing information in the form of qubits is the first step in
confidentiality. AES, DES, 3DES, RC4 all uses symmetric-key implementing quantum cryptography, the science of safely
encryption [13,14]. exchanging information using quantum physics. This is achieved
through the establishment of a quantum channel [14], a special
Asymmetric Key Encryption (otherwise called public-key apparatus capable of delivering quantum information in the form
cryptography) is for both for public and private key encryption of qubits. Confidentiality is guaranteed by laws of quantum
procedure. It utilizes separate keys to encrypt and decrypt a mechanics, a remarkable way of calling physics in aid of
message or document [13]. It is more reliable than the symmetric mathematics.
key encryption strategy, however it is slower.
The basic quantum bits can be represented as |0⟩
The size of ciphertext is larger or same than plaintext and (pronounced as “Ket 0”) and |1⟩ (pronounced as “Ket 1”) [16].
appropriate for sending small amount of data only. Asymmetric
key encryption gives both authenticity and confidentiality. ECC, To represent the coherent superposition of the qubit, we can
El Gamal, Diffie-Hellman, DSA, RSA all uses Asymmetric-key describe it by a linear combination of ket 0 and ket 1 as;
encryption. Most of such classical protocols relies on the |𝛹⟩ = 𝛼|0⟩ + 𝛽|1⟩ (1)
factorization intractability of large prime numbers [14].
However, quantum computers have recently shown their Here the probability amplitudes are represented by α and β
potential to solve such hitherto intractable problems [2]. and yield probabilities when squared.
B. Key Exchange Light in nature contains all of its components, for obtaining
a single component of the light we use polarizers that can be of
Key exchange is the process of sharing keys between two 0°, 45°, 90°, 135°. We form two basis from pairs of these
parties permitting them to encrypt information for polarizers. A Diagonal Basis using polarizers in 45° and 135°, a
communications [14]. Since we are dealing with ciphers rather Rectilinear Basis using polarizers in 0° and 90° [10,16].
than codes, the two parties will require suitable keys rather than
a codebook. The nature of keys relies on the decision and A. Quantum Superposition
properties of the cipher that is being utilized. Quantum Superposition property describes that for two or
As referenced previously, a symmetric key cryptography three or any arbitrary quantum basis states can be superposed or
requires the two parties to have duplicates of a same key while added together and the resultant state will again be a lawful, valid
asymmetric key cryptography requires to have a Public key for quantum state e.g. qubit, qutrit and qudit etc. Alternatively, any
the users and Private key for the party decrypting the coded valid quantum state can also be defined as sum of individual
messages [14]. distinct states. In other words, a quantum particle can be in two
or more states at the same moment of time [16]. In BB84, we
Notable key exchange protocols are as follows: employ polarization superposition state of a photon.
RSA: As already mentioned, RSA is a public key B. No Cloning Theorem
cryptosystem that utilizes the practical difficulty of factoring
No-cloning or no-copying theorem simply asserts that
product of two large prime numbers. It uses public encryption
faithful copying of an unknown quantum state is strictly
key meaning anyone can encrypt data but since it uses a private
forbidden according to the theory and hence we, in general,
decryption key therefore only the one who knows the prime
cannot clone or exactly copy any given quantum state [8,16]. The
numbers can decrypt the data. [14].
theorem blocks all the copying strategies after employed in
Diffie–Hellman: is a method that enables securely sharing classical cryptography.
encryption keys on an insecure public channel. It is possible to
In traditional electronics, digital signals are carried by
do so by sharing the public keys of both parties with each other,
conductive wires or traces in which current flows. If we wish to
each party combining their own private key with the public key
clone an arbitrary unknown signal on another track, the only
of the other party to create a shared key that can be then used for
thing we need to do is to bifurcate the wire and, given the right
symmetric encryption. [14].
accuracy on the circuitry, we end up with the same signal
C. Simulations duplicated on two tracks [14]. In quantum computers things
In usual terminology, simulator is a machine or piece of work differently due to no-cloning theorem, something
equipment designed to test cases before executing in the real unforeseeable in the classical world. Thus, if the state is in an
world environments while simulation is the process of imitating arbitrary state, we have no way of making exact copies of it. This
a scenario [15]; Example could be a cockpit simulator of an is due do the fact that, when we work with quantum systems, we
aircraft that simulates weather conditions, drag forces, controls are broadly limited to performing only two fundamental
and haptic feedbacks to train or test pilots before being in real operation on any quantum state. Firstly, we can strongly measure
aircraft with passengers on board [15]. the quantum state and such a unitarity breaking operation
consequently reduces the quantum state yielding as the data
III. QUANTUM PROPERTIES corresponding to the system’s eigen state only and hence the
information contained or carried by the coherent nature of the
In Quantum computing, a qubit or a superposition state is the state is lost or we can utilize a unitary operation [17].
basic unit of quantum information. In classical computing, a bit
can either be in state 0 or state 1 but never both simultaneously,
however quantum mechanics allows the two states i.e. 0 and 1
to be exist at same time and this coherent superposition state is
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 690
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022
Further, the no-cloning theorem has great implications in
quantum computing. It prevents the usual classical methodology
of correcting the incumbent errors in the quantum states. This is
because one cannot retain the copies of a state going through
unitary evolution in the midst of the quantum manipulation and
processing. In classical computation, one always use such copies
for error correction, a technique entirely unavailable in quantum
domain on strict theoretical basis. It seems that quantum no-
cloning theorem lies at the core of the quantum theory because
the same theorem forbids superluminal communications and Pauli-Z gate: The Pauli-Z gate is a single-qubit rotation
hence guarantees the peaceful co-existence of the relativity through π radians around the z-axis.
theory and the quantum mechanics, both being the pillars of the
modern physics. Thus it is the no-cloning theorem that ensures
no-signaling condition even in the presence of nonlocal
entangled states. The most relevant consequence of the no-
cloning theorem for our case is the fact that it's impossible to
make copies or even to distinguish non-orthogonal states with
only one measurement [16], [17].
The Hadamard gate is a single-qubit operation that maps the
C. Qubits basis state |0⟩ to (|0⟩ + |1⟩)/√2 and |1⟩ to (|0⟩ − |1⟩)/√2 ,
A quantum channel provides a medium and an apparatus to thus creating an equal superposition of the two basis states.
exchange quantum information between two parties using
qubits, a set of two state quantum mechanical systems [16], [17]. IV. BB84 QKD PROTOCOL
There are many kinds of qubits such as electrons, photons, BB84 is a quantum key distribution scheme developed by
quantum dots, Josephson junctions etc. Polarized photons were Charles Bennett and Gilles Brassard in 1984 [6]. It is the
the first type of qubits to be used in practice and they continue to pioneering quantum cryptography protocol. The protocol is
be popular today on practical grounds, since they are relatively provably secure, relying on the quantum property that
easy to obtain compared to other qubits, and they can be information gain is only possible at the expense of disturbing the
exchanged either through fiber optic cables or free space. In signal. It is usually explained as a method of securely
classical physics light is an electromagnetic waves, when communicating a private key from one party to another.
quantized will becomes the stream of photons, quantum particle
Although practical quantum computing is yet
of light (or electromagnetic waves). The term polarization
underdevelopment, the quantum cryptography is already a
classically donates the directionality of wave’s electric field [8],
reality and products are out in the market pioneered by firms like
but can be also seen as an intrinsic property of single photons.
ID Quantique, MagiQ Technologies, SmartQuantum and there
Natural and commonly used sources of the electromagnetic
are research groups working on it at corporations like HP, IBM,
radiations are often found in the form of unpolarized and
and Toshiba [18].
incoherent light. This is because most of such sources generally
mix up of diverse frequencies, phases and electric field vector Security in software or online applications is generally
orientations corresponding to a randomized set of polarization provided by classical encryption algorithms like DiffieHellman,
states. Now the conventionally employed strategy to get El-Gamal, RSA, and ECC [13], but all of these are either
polarized light is either to use a polarization filter that blocks all breakable or subject to cryptanalysis if sufficient technological
undesired components and only allows a specific polarization to resources were available. In quantum cryptography, on the other
pass through or alternatively to utilize a laser with Brewster hand, it can be proved that Eve cannot access information
angle window generating coherent and polarized light. [17]. without Alice (sender) and Bob’s (recipient) knowledge.
D. Quantum Gates BB84 and its variants are now most popular QKD protocols
A quantum gate or quantum logic gate is a simple quantum and use quantum bits in one pass and this is followed by two
circuit working on few qubits. They are the analogs for quantum additional passes of classical data transmission.
computers to classical logic gates for regular digital computers. A. BB84 Protocol (without Evesdropper)
Quantum logic gates are reversible, not like many classical logic
gates. Some universal classical logic gates, Toffoli gate for We’ll be dividing the process of sharing and creating the key
instance, gives reversibility and can be directly mapped onto between Alice and Bob in to six total steps.
quantum logic gates. Quantum logic gates are represented by 1. Alice generates a random-string which is a key that will be
unitary matrices [17]. shared with Bob.
The common quantum gates usually work on spaces of at 2. Alice converts the string bits into its corresponding qubits.
most two qubits. Implying that quantum gates can be depicted in If bit is a 0, Alice prepares qubit on negative Z axis,
matrices as 2 x 2 or 4 x 4 with orthonormal rows. otherwise on positive Z axis. If Alice has 1 in her rotate
Pauli-X gate: The Pauli-X gate is a single-qubit rotation string, she rotates her key qubit with Hadamard gate.
through π radians around the x-axis. 3. Alice sends those qubits to Bob, randomly rotating some
into superposition, effectively turning key into random
Pauli-Y gate: The Pauli-Y gate is a single-qubit rotation noise.
through π radians around the y-axis.
4 Bob receives the qubits and randomly rotates some qubits
in the opposite direction before measuring them. If Bob has
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 691
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022
a 1 in his rotate string, he rotates the incoming qubit in |𝜙⟩ ⊗ |Σ⟩ → |𝜓⟩ ⊗ |ξ′⟩
opposite direction with Hadamard gate. Bob then measures Now, Eve only gets useful information when |ξ⟩ and |ξ′⟩ are
the state of the qubit and records the result. different and true copies of |𝜓⟩ and |𝜙⟩, respectively. Now it is
5 Alice and Bob will publicly share which qubits were well known that inner product is totally preserved for the
rotated, they will know the original key bit value made it to unitarily evolving quantum systems. This implies that;
Bob when both have used the same transformations or same
⟨ξ|ξ′ ⟩⟨ψ|ϕ⟩ = ⟨Σ|Σ⟩⟨ψ|ϕ⟩ (2)
basis that is either both did nothing or both rotated. As a
result, only some bits of the Alice’s original key have made ⟨ξ|ξ′ ⟩ = ⟨Σ|Σ⟩ = 1 (3)
it. Hence, |ξ⟩ and |ξ′⟩ strictly needs to be identical and therefore
6 Alice and Bob create their keys, both keeping the bits that one can easily conclude that Eve should always have to disturb
they know made it to the other one. irreparably at least one of the state in order to acquire the desired
B. BB84 Protocol (with Evesdropper) information.
We’ll be dividing the process of sharing and creating the key
between Alice and Bob in eight total steps, this time with an
eavesdropper named Eve. V. IMPORTANT TOOLS FOR QUANTUM SIMULATION
1 Alice generates a random-string for creating a key, like A. IBM Quantum Experience
before she will convert the string bits to corresponding The Quantum composer developed by the IBM venture,
qubits. earlier commonly termed as the IBM Quantum Experience
2 Alice sends her qubit to Bob but Eve measures the results. offers a real-time, online accessibility publically to use IBM’s
3 To avoid suspicion, Eve prepares qubits corresponding to cloud based quantum computing facility [19]. This free offer
includes access to prototype quantum processing facility
the bits she measured and sends them to Bob. Since Eve
developed by the IBM along with the instructions, tutorials and
doesn’t know which of the qubits she measured were in interactive textbook for helping out the beginners. As of the early
superposition or not, she doesn’t even know whether to months of the year 2021, about 20 quantum computational
send exact values she measured or opposite values. In the gadgets were in operation out of which six were dedicated for
end, sending on exact values is just as good as a deception free computational services available to the working public.
as mixing them up again. Such a free service can be effectively utilized to solve and
4 Alice and Bob randomly select the same parts of their keys simulate computational scenarios as well as to get good tracing
to share publicly. through the available tutorials and related resources on the
5 If the selected part of the keys did not match, they know emerging subject of the quantum computing.
Eve was eavesdropping.. Taking of the hardware, the IBM quantum machines
6 If the selected part of the keys did match, they can be incorporates qubits comprised of superconducting transmon. In
confident that the Eave was not eavesdropping. order to avoid decoherence, a major threat to quantum
7 They throw away the part of the key they made public and informatics, along with other noises and errors, IBM has
keep encrypting and decrypting messages with the portion employed a dilution refrigerator that operates at extremely low
of the key they have left. temperatures. These Quantum computers are installed at IBM
research facility situated at the Thomas J. Watson Research
C. Quantum Key Distribution center. Here the users can easily interact with quantum computer
Let us assume that an intruder or eavesdropper through the circuit model of the computation employed by the
conventionally termed as Eve is trying to decode the message by IBM. Such circuits are structured either by using graphical
intercepting the secret communication between the legal parties interface linked with the quantum composer or alternatively
conventionally called Alice and Bob. This interception if carried utilizing programming option offered in the Python’s Jupyter
over the quantum channel is doomed to fail because quantum key notebook available as a guideline for the quantum lab. Circuits
distribution is protected by two very fundamental principles of are generally designed by using Qiskit tools and are compiled
the quantum theory which are namely the no-cloning theorem through OpenQASM prior to real execution over a true Quantum
and the measurement induced detectable changes in the quantum computing system.
state [17]. Further, the quantum discrimination theory states that This incorporates admittance to a bunch of IBM's prototype
it is impossible to differentiate or discriminate two mutually non- quantum processors, a bunch of tutorials on quantum
orthogonal states and hence it is no way possible to acquire the computation, and access to an interactive textbook. As of
desired, coded information without imploding at least the February 2021, there are more than 20 devices on the service, six
quantum state of the one qubit under consideration. of which are freely accessible by public. This service can be
Let us see how no-cloning theorem forbids such a action by utilized to run algorithms and experiments, and explore tutorials
blocking the copying option. Assume that we are given two and simulations around what may be possible with quantum
states |𝜓⟩ and |𝜙⟩, respectively. We further assume that these computing [19].
states are, in general, mutually non-orthogonal. Now, suppose B. Python Qiskit
that Eve is attempting to acquire the information encoded into
such states by copying them over an initialized ancilla qubit |Σ⟩. Qiskit is an openly accessible open source for utilizing
The cloning machine works unitarily as under; quantum computers for data processing [11,20]. Qiskit permits
simple and innovative as well as easy research conduction for
|𝜓⟩ ⊗ |Σ⟩ → |𝜓⟩ ⊗ |ξ⟩ industrial application that have the very high potential for
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 692
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022
quantum benefits. It's a standard framework of very high multi- of four qubits. When Bob receive quantum circuit of four qubits
tasking quantum algorithms and have applications for short term and measure it with randomly selected basis choice. There are
quantum computing problems. Qiskit utilizes Python 3.6 or later 2𝑛 = 24 = 16 different possible states (bit strings) may appear
versions. However, one must keep in mind that both Qiskit and as a result.
Python are continuously under development independently and
issues of compatibility may occur with time. For the sake of simplicity, if Bob measures quantum circuit
with single shot (by default in Qiskit number of shots are 1024)
Python is an efficient and interpreted high-level generic then only one state appears out of total sixteen possibilities. We
programming language and its structural morphology pay high store this state into a list for making a key, every character of this
attention on code readability with its vitally important utilization state is saved as a single and separate bit of information. During
of indentation [20]. measurement, Bob saves all the basis choices into the list and
same has already done on the other end i.e. Alice side (labeled
The most suitable and widely utilized approach is to use
as Alice’s Basis and Bob’s Basis). Finally, we compare the basis
Python’s Jupyter notebook. In such a notebook, all the data,
elements of both lists correspondingly and retain those bits as a
whether dynamic or static, is incorporated into two categories i.e.
final key for which basis are identical on both sides as shown in
code cells and text cells.
Table 1.
VI. RESULTS AND ANALYSIS OF PRESENT WORK Alice’s Key 1 0 1 0
The BB84 algorithm was executed on classical as well as Alice’s Basis X X Z Z
IBM quantum simulator. The Qiskit library provides different Bob’s Basis X Z Z Z
types of classical simulators, we used the “qasm_simulator”. Bob’s Key 1 0 1 0
The IBM-Q machine also supports variety of simulators, we Final Key 1 1 0
used “ibmqx2”. On both simulators, Alice represents the sender,
Bob represents the receiver and Eve represents the intruder. The Table 1: Protocol of executing a final key when Alice shares her basis
following two experiments were performed one by one on both information with Bob on public channel.
simulators:
1) Without Eve: In this experiment, Alice sends message
to Bob using quantum channels without any intruder.
2) With Eve: In this experiment, Alice sends message to
Bob but Eve interecepts quantum channel as well.
A. Experiments using Classicial Simulator
In first case we run our experiment on classical simulator.
The actual quantum computers/simulators that are freely
available access by a lot of researchers of the whole world at a
time, therefore, they are not easily available. So, we do not send
our code directly to quantum simulator for execution if there are
any syntax or logical errors in the code. We instead use classical
simulator for verification whether our source code is logically
correct or not. Once our code shows promising results we then
put our code in queue for execution on real quantum computer. Figure 1 Measurement results of quantum circuit for four qubits on Bob end
when no intruder in between Alice and Bob. (Execution on Classical Simulator)
The source code is almost same for both cases. We use both
the options i.e. quantum and classical simulators, through
backends. Backends represent either a classical simulator or real
quantum computer and are responsible for running quantum
circuits and returning the results.
The brief detail for algorithm of the quantum circuit is as
given in this paragraph. Alice sends a quantum circuit as
message to Bob on which he performs the measurements after
receiving and gets the information in terms of probability
distribution of classical signals, as shown in Figure 1. For 𝑛
qubits ( 𝑛 = 4 in our case), we initialize the 𝑛 quantum and
classical registers associated with the quantum circuits of the
Alice and the Bob. Then, we generate the random numbers, we
are going to use them as a key. Alice assign the random bit values
to her qubits using generated random numbers. In next step,
Alice randomly apply Hadamard-gate on her 50% of qubits to
transform them into the rotated basis. She sends the complete
quantum circuit to Bob and allows him to measure all qubits in
randomly chosen basis. Bob measures the received quantum
circuit as a whole without knowing what bit sequence and basis Figure 2 Measurement results of quantum circuit for four qubits on Bob end
when intruder (Eve) in between Alice and Bob. (Execution on Classical
selection Alice has chosen for sending the quantum information Simulator)
using quantum circuit in multiple shots. Let’s take an example
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 693
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022
Now, in second experiment the Eve is involved as well. Eve
intercepts the quantum channel and tries to decode quantum
information into classical bits. After the Eve intercepted the
quantum channel, the Bob is not able to receive correct
information due to quantum principles, as evident from the
probability distribution of binary signals shown in Figure 2.
B. Experiments using IBM-Q
The IBM-Q provides the facility to run quantum
algorithm/circuits on real quantum computer. We run our
algorithm on IBM-Q machine and the Figure 3 shows the results
of first experiment, when Alice send data to Bob without Eve in
between. We can see in this case when we execute our quantum
circuit on real quantum computers there are two types of peaks
in histograms big and small peaks representing the high and less
probabilities respectively. The big peaks are due to actual
quantum circuit measurement on Bob’s end whereas the small
probabilities are result of noise effect in real quantum computer
device due to quantum coherence effects. This noise effect
Figure 4 Measurement results of quantum circuit for four qubits on Bob end
shows that in case of simulation on actual quantum computer when intruder (Eve) in between Alice and Bob. (Execution on Quantum
there are some probabilities getting wrong or misleading results. Computer, IBM Simulator).
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 694
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022
[6] G. Bennett, Charles H and Brassard, “Proceedings of the ieee international
conference on computers, systems and signal processing,” IEEE New,
1984.
[7] H. M. Wiseman and G. J. Milburn, “QUANTUM MEASUREMENT
AND CONTROL”.
[8] W. K. Wootters and W. H. Zurek, “A single quantum cannot be cloned,”
Nature, vol. 299, no. 5886, pp. 802–803, 1982.
[9] B. Qi, L. Qian, and H.-K. Lo, A brief introduction of quantum
cryptography for engineers. 2010. [Online]. Available:
http://arxiv.org/abs/1002.1237
[10] T. Koshiba, “Quantum cryptography,” Handb. Nat. Comput., vol. 3–4, no.
January, pp. 1521–1543, 2012.
[11] “QISKIT,” QISKIT, “qiskit.org,” [Online]. Available: https://qiskit.org/.
[12] D. E. Denning and G. M. Sacco, “Timestamps in Key Distribution
Protocols,” Commun. ACM, vol. 24, no. 8, pp. 533–536, 1981.
[13] W. Stallings, “Cryptography and Network Security,” Pearson Educ., no.
Third edition, 2003.
[14] R. L. Rivest, “‘Cryptography’. In J. Van Leeuwen (ed.). Handbook of
Theoretical Computer Science.,” Elsevier, 1990.
[15] J. Banks, “Discrete event system simulation,” Pearson Educ. India, 2005.
[16] M. S. Zubairy, “Quantum Mechanics for Beginners: With Applications to
Quantum Communication and Quantum Computing,” Oxford Univ. Press,
2020.
[17] I. L. C. M.A Nielsen, “Quantum computation and Quantum information,”
Cambridge Univ. Press, 2000.
[18] A. S. and Z. Yuan, “Key to the Quantum Industry,” Phys. World, 2007.
[19] IBM, “IBM Makes Quantum Computing Available on IBM Cloud to
Accelerate Innovation,” IBM News room, 2016, [Online]. Available:
https://www-03.ibm.com/press/us/en/pressrelease/49661.wss
[20] “QISKIT ‘qiskit.org’ Learn Quantum Computation using Qiskit:
https://qiskit.org/textbook/ch-states/introduction.html”.
Proceedings of 2022 19th International Bhurban Conference on Applied Sciences & Technology (IBCAST) 695
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on March 31,2024 at 23:49:58 UTC from IEEE Xplore. Restrictions apply.
Islamabad, Pakistan, 16th – 20th August, 2022