mod01lec09 - Quantum Gates and Circuits - Part 2

NPTEL-NOC IITM
11 Oct 202220:55

Summary

TLDRThis lecture delves into the intricacies of quantum computing, focusing on multiple qubit gates that transform multipartite quantum states, akin to classical logic gates but with reversibility. It introduces the CNOT gate, pivotal for conditional transformations, and explores other gates like Control Y, Control Z, and the Phase gate. The Hadamard gate's role in creating superpositions is highlighted, essential for exponential state space computations. The lecture also covers universal gates, circuit identities, and the ability to synthesize unsupported gates using available ones, concluding with a foundation for further exploration into entanglement and quantum algorithms.

Takeaways

  • 🧑‍🔬 A multiple qubit gate is a generalization of a single qubit gate, capable of transforming multipartite quantum states, similar to how a single qubit gate transforms individual qubits.
  • 🔄 Multiple qubit gates can be represented as taking n qubits as inputs and producing n qubits as outputs, which aids in simplifying computations.
  • 🔄 The concept of reversibility in quantum gates is crucial; given the output qubits, the input qubits can be recovered, a property stemming from the unitary nature of quantum mechanics.
  • 🧬 The CNOT (Control NOT) gate is a significant two-qubit gate, analogous to the XOR gate in classical computing, flipping the state of one qubit based on the state of another.
  • 🔄 The CNOT gate, along with other controlled gates like the Control Y and Control Z, manipulates qubits based on the state of control qubits, showcasing conditional transformations.
  • 🔄 The Hadamard gate is instrumental in creating superpositions, allowing for the generation of a 2^n-dimensional state space from an n-qubit state, which is vital for quantum algorithms.
  • 🔄 Universality in quantum computing refers to the ability of a set of gates to perform any possible quantum transformation, with the Hadamard and T gates, or the Hadamard and phase gates, being examples of universal sets.
  • 🔄 Circuit identities allow for the creation of complex gates from simpler ones, leveraging the properties of gates like the Hadamard to simulate other transformations, such as the CZ gate from CX gates.
  • 🔄 The Swap gate is an example of a simple circuit identity that can be decomposed into a sequence of CNOT gates, demonstrating how to manipulate qubits to achieve specific state transformations.
  • 🔄 The lecture series progresses from basic quantum computing concepts to more advanced topics like entanglement and interference, eventually leading to practical programming on quantum computers.

Q & A

  • What is a multiple qubit gate and how does it differ from a single qubit gate?

    -A multiple qubit gate is a generalization of a single qubit gate, capable of transforming a multipartite quantum state. Unlike a single qubit gate, which operates on one qubit, a multiple qubit gate takes multiple qubits as inputs and produces multiple qubits as outputs, enabling more complex transformations.

  • What is the significance of the reversibility property in multi-qubit gates?

    -Reversibility in multi-qubit gates is significant because it allows the recovery of input qubits from the output qubits, given the transformation function. This is possible due to the unitary nature of quantum mechanics, where the conjugate transpose (dagger) of a matrix representing the gate is its inverse, ensuring that the gate and its inverse can be used to transform states back and forth.

  • Can you explain the CNOT gate and its function in quantum computing?

    -The CNOT gate, also known as the control-NOT or CX gate, is a two-qubit gate that performs a conditional bit flip on the second qubit based on the state of the first qubit (control qubit). If the control qubit is 1, it applies an X gate (bit flip) to the second qubit; if the control qubit is 0, it leaves the second qubit unchanged. This gate is fundamental in quantum computing for creating entanglement and performing conditional operations.

  • How does the Hadamard gate contribute to creating a superposition state?

    -The Hadamard gate is instrumental in creating superposition states by applying a transformation to qubits that puts them into a state where each possible state is equally probable. When applied to a multi-qubit state, it results in a superposition of all possible combinations of the qubits, allowing for operations on an exponentially large state space.

  • What is the role of the universal gate in quantum computing?

    -In quantum computing, a universal gate or a set of gates is capable of performing any possible quantum transformation, meaning they can convert any input quantum state into any desired output state. This is analogous to universal gates in classical computing, such as NAND or NOR gates, which can be combined to perform any Boolean operation. Examples of universal sets in quantum computing include the Hadamard gate and the T gate, or the Hadamard gate and the phase gate.

  • How can the control-Z (CZ) gate be synthesized using gates available in typical quantum hardware?

    -The control-Z (CZ) gate can be synthesized using a combination of a Hadamard gate and a CNOT gate. By applying a Hadamard gate to the target qubit, followed by a CNOT gate with the same qubit as both control and target, and then another Hadamard gate to the target qubit, one can effectively implement a CZ gate, which applies a phase shift conditioned on the control qubit being in state 1.

  • What is the significance of circuit identities in quantum computing?

    -Circuit identities in quantum computing are crucial for deriving complex gate operations using simpler, natively supported gates. They allow for the construction of any desired quantum circuit using a limited set of basic gates, which is particularly important given hardware limitations in the types of transformations that can be directly applied.

  • Can you provide an example of how the SWAP gate can be decomposed into simpler gates?

    -The SWAP gate, which exchanges the states of two qubits, can be decomposed into three CNOT gates. By applying CNOT gates in a specific sequence, one can effectively swap the states of two qubits without needing a dedicated SWAP gate, which may not be natively supported by all quantum hardware.

  • What is the purpose of applying a Hadamard gate to each qubit in a multi-qubit state?

    -Applying a Hadamard gate to each qubit in a multi-qubit state is done to create a superposition of all possible states. This results in a state where each combination of the qubits (from all zeros to all ones) has an equal probability amplitude, allowing for parallelism in quantum computation and enabling algorithms to explore a large state space efficiently.

  • How does the concept of entanglement relate to the operations performed by multi-qubit gates?

    -Entanglement is a quantum phenomenon where the state of one qubit becomes dependent on the state of another, even when separated by large distances. Multi-qubit gates, particularly those that perform conditional operations like the CNOT gate, are instrumental in creating and manipulating entangled states, which are essential for quantum algorithms and quantum computing's advantage over classical computing.

Outlines

00:00

🧲 Introduction to Multi-Qubit Gates

This paragraph introduces the concept of multi-qubit gates as an extension of single-qubit gates, which are crucial in transforming multipartite quantum states. It explains how these gates take multiple qubits as inputs and produce the same number of qubits as outputs, highlighting the ease of computation with this approach. The paragraph also delves into the property of reversibility inherent in multi-qubit gates due to the unitary nature of quantum mechanics, where the input state can be recovered from the output state, given the gate's function. The CNOT gate is introduced as an example, analogous to the XOR gate in classical computing, which flips the state of one qubit based on the state of another. The explanation includes the matrix representation of the CNOT gate and its action on qubit states, emphasizing its role in quantum computing circuits.

05:01

🔄 Reversibility and Other Multi-Qubit Gates

The second paragraph expands on the reversibility of quantum gates, emphasizing that given the output qubits, the input qubits can be recovered, a principle stemming from the unitary nature of quantum mechanics. It then discusses other types of multi-qubit gates, such as the control-Y and control-Z gates, which behave similarly to the CNOT gate but act on different bases. The paragraph also introduces the phase gate, which shifts the phase of a two-qubit state based on the state of the control qubit, and the swap gate, which exchanges the states of two qubits. A three-qubit gate, the Toffoli gate (CCNOT), is also mentioned, which flips the third qubit if the first two qubits are in the state |11>. The Hadamard gate is highlighted for its ability to create a superposition of states, a fundamental operation in quantum algorithms, and its matrix representation is discussed.

10:01

🔄 Universality in Quantum Gates

This section discusses the concept of universality in quantum computing, where a set of gates can be combined to perform any possible quantum transformation. It mentions the Hadamard and T gates, along with the CNOT gate, as examples of a universal set that can achieve any two-qubit transformation. The paragraph also touches on the idea that not all necessary gates may be natively supported by quantum hardware, leading to the need for circuit identities that allow the synthesis of non-native gates using native ones. The example of deriving the CZ gate from the CX gate using Hadamard gates is provided, showcasing how different gates can be combined to achieve the desired quantum operations.

15:03

🔄 Circuit Identities and Quantum Computing Basics Conclusion

The final paragraph of the script covers circuit identities, which are essential for creating gates that may not be directly supported by quantum hardware. It uses the example of the swap gate to demonstrate how a sequence of CNOT gates can achieve the desired transformation. The paragraph concludes by summarizing the week's learnings, which include understanding qubits, single and multi-qubit states, quantum gates, and their applications in building quantum circuits and algorithms. It also provides a preview of upcoming topics, such as entanglement and interference, which are key to harnessing the full power of quantum computing, and hints at practical programming on quantum computers in future lectures.

Mindmap

Keywords

💡Multiple qubit gate

A multiple qubit gate is a quantum gate that operates on two or more qubits simultaneously. It is a generalization of the single qubit gate, capable of transforming a multipartite quantum state. In the context of the video, this concept is central to understanding how quantum information can be manipulated in a quantum computer. The script mentions that applying a multiple qubit gate to a state q_1 to q_n results in a different state q'_1 to q'_n, highlighting the gate's role in quantum computation.

💡Reversibility

Reversibility in quantum computing refers to the property of quantum gates that allows the input state to be recovered from the output state. This is a key difference from classical gates, where knowing the output does not necessarily allow one to determine the input. The script explains that quantum mechanics is unitary, meaning that the matrix representing a gate is invertible, which is why the input qubits can be recovered from the output qubits, given the transformation function.

💡CNOT gate

The CNOT gate, also known as the control-NOT gate, is a two-qubit gate that is fundamental in quantum computing. It performs a NOT operation on the second qubit if the first qubit (control qubit) is in the state |1⟩. The script uses the CNOT gate as an example to illustrate how a two-qubit state is transformed, where it flips the state of the second qubit based on the state of the first qubit. This gate is crucial for creating entanglement and performing conditional logic operations in quantum circuits.

💡Unitary

In quantum mechanics, a unitary operation is one that preserves the inner product of quantum states, meaning it is reversible. The script emphasizes that quantum gates are unitary, which is why they can transform qubits in a reversible manner. This property is essential for quantum error correction and the reversibility principle discussed in the video.

💡Dirac notation

Dirac notation, also known as bra-ket notation, is a standard notation used in quantum mechanics to describe quantum states. The script mentions that the CNOT gate can be represented in Dirac notation, which is a way to express the transformation of quantum states in a compact form. This notation is particularly useful for representing the action of quantum gates on quantum states.

💡Hadamard gate

The Hadamard gate is a single-qubit gate that creates a superposition of states. It is often used to put qubits into a superposition of |0⟩ and |1⟩. The script describes the Hadamard gate's role in generating a superposition of a multi-qubit state, which is essential for exploiting the exponential state space of quantum systems. This gate is a building block in many quantum algorithms.

💡Superposition

Superposition is a fundamental principle of quantum mechanics where a quantum system can exist in multiple states simultaneously. The script explains how the Hadamard gate is used to create a superposition of all possible states for an n-qubit system. This property is what gives quantum computers their potential computational advantage over classical computers.

💡Universal gate set

A universal gate set in quantum computing is a set of gates that can be combined to perform any unitary operation on a quantum system. The script mentions that the Hadamard and T gates, along with the CNOT gate, form a universal set. This means that any quantum algorithm can be constructed using these gates, making them essential tools in quantum computing.

💡Circuit identities

Circuit identities in quantum computing are relationships between quantum gates that allow one gate to be synthesized using other gates. The script discusses how certain gates, like the CZ gate, can be created using combinations of other gates, such as the Hadamard and CNOT gates. This is important for practical quantum computing, as hardware may not support all gates natively.

💡Entanglement

Entanglement is a quantum phenomenon where the state of one qubit is dependent on the state of another, even when the qubits are separated by large distances. The script hints at the upcoming discussion of entanglement in subsequent lectures, which is a critical concept for understanding quantum correlations and their use in quantum algorithms.

Highlights

A multiple qubit gate is a generalization of a single qubit gate, capable of transforming multipartite quantum states.

Multi-qubit gates can be viewed as taking n qubits as inputs and producing n qubits as outputs, facilitating computations.

Reversibility is a key property of multi-qubit gates, allowing input states to be recovered from outputs due to quantum mechanics' unitary nature.

The CNOT gate is introduced as the quantum equivalent of the classical XOR gate, with the ability to flip the state of one qubit based on another.

The CNOT gate's matrix representation and its action on the computational basis states are explained.

Controlled-Y and Controlled-Z gates are mentioned as variations of the CNOT gate, affecting the target qubit's state conditionally.

Phase gates are introduced, which shift the phase of a two-qubit state based on the state of the qubits.

Swap gates are discussed, which exchange the states of two qubits.

The Toffoli gate, or CCNOT gate, is explained as a three-qubit gate that flips the third qubit if the first two are in the state |11⟩.

The Hadamard gate is highlighted for its role in creating superpositions of states, a fundamental operation in quantum algorithms.

The concept of universal gates in quantum computing is introduced, paralleling the role of universal gates in classical computing.

Circuit identities are discussed, showing how to derive non-native gates using combinations of native gates supported by hardware.

An example is given on how to synthesize a Controlled-Z gate using Hadamard and CNOT gates.

The Swap gate is also decomposed into a sequence of CNOT gates, demonstrating the flexibility in quantum circuit design.

The lecture concludes with a summary of the week's topics, including qubits, quantum gates, and their applications in circuits and algorithms.

An outlook for the next week's topics is provided, focusing on entanglement and interference, which are crucial for advanced quantum computing concepts.

Transcripts

play00:01

[Music]

play00:15

a multiple qubit gate is a

play00:17

generalization of single qubit gate

play00:19

it transforms a multiparted quantum

play00:21

state just like a single qubit k

play00:23

transforms a single qubit state so the

play00:26

state q1 to qn

play00:28

when you apply a multipartite uh

play00:31

multiple qubit gate to it

play00:32

converts it to a different and cubic

play00:34

state q dash

play00:36

1 to q dash

play00:38

and this can be represented in a

play00:40

different way

play00:42

if you uh

play00:44

take each part or each qubit of our

play00:46

multicube state and

play00:48

verify them individually and you feed

play00:50

them to this particular gate

play00:52

so we can

play00:54

view this as a gate that takes n qubits

play00:57

as inputs and produce n qubit as qubits

play00:59

as outputs and more useful to look at it

play01:02

this way because then we can do

play01:04

computations

play01:05

more easily as you see

play01:08

in subsequent

play01:09

slides and

play01:11

there's another important problem uh

play01:14

property that we get from a multi-qubit

play01:18

gate which is called reversibility

play01:20

and

play01:21

remember we talked right in the

play01:22

beginning of this week that this one of

play01:25

the differences between quantum gauge

play01:27

and

play01:28

classical logic gates is that uh any

play01:31

gate if when it takes in n inputs it

play01:34

actually produces n outputs and not just

play01:35

one output

play01:36

and

play01:37

the property of any such gate is that if

play01:41

we know this function that's

play01:42

transforming these n qubits

play01:44

and we know the

play01:46

output qubits

play01:48

then the input qubits q1 up to qn can

play01:50

actually be recovered from q1 dash to q

play01:53

and dash so given the output we can

play01:55

actually recover the input and that's

play01:57

the reversibility principle

play01:59

and why is this

play02:00

this is because quantum theory and

play02:02

quantum mechanics itself is unitary

play02:04

which means that any matrix that

play02:06

represents the gate is unitary so as you

play02:08

have seen

play02:10

it means that the conjugate transpose or

play02:12

a dagger of any matrix must be its

play02:14

inverse so a times a dagger must be the

play02:16

identity matrix and what this means is

play02:18

that any gate

play02:20

that can be used to transform one

play02:23

multipartite qubit state into another

play02:26

the inverse of the gate can be used to

play02:27

transform the output of uh the output

play02:30

back to the input

play02:32

so that comes intuitively from the

play02:34

notion that

play02:35

these gates are unitary let's take the

play02:38

most uh prominent or the most

play02:40

interesting two qubit uh

play02:42

gate

play02:44

called which is which which you call the

play02:45

c naught gate

play02:46

and this is the equivalent of the xor

play02:48

gate in casual computing so if you

play02:49

remember the xor gate or if you're

play02:51

familiar with it what it means is you

play02:54

take in two bits a and b and the output

play02:56

is represented by a x or b what that

play03:00

means is that

play03:01

if both a and b are

play03:04

different than the output

play03:06

is one otherwise the output is

play03:09

zero

play03:11

so

play03:12

the equivalent of the xor gate is the c

play03:15

naught data as you just said

play03:17

and what this will produce is given

play03:20

qubits q1 and q2

play03:22

it will produce outputs q1 and the

play03:26

second output will be q1 absorbed with

play03:28

q2

play03:30

and the circuit representation of this

play03:31

is as follows

play03:34

uh we'll come back to the circuit again

play03:35

but

play03:36

the matrix that is going to transform

play03:38

our two qubit state q1 q2 to this

play03:41

particular qubit state is represented by

play03:44

this matrix and because it's uh we have

play03:46

a two qubit state uh the get that is

play03:49

represented uh by the tensor product of

play03:52

q1 and q2 is going to be four by one

play03:54

matrix therefore we need a four by four

play03:55

matrix to transform one four by one

play03:57

matrix into another okay let's see how

play04:00

that happens uh the c naught gate by the

play04:03

way can also be represented in dirac

play04:04

notation in in this form if we take the

play04:07

states uh

play04:08

0 0 they get 0 0 apply it to the bra 0 0

play04:12

and then we add other other uh get brass

play04:15

or outer products uh so this is uh can

play04:18

be represented as a sum of various uh

play04:21

outer products

play04:22

so

play04:23

let's apply the c naught to our zero

play04:26

zero sheet okay let's assume q one is

play04:27

zero q two zero

play04:29

so our zero zero state

play04:32

uh and we computed this earlier as the

play04:34

tensor product of the state zero and

play04:36

zero that ends up being one zero zero

play04:38

zero so we apply this c naught matrix to

play04:41

that which means you do a matrix

play04:42

multiplication

play04:43

and what we end up with is one zero zero

play04:46

zero okay which means this is again

play04:49

nothing but the zero zero so we apply

play04:51

the c naught gate to zero zero it does

play04:53

nothing to it it uh there's no

play04:55

transformation

play04:56

now

play04:57

generally uh what will happen is

play05:00

if we take the c naught gate uh

play05:03

if you take if our inputs are of any of

play05:05

these forms and this is the truth table

play05:08

uh here are the outputs so for state 0 0

play05:10

output is going to remain 0 0

play05:13

if state 0 1 output is going to remain 0

play05:15

1

play05:15

for 1 0 it changes to 1 1 1 1 change to

play05:18

1 0. what does this mean it means that

play05:20

if our qubit q 1

play05:22

is 0 then output remains the same

play05:25

whereas for qubit q1 is 1 then the

play05:28

output is going to flip 0 flips to 1 1

play05:31

flips to 0.

play05:33

and that's why we call

play05:35

this a c naught gate or in longer form a

play05:38

control not g or

play05:40

in there's another term for it called

play05:42

control x which means that

play05:44

we are going to be uh applying an x gate

play05:48

to the qubit q2 but controlled by what

play05:51

the state of the qubit q1 is

play05:53

okay

play05:54

so

play05:54

here we have a two qubit state and the

play05:56

first qubit ends up being a control

play05:58

qubit for the computation that is

play06:00

happening on the second cube

play06:01

that's how you should visualize it

play06:04

so

play06:05

based on the value of the control qubit

play06:07

we are going to be computing a not or a

play06:10

poly x transformation of qubit q2

play06:15

and

play06:17

the if the cube if the control cube it

play06:19

happens to be zero

play06:20

then

play06:21

this does not do anything to change the

play06:23

state of q two the controlled qubit is q

play06:25

one is going to be flipping the state of

play06:28

q two

play06:31

we can also see that this gate is

play06:33

reversible

play06:34

if we have both q1 as well as q1 and xor

play06:37

of q2

play06:39

that means that we can get back q1 and

play06:41

q2 if we are given q1 and q1 of q2 so

play06:45

the reversibility property is maintained

play06:47

as you can see here

play06:48

let us look at a few other examples of

play06:50

multicubic gates

play06:51

now the c naught gate as you've seen is

play06:53

also called the control x gate or the

play06:55

control poly x gate similarly there are

play06:57

also two cubic gates called control y

play06:59

and control z

play07:01

which preserves the strain of a qubit if

play07:03

the control qubit is zero and transform

play07:05

it in particular base if the control

play07:06

qubit is one

play07:08

another example as you can see here is

play07:10

the phase gate and

play07:12

it's represented by this two by two

play07:14

matrix so it acts on a

play07:17

bipartite state and it's going to shift

play07:19

the phase of any uh two qubit state by

play07:23

phi

play07:24

uh only if that particular state uh

play07:27

happens to be uh one one otherwise it

play07:30

leaves the

play07:32

the particular state intact

play07:35

a swap state is another interesting one

play07:37

which uh swaps two qubits what that

play07:39

means is if you give the input state q

play07:41

one q two what you get up what you get

play07:44

as output is q to q1

play07:47

and

play07:48

here is an example of a three qubit

play07:49

state therefore it requires an eight by

play07:51

eight matrix for transformation and

play07:54

this is related to the c naught and as

play07:57

you can see it's also called the c c

play07:59

naught that's the control control knot

play08:01

so it flips our third qubit

play08:03

only if both the first two bits are

play08:07

both one so it uses uh the first two

play08:10

cubes as control qubits and

play08:13

transforms the third qubit

play08:14

and the profile gate is a gate with

play08:17

interesting properties and something

play08:18

that is used

play08:20

extensively in quantum computing

play08:22

now let us see how we can generate a

play08:24

superposition of a multiplied state and

play08:26

here's where you see how the power of

play08:28

quantum computing

play08:30

emerges and this is the

play08:32

gate that you see here is one that we'll

play08:35

end up using in

play08:36

almost all of the algorithms

play08:39

in subsequent lectures

play08:41

so

play08:42

what we want to achieve here is given an

play08:44

nq with state we want to produce a 2 by

play08:46

n 2 2 to the power n state space okay

play08:49

now we already saw that any n qubit

play08:51

state can produce a 2 to the power n

play08:53

state space but how do you produce a 2

play08:55

to the power and state space that has

play08:57

certain properties that then we can do

play08:59

some computation of okay

play09:01

so take the first qubit of our

play09:03

multi-qubit state uh q1 and let's say we

play09:06

apply add-on gate to that okay similarly

play09:08

we apply a hadamard gate to the second

play09:10

qubit or the second part of our enquiry

play09:12

state and likewise we apply hadamard

play09:14

gate up to the nth qubit okay on each

play09:17

qubit of our

play09:19

multiplied qubit state q1 up to qn we

play09:22

apply a hadamard gate on each of the

play09:23

qubits so naturally the outputs you're

play09:25

going to get are the hadamard applied by

play09:27

quite q one etc and uh for any qubit you

play09:30

can use a hadamard transform to compute

play09:32

what the output is

play09:34

now

play09:35

this can be taken

play09:37

together as one gate and we can

play09:39

represent this in this form uh this is

play09:42

the direct form of the uh multi-state

play09:45

hadamard gate and it can be represented

play09:48

with this exponent and the tensor

play09:50

product sine and exponent

play09:52

so

play09:53

what this gate is if in matrix or in

play09:56

mathematical form it ends up being a 2

play09:59

to the power n by 2 to the power n

play10:01

matrix t

play10:02

and we can get the actual matrix value

play10:05

here by doing a tensor product of the

play10:07

hadamard matrix with itself

play10:10

uh n times and we are not going to go

play10:12

into the details of the tensor product

play10:14

of of how to do the tensor product two

play10:15

different matrices but it is just a

play10:18

generalization of the tensor product

play10:20

that you saw

play10:21

in in earlier slides where

play10:23

we

play10:24

computed the the tensor product of two

play10:26

uh

play10:27

single cats to produce another get

play10:31

the hadamard uh our

play10:35

end state hadamard gate can then be

play10:38

applied to the

play10:41

input multipatter state to produce the

play10:43

final output

play10:46

so let's take one example

play10:48

so our hadamard or multi-state hadamard

play10:50

gate can let's try to apply it to our

play10:53

get

play10:54

where each qubit is in the state 0.

play10:58

so

play10:59

the state 0

play11:01

0 0

play11:02

n times

play11:04

when we take the tensor product we get a

play11:06

matrix with 2 to the power n

play11:08

rows and 1 column and

play11:11

only the first row will have the value

play11:13

zero remaining rows are going to have

play11:15

the value or the first row will have the

play11:17

value one and the remaining rows will

play11:18

all have the value zero so if we apply

play11:21

our

play11:23

h let's call it s to the power n gate to

play11:26

this particular uh

play11:28

n qubit state

play11:31

we end up getting and if we if you uh

play11:34

uh

play11:34

try this with

play11:36

a 2 to the power n pi to the power n

play11:37

matrix you can try it for smaller values

play11:40

of n

play11:40

you'll find that we get this particular

play11:43

matrix you get a

play11:45

matrix which also has 2 to the power and

play11:48

rows but now the value in each row is

play11:51

going to be 1 but the probability

play11:53

amplitude is

play11:54

what you can see here 1 by root over 2

play11:56

to the power n which means that

play11:58

what we end up with is a

play12:03

is a superposition state

play12:05

of all possible

play12:07

where each

play12:08

uh combination of uh our n qubits that

play12:12

is if we set any of the qubits to their

play12:15

one or the zero so we are going to get

play12:17

we can get any of one of two to the

play12:19

power n states right from zero zero zero

play12:21

zero up to one one one one and

play12:23

everything in between different

play12:24

combinations zeros and ones so the state

play12:26

we end up getting here is a state where

play12:29

we get all of we have all of the total

play12:31

power and states in superposition and

play12:32

they all have uh equal probability

play12:35

that's what we get here so from a state

play12:39

that uh has uh just n possibilities or

play12:42

uh because or rather it has just one

play12:45

possibility because

play12:46

all of our qubits are in state 0 we end

play12:49

up getting a state which can uh which

play12:52

when measured can lie in any of one of

play12:55

two to the power n states and now we can

play12:57

do a lot of user computation on this and

play12:59

this is a property or that this sort of

play13:02

hadamard transform you see is very

play13:04

useful in algorithms where we want to do

play13:07

fast computations on uh exponential size

play13:10

state spaces and

play13:12

get results

play13:15

much faster than we would in an

play13:16

equivalent algorithm that we could run

play13:18

the bar on a classical computer the

play13:20

property of universality may be already

play13:22

familiar to you if you uh know how to

play13:25

program on classical computers uh

play13:27

what a universal gate is is a

play13:30

single gate or a set of gates that

play13:32

compute

play13:32

any possible function that we would like

play13:34

that is it can transform

play13:36

any input state into any output state

play13:39

through some combination of

play13:42

those gates

play13:43

in passive computing

play13:46

we have if we take the set of case and

play13:48

or not through any combinations of and

play13:51

or not we can express any uh boolean

play13:54

transformation that is we can convert

play13:56

any boolean state to any other billing

play13:58

state

play13:59

the nand and the nor gates are by

play14:01

themselves universal gates which means

play14:03

that we can use we can apply uh

play14:07

one or more nand gates to produce any

play14:10

possible boolean transformation

play14:11

similarly we can apply one or more nor

play14:13

gauge to produce any boolean

play14:15

transformation

play14:17

this

play14:18

the boolean transformation that we're

play14:19

talking about here are converting one

play14:21

logical expression

play14:23

into into another

play14:26

in quantum computing similarly

play14:29

what we need

play14:31

is the ability to convert

play14:33

one point quantum state to another but

play14:37

the the notion of universality stays

play14:40

requires

play14:41

the ability to convert any possible and

play14:43

cubic state to any other possible and

play14:46

and cubic state so

play14:47

it's very useful to

play14:50

have a set of gates that can allow

play14:53

from which we can just pick and

play14:55

use any particular combination of gates

play14:57

to produce any transformation so uh

play15:00

the sets that you see here are uh

play15:02

candidate universal uh sets so if we

play15:05

take the h gate and we take a gate

play15:08

called the t gate which you are not

play15:09

encountered here but

play15:11

you may encounter it in subsequent

play15:12

lectures and the c naught

play15:14

the using any uh

play15:16

one or more of these gates it turns out

play15:18

that we can

play15:20

affect any uh two qubit transformation

play15:22

similarly uh the

play15:24

the state hadamard the the set of gays

play15:27

hadamard and toefl end up being another

play15:30

uh universal set uh what this means in

play15:33

uh quantum computing terms or

play15:35

in uh linear algebraic terms is that

play15:38

uh we want a set of gates that

play15:43

from which we can pick some combination

play15:45

of gates and implement any possible

play15:47

unitary

play15:49

matrix function

play15:51

moving to circuit identities this is the

play15:53

last topic we will cover in this lecture

play15:57

note that not all important gates

play16:00

that we need that are and that are going

play16:02

to be useful to us in a quantum circuit

play16:05

can be directly applied by hardware that

play16:07

is hardware is limited by what kind of

play16:09

transformations it can natively support

play16:13

so if our hardware is limited to

play16:15

supporting particular kind of

play16:16

transformations or particular kinds of

play16:18

gates

play16:19

if we need a different kind of gate what

play16:22

we would need is the ability to derive

play16:25

those gates using combination of gates

play16:27

that the hardware actually supports okay

play16:29

so take for example the c naught gate

play16:31

now

play16:33

c not gate does a

play16:35

conditional bit flip on the second qubit

play16:38

based on the first control cable right

play16:40

uh now consider the another gear that we

play16:43

discussed briefly a couple of slides ago

play16:45

the control z

play16:47

now what this does is it applies the

play16:49

polyz gate to the second qubit based on

play16:51

what the state of the control qubit is

play16:53

but does the condition face

play16:55

in other words

play16:56

now the c naught gate is something that

play16:58

is often present in most commercial

play17:01

hardware in commercial quantum computers

play17:03

so for example in the ibm quantum

play17:05

computer we can natively apply a c

play17:08

naught or a csk but

play17:11

uh the same uh quantum computer does not

play17:13

natively support a control z gate it's

play17:16

not directly available so what we need

play17:18

is we need to derive an identity whereby

play17:20

we can uh use uh

play17:22

some combination of c naught gates and

play17:24

other gates that are supposed supported

play17:26

by the hardware to produce uh a c z gate

play17:31

and we can it turns out we can actually

play17:33

do this fairly simply at least for this

play17:35

particular example uh

play17:37

you know that we can use hadamard gauge

play17:38

to switch between the x and the z basis

play17:41

right from the x to z basis and back

play17:44

what this means is that uh the hadamard

play17:46

applied to state zero produces state phi

play17:49

one ah produced state minus hadamard

play17:51

applied to plus produces zero

play17:54

and had multiplied to minus produces one

play17:56

so we have learned this

play17:58

earlier it turns out using matrix

play18:01

multiplication

play18:03

these two conditions that you these two

play18:04

expressions that you see here they hold

play18:06

what does this mean it means that if you

play18:08

apply multiply the hadamard by the x and

play18:12

again multiply the hadamard you end up

play18:14

getting the z

play18:15

and likewise if you multiply h by z by h

play18:19

you get x okay and that's something you

play18:21

can actually try out as an exercise if

play18:22

you take the hadamard matrices and x

play18:24

matrices and the z matrices that you've

play18:26

already encountered in previous slides

play18:28

and do the matrix multiplications to

play18:29

verify for yourself

play18:34

how can we

play18:35

realize the c dead gate out of ex gates

play18:38

using this particular identity

play18:40

let's take a look at the circuit

play18:42

uh the z gate

play18:44

is the application of a hadamard gate

play18:46

followed by an x-gate followed by a

play18:48

hadamard right i'm going in the reverse

play18:49

direction remember that

play18:51

what this means is that

play18:55

a z transformation can be produced by

play18:57

applying a hadamard followed by an x

play19:00

followed by another hadamard and

play19:03

because it's a two qubit state we simply

play19:05

going to be applying this transformation

play19:07

to our second qubit which is what the

play19:09

transformation uh usually works on

play19:11

because our first qubit is just a

play19:12

control cube okay

play19:14

so the

play19:16

uh

play19:17

just by applying uh an edge followed by

play19:20

c naught followed by an edge we can

play19:21

realize uh zero key so if our hardware

play19:23

supports both hadamard as well as c

play19:25

naught we can synthesize a

play19:28

uh or uh we can compose a c that state

play19:31

another example let's take the swap gate

play19:33

okay

play19:34

state q and q two is uh converted to

play19:37

state q to q1 okay

play19:39

how can this be

play19:41

a decomposition of

play19:43

individual states

play19:44

it turns out this is also fairly simple

play19:48

and all we need is we need to apply

play19:50

three c note gates in sequence to

play19:52

produce this transformation okay and

play19:54

we're not going to go on the map but you

play19:56

can verify this yourself using uh the

play19:58

tools that we already discussed in

play20:00

previous slides

play20:02

all right this brings us to the end of

play20:03

uh this particular lecture as well as

play20:05

this particular week so this is the

play20:08

final module of the quantum computing

play20:09

basics

play20:10

uh you've learned all about qubits and

play20:13

single and multiple qubit states you

play20:15

learn about quantum gates and their wave

play20:17

properties both for

play20:19

single state transformations and

play20:21

multiplier state transformations and

play20:23

you've seen how to use them as building

play20:24

blocks for

play20:26

quantum circuits or algorithms

play20:29

next week you will learn about the

play20:31

concepts of

play20:32

entanglement interference which are

play20:35

slightly advanced topics but which are

play20:37

which still follow from quantum

play20:38

mechanical integrations and once we uh

play20:41

learn how we can harness the power of

play20:43

entanglement interference we will then

play20:45

move on to practical programming where

play20:47

you will learn

play20:48

cascade as well as

play20:50

how to program on

play20:51

ibm frontend computers

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Quantum GatesQubit StatesQuantum ComputingCNOT GateHadamard GateUnitary GatesQuantum AlgorithmsReversibilitySuperpositionQuantum Circuits
¿Necesitas un resumen en inglés?