TRANSCRIPTEnglish

Variational Quantum Algorithms

15m 13s2,434 words451 segmentsEnglish

FULL TRANSCRIPT

0:00

let's dig into the subject of

0:01

variational quantum algorithms

0:05

so variational circuits are the

0:06

practical embodiment

0:08

of the idea that we want to train

0:09

quantum computers the same way we train

0:11

neural networks and the basic way a

0:15

variational quantum circuit is is that

0:16

if there is some quantum circuit that

0:18

forms the

0:18

basic subroutine of a larger algorithm

0:22

the quantum subroutine takes in the

0:24

state preparation or

0:25

kind of input data x and it also has

0:28

some circuit parameters

0:29

theta and then it outputs some

0:31

measurement statistics

0:32

these measurement statistics go through

0:34

some classical processing

0:36

and then you use some optimizer or some

0:39

update rule to

0:40

update the parameters in some outer

0:42

classical optimization

0:44

loop now variational circuits are also

0:46

called parametrized quantum circuits or

0:48

even quantum neural networks

0:53

so a variation of circuits consists of

0:55

the following ingredients

0:56

so first thing we want to do is prepare

0:58

some initial state psi

1:00

and as usual this is often a ground

1:03

state or a zero state or some fixed

1:05

reference state

1:06

and then we want to execute some

1:08

parametrized unitary transformation

1:11

which

1:11

breaks down to a sequence of gates and

1:13

the parametrized

1:15

is important here because that's that's

1:17

where the variational parameters come in

1:18

those are the things that we're going to

1:19

vary are the parameters of the gates

1:22

so the architecture of the circuit is

1:23

fixed but the parameters fed to the

1:25

gates are not fixed

1:27

and then to convert quantum information

1:29

back to classical information we want to

1:30

measure some particular observable

1:32

which we'll call b

1:36

so a particular variational algorithm

1:39

will contain

1:40

a few fundamental ingredients so

1:43

first you need to decide on a circuit

1:46

and sats

1:47

so an ansat is the

1:51

structure the architecture of the

1:53

circuits and

1:54

this is sometimes fixed in place for a

1:56

particular algorithm

1:57

or it's sometimes up to the user to

2:00

decide what this can be

2:02

we also need a problem-specific cost

2:05

function so this is something that

2:06

codifies a particular objective of

2:09

interest that we want to minimize or

2:10

maximize

2:12

and relates it back to the outputs of

2:14

the quantum circuits

2:16

and then we need a training algorithm

2:18

and for me i would like to really focus

2:21

on gradient descent but you could use

2:22

other training procedures if you'd like

2:24

and what the training algorithm should

2:26

do is it should take

2:28

some function computed from the output

2:31

measurements of the quantum circuit and

2:32

then

2:33

update this circuit's parameters based

2:35

on that information

2:38

so a famous example of a variational

2:40

circuit is called the variational

2:42

quantum eigenself it's one of the very

2:44

first variational algorithms

2:46

and it's in particular focused on

2:48

quantum chemistry problems so simulating

2:50

chemicals using quantum computers

2:54

so the three ingredients i said you need

2:57

are the ansats the cost function the

2:58

training

2:59

so the ansats could be something that's

3:02

very much

3:02

heavily tied to the intuition or the

3:05

chemical

3:06

or physical nature of the problem in

3:07

this case something called unitary

3:10

coupled clusters singles and doubles

3:12

it's a particular answer that's related

3:14

to quantum chemistry

3:16

we need some problem-specific cost

3:18

function and in the case of eqe

3:21

this is actually a energy measurement so

3:23

you have some

3:25

hamiltonian observable some some

3:28

output that you observe that measures

3:30

the energy of your circus

3:33

and then the training procedure and

3:34

again in this particular example i've

3:35

chosen gradient descent and i'm going to

3:37

use the perimeter shift rule

3:38

to compute the gradients and the goal is

3:40

to minimize

3:42

the cost function which is the energy so

3:44

it's going to find the minimum energy

3:46

state of a particular hamiltonian or a

3:49

particular physical system

3:52

another example is qaoa i've heard also

3:56

called kwawa but i don't really like

3:58

that's

3:58

that name it stands for quantum

4:00

approximate optimization algorithm

4:03

so in this particular case the ansats is

4:06

a very particular structure it's it's

4:09

something that comes from the

4:11

initial statement of the problem itself

4:14

and it consists of a repeated series or

4:17

a repeated layering of different

4:19

circuit sub-circuits so there's a cost

4:23

circuit which implements something

4:24

related to a cost function and then

4:26

there's a mixer

4:28

circuit or sub-circuit which implements

4:29

something which kind of jumps

4:31

or coherently moves into different

4:34

configurations

4:36

so in the case of qaoa the cost function

4:39

is something that is encoding a

4:42

optimization problem so you might have

4:44

an optimization problem

4:45

a discrete optimization problem with

4:47

many clauses that have to be satisfied

4:49

and you can encode this

4:50

into an ising type model a spin chain

4:53

type model which

4:54

can then can be converted to some

4:57

observables that you would measure on a

4:59

quantum circuit

5:00

and this particular example i'm going to

5:02

use gradient descent but instead of

5:03

using

5:04

standard optimizer i'm going to use a

5:06

shots frugal optimizer

5:08

for instance something called rosalind

5:09

so there's there's lots of different

5:10

ingredients that play here that you can

5:13

pick and choose or might be specifically

5:16

chosen by the variational algorithm

5:17

itself

5:20

so there's a number of different uh

5:24

variational algorithms out there in the

5:25

literature there's actually quite a few

5:27

and you can break them down into

5:28

different subject

5:29

areas so there's ones related to

5:31

chemistry or physics so these are

5:33

preparing quantum states that emulate

5:36

physical systems

5:37

or tell you interesting properties of

5:40

physical systems

5:42

there are variation algorithms related

5:44

to

5:45

mathematical problems such as factoring

5:47

or solving linear equations

5:49

and these can be seen as near-term

5:52

candidates to

5:54

replace things like shore's algorithm or

5:56

hhl algorithm for solving linear

5:58

systems of equations there's also

6:02

a number of variational algorithms tied

6:04

to machine learning and this is not too

6:06

surprising because variational

6:07

algorithms are inheriting a lot of

6:09

structure from machine learning so

6:11

machine learning is one of the natural

6:12

application areas

6:14

so there's quantum generative

6:15

adversarial networks there's quantum

6:16

classifiers there's

6:18

different kinds of quantum neural

6:19

networks for instance recurrent networks

6:21

or graph networks or optical

6:24

implementations or convolutional quantum

6:27

versions of neural networks

6:28

so it's quite an interesting research

6:30

area right now and there's lots of ideas

6:32

out there

6:33

and i encourage you to check out this

6:34

website at the bottom of the slide here

6:36

if you want to see some more examples

6:40

so a little bit more about the ansats

6:42

nsats is a german word

6:44

it's basically in physics it means

6:47

something like an educated guess

6:49

or an additional assumption that's kind

6:51

of chosen at the start but which is kind

6:53

of

6:53

verified as being correct throughout the

6:55

course of the problem

6:57

so in the case of variational circuits

6:59

the ansats is

7:01

the particular structure of the quantum

7:03

circuit

7:04

and as i said sometimes the structure is

7:06

completely fixed by the problem

7:08

and other times the structure is more

7:10

flexible

7:12

so some might say it's completely

7:14

selectable by the user

7:16

so in vqe in particular there's no

7:18

requirement that you have to use any

7:19

particular nsats

7:20

the only thing that's fixed is the cost

7:22

function whereas in qaoa

7:24

some of the cost function influences

7:27

the actual circuit that you're using

7:31

so the ansats is an important ingredient

7:34

and there's lots of ways to choose it

7:36

and it's still very much an open

7:38

question about

7:38

what are the best ends and states in

7:41

invasional circuits for different

7:43

problems

7:46

so again the reason for choosing a

7:49

particular and sats

7:50

uh it could be many so there could be

7:52

some intuition or some

7:55

some like logical or physical or

7:58

mathematical basis for choosing a

8:00

particular and sats

8:01

so i did mention that vqe doesn't force

8:04

you to select an assets but you might

8:05

want to choose one that we know

8:07

is likely to be similar to how actual

8:10

chemicals or chemistry systems work

8:14

again the answers can be dictated by the

8:16

structure of the problem itself

8:18

the nsats can come from intuition board

8:21

from other fields

8:22

like machine learning or the nsats can

8:24

be something that's taken in order to

8:26

make something more trainable or the

8:29

ancesto can

8:30

really be arbitrary you can use your

8:31

imagination and there's no reason to

8:33

favor one handset's over another one but

8:36

the choice of answers

8:37

will affect the quality of the model

8:40

that you're able to

8:41

learn or the quality of the answer

8:42

you're able to achieve from your vaginal

8:44

circuit

8:45

and one general piece of advice is the

8:47

deeper

8:48

you can make your own sets typically the

8:50

more

8:51

expressive it can be and the better

8:53

results you'll get

8:57

so another important thing to take into

8:59

account is

9:00

the input data so circuits don't just

9:03

have free parameters but sometimes you

9:04

also need to input data

9:06

into them in some problems it's not

9:08

necessary but other problems is

9:09

necessary

9:11

so how do we actually input classical

9:13

data

9:14

into a quantum variational circuit

9:17

there's actually a number of different

9:19

strategies you could take here

9:21

and it's still very much an open

9:23

research question

9:25

of how to embed classical data into a

9:27

quantum

9:28

circuit

9:32

so one of the simplest choices you can

9:34

make is say well

9:36

the easiest way for a parameter to enter

9:38

a circuit is through a rotation of a

9:40

single qubit so what i could do is i

9:41

could just rotate a single qubit

9:43

in proportion to the value of a of a

9:46

single data point

9:48

so a single scalar value so that's very

9:51

common

9:52

but i really want to warn people that

9:53

this is not sufficient

9:55

if you do that then the only thing your

9:57

circuit will ever

9:58

produce as a function of this input data

10:01

will be a simple sine function

10:03

so it's it's much more complicated story

10:05

and there there needs to be

10:07

still a lot of exploration done in order

10:09

to find the optimal or

10:11

reasonable ways to embed data

10:15

so just as a kind of mentioning of some

10:18

strategies that are already available

10:20

that go beyond this very simple

10:22

initial strategy is something called

10:24

data re-uploading

10:26

and the idea is not to up not to embed

10:29

data using a single rotation but

10:30

actually a sequence of repeated

10:32

rotations and maybe there's free

10:33

parameters in between those as well

10:36

and this can make a more complex

10:38

function available to you in your

10:40

circuit than you would have if you just

10:41

did a single

10:42

rotation the other idea is to have

10:45

actually a trainable

10:46

embedding layer so don't worry so much

10:49

about training the

10:50

the unitary of the circuit worry about

10:52

training the embedding and then use

10:53

standard quantum information

10:54

metrics and tricks to to classify the

10:58

data for instance so

11:00

learnable embeddings is also a very

11:01

viable strategy

11:06

so when we're using variational circuits

11:09

if you can compute the gradient using

11:11

the premiership rule then that opens up

11:13

every possible flavor of grady descent

11:15

that you could want so there's standard

11:17

grading descent but also in

11:18

deep learning there's all sorts of other

11:20

great instant optimizers that are

11:22

available to you

11:23

ones that you see most common are

11:24

momentum and atom

11:26

probably but there's also a number of

11:29

quantum aware optimizers that you could

11:31

use and these are things that

11:32

inherently take into account that you're

11:34

optimizing a quantum circuit

11:36

and not just a black box so for instance

11:39

i've put three different examples here

11:41

of

11:42

quantum aware optimizers so one is

11:45

it's actually a pair of optimizers

11:47

they're called rotosolve and rotoselect

11:49

they're in the same family

11:50

these actually don't use gradients at

11:51

all so instead of using the gradient

11:54

they recognize that there's this

11:55

sinusoidal structure to quantum circuits

11:58

and if you're only ever looking in one

11:59

direction in parameter space you can

12:01

actually find a minimum quite easily

12:03

just by going to the minimum of that

12:05

particular sinusoid

12:06

and then you can iterate through that

12:08

process many times and hope that you can

12:09

find

12:10

via a sequence of individual jumps to

12:13

local minima

12:14

eventually end up in a global minimum

12:18

another cool quantum ware optimizer is

12:19

called quantum natural gradient

12:22

and the basic idea here is that the

12:25

inherent geometry of quantum circuits of

12:27

quantum

12:28

computing circuits and quantum physical

12:31

systems

12:33

is not euclidean so it doesn't look like

12:36

the world around us is not like this

12:38

rectilinear structure it's more of a

12:41

it's more of a sinusoidal structure so

12:43

we should take that into account

12:44

we should adjust for the inherent

12:46

geometry of the

12:48

space that we're optimizing in and then

12:50

there's a family of optimizers that are

12:52

called

12:53

shots frugal and what these do is

12:54

recognize that in current day

12:56

quantum computers the number of circuit

12:59

executions is actually a very precious

13:01

commodity and if you're having to wait

13:02

in a queue online is this can really

13:04

slow down your optimization so

13:06

these optimizers are much more frugal in

13:08

how they use optimize

13:10

how they optimize using shots and they

13:12

they rely on a lot

13:14

smaller number of shots especially

13:16

earlier on in training to get

13:18

estimates that you need to train the

13:19

circuit

13:21

final thing i want to mention and this

13:23

is a topic that people have probably

13:24

heard of before is there's this notion

13:25

of baron plateaus

13:27

for variational circuits the basic idea

13:30

here and it's it's similar to something

13:32

that happened in deep learning is that

13:34

there are parts of the optimization

13:36

landscape where the gradient is zero

13:38

and anywhere you go around it the

13:40

gradient is also zero

13:43

so they're very flat and so it's hard to

13:45

use a gradient descent strategy because

13:46

everything just looks like you're

13:48

completely flat in every direction so

13:51

baron plateaus actually come from a

13:52

number of different effects there's not

13:53

just one effect but there's multiple

13:54

ways to do it they can come from the

13:56

choice of your circuit hand stats they

13:58

can come from the choice of

13:58

parameterization

14:00

or parameter values or they could come

14:02

from your cost function

14:04

and there's a number of different

14:05

proposals for overcoming these

14:07

uh but it's still an open question i

14:08

would say to how to avoid these

14:10

in general so you could use a

14:13

specialized initialization strategy

14:15

you could go with a layer-wise expansion

14:18

of your circuit bit by bit and

14:20

try to avoid it by making the shortcut a

14:22

circuit short at the earlier

14:24

stages of training or you can go with

14:26

adiabatic type approaches where you'll

14:28

have a very

14:29

kind of slow evolution towards a

14:31

targeted goal

14:33

and these are nice pictures that

14:34

illustrate the bearing plateau

14:36

phenomenon where

14:36

if you're sitting anywhere in this

14:38

landscape except right at this

14:40

center you really can't look in any

14:42

direction and see anything with flatness

14:44

so brother-in-laws are an interesting

14:47

barrier that we'll have to overcome in

14:48

order to train

14:49

variational quantum circuits

15:10

you

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.