1 00:00:00,230 --> 00:00:06,570 I'm Miko Pawlikowski, and this is HockeyStick. 2 00:00:06,950 --> 00:00:07,870 Quantum computing. 3 00:00:08,640 --> 00:00:11,160 Is it science fiction, hype, or reality? 4 00:00:11,800 --> 00:00:12,680 Does it work today? 5 00:00:13,079 --> 00:00:14,789 Will it break all your passwords tomorrow? 6 00:00:15,459 --> 00:00:18,479 How can you future proof your career to not get left behind? 7 00:00:19,199 --> 00:00:20,310 What does it look like? 8 00:00:21,220 --> 00:00:24,650 To answer all these questions, I'm joined by Johan Voss, the author 9 00:00:24,650 --> 00:00:27,970 of Quantum Computing in Action, a new book published by Manning. 10 00:00:28,310 --> 00:00:29,320 and co founder of Gluon. 11 00:00:30,400 --> 00:00:34,130 Welcome to this episode, and thank you for flying HockeyStick. 12 00:00:34,669 --> 00:00:36,179 Johan, how are you today? 13 00:00:36,599 --> 00:00:37,979 I'm fine, thanks for having me. 14 00:00:38,584 --> 00:00:39,184 the pleasure. 15 00:00:39,224 --> 00:00:43,054 I assure you, as you're going to see, it's all mine because I've been waiting for 16 00:00:43,054 --> 00:00:46,884 someone to explain this entire quantum computing thing to me for a long time. 17 00:00:47,584 --> 00:00:49,004 let's get right into it. 18 00:00:50,004 --> 00:00:51,004 Quantum computing. 19 00:00:51,604 --> 00:00:56,194 What is so special about it and why is it a big deal? 20 00:00:56,244 --> 00:00:58,834 there are a number of things on why I think quantum computing 21 00:00:58,834 --> 00:01:00,564 is, special and, interesting. 22 00:01:00,874 --> 00:01:07,845 I think the most intriguing thing is that a quantum computer is actually more 23 00:01:07,864 --> 00:01:10,314 a computer like how nature is working. 24 00:01:10,714 --> 00:01:14,314 So when we think about computers, we think about, classical computers 25 00:01:14,314 --> 00:01:19,094 that works with zeros and ones, but nature doesn't really work like that. 26 00:01:19,455 --> 00:01:24,495 the fundamental subatomic particles in nature, they do not 27 00:01:24,495 --> 00:01:27,354 work like the transistors that we use in classical computing. 28 00:01:27,354 --> 00:01:32,925 So a quantum computer, while it is often seen as more advanced 29 00:01:32,925 --> 00:01:35,040 or so, it's actually more basic. 30 00:01:35,590 --> 00:01:39,260 And that does not mean that it is easier to create or easier 31 00:01:39,260 --> 00:01:43,340 to program, but it totally makes sense from a physics point of view. 32 00:01:44,030 --> 00:01:46,539 there are quite a number of similarities and a number of 33 00:01:46,659 --> 00:01:48,520 differences with classical computers. 34 00:01:49,119 --> 00:01:52,589 And the main difference, and one of the reasons why quantum computers are, 35 00:01:53,040 --> 00:01:59,250 interesting and are getting attention, is that they might provide huge, unseen 36 00:01:59,360 --> 00:02:04,760 computing power in a different way than classical computers would do, but 37 00:02:04,820 --> 00:02:09,630 there's a possibility to do things on a quantum computer that are, technically 38 00:02:09,650 --> 00:02:11,390 impossible on a classical computer. 39 00:02:11,830 --> 00:02:16,684 And the most, common example is the Shor's algorithm. 40 00:02:16,835 --> 00:02:22,685 that algorithm allows a quantum computer, to factor integers into, 41 00:02:22,735 --> 00:02:26,635 prime numbers, pretty fast, much faster than a classical computer can do. 42 00:02:27,185 --> 00:02:30,045 And as a consequence, that might break, Most of the 43 00:02:30,135 --> 00:02:31,645 encryption that's in use today. 44 00:02:31,915 --> 00:02:36,125 Now, this is just an example that is often used to catch people's attention. 45 00:02:36,145 --> 00:02:37,565 And it is very true. 46 00:02:37,575 --> 00:02:39,785 And it may happen one day. 47 00:02:40,165 --> 00:02:42,275 But there's much more to quantum computing than this. 48 00:02:43,125 --> 00:02:46,285 If you ask about the hype, I think this explains part of the 49 00:02:46,285 --> 00:02:49,455 hype about quantum computing. 50 00:02:50,610 --> 00:02:51,060 Okay. 51 00:02:51,090 --> 00:02:53,170 So we've got a little bit of hype for sure. 52 00:02:53,220 --> 00:02:57,320 If you put this query in Google, there's a lot of scary sounding 53 00:02:57,320 --> 00:03:00,390 things, like what you just mentioned, the security going out of the window. 54 00:03:01,510 --> 00:03:06,420 But what are some of the examples that might not be covered by 55 00:03:06,430 --> 00:03:11,160 the hype that are actually more representative of quantum computing? 56 00:03:11,550 --> 00:03:12,970 What do they excel at? 57 00:03:13,327 --> 00:03:18,017 in general, a quantum computer, can help you with problems that, 58 00:03:18,117 --> 00:03:23,717 require lots of parallel computations that are somehow related. 59 00:03:24,137 --> 00:03:28,997 problems that in classical computers would require exponential more time 60 00:03:29,027 --> 00:03:35,337 if you make the problem a bit harder, might be, solvable in polynomial time. 61 00:03:35,747 --> 00:03:39,357 for example, on a quantum computer, I'm trying not to use too much, 62 00:03:39,457 --> 00:03:45,197 mathematical, concepts here, but, that is in general, the core advantage 63 00:03:45,407 --> 00:03:50,997 of a quantum computer and, to Java developers, I often explain this as, the, 64 00:03:51,047 --> 00:03:53,187 parallel streams that we have in Java. 65 00:03:53,487 --> 00:03:57,237 that allow you to do many computations at once. 66 00:03:57,987 --> 00:04:00,837 In a classical computer, we're using different native threads. 67 00:04:01,267 --> 00:04:04,327 But in a quantum computer, you can compare it with doing all the 68 00:04:04,327 --> 00:04:07,057 calculations at once on the same thread. 69 00:04:07,187 --> 00:04:10,957 So the different, inputs are processed, all together. 70 00:04:11,437 --> 00:04:16,097 And that is the core difference between the quantum computer, 71 00:04:16,147 --> 00:04:17,587 and the classical computer. 72 00:04:17,627 --> 00:04:19,687 And then when is this relevant? 73 00:04:19,767 --> 00:04:24,667 first of all, in everything that is, related to the low level, parts 74 00:04:24,667 --> 00:04:27,357 of nature itself and, chemistry. 75 00:04:28,317 --> 00:04:33,967 And, healthcare, where we need to do lots of computations and especially those 76 00:04:33,967 --> 00:04:38,497 that are, related to the fundamental laws of physics, those can benefit from 77 00:04:38,497 --> 00:04:43,637 quantum computing so we can use a quantum computer to understand nature better. 78 00:04:44,262 --> 00:04:49,792 And, there are algorithms being developed to, help with, some chemical analysis. 79 00:04:49,852 --> 00:04:54,862 because, chemistry is a bit of a weird field, it's pretty hard to, simulate 80 00:04:55,062 --> 00:05:00,232 even simple molecules and finding out, what's happening if you combine, even two 81 00:05:00,272 --> 00:05:04,652 atoms, it's very hard to do because it requires a huge amount of calculations. 82 00:05:04,652 --> 00:05:08,182 So that's something that a quantum computer, might be able to do more easily 83 00:05:09,112 --> 00:05:13,202 because of their nature with, doing many parallel computations as once. 84 00:05:13,482 --> 00:05:17,082 They're also good in optimization problems, traveling salesman, for 85 00:05:17,082 --> 00:05:21,322 example, where, you have to examine different paths and find the best one. 86 00:05:22,072 --> 00:05:27,212 And, one example that I think, Might be available in the more short term is, 87 00:05:27,212 --> 00:05:31,662 quantum key distribution and, people often talk about, quantum computing is 88 00:05:31,662 --> 00:05:35,952 going to break encryption, but on the other hand, quantum computing is also 89 00:05:35,972 --> 00:05:41,142 allowing for much stronger encryption, and, that is something that you don't 90 00:05:41,142 --> 00:05:43,582 need lots of, expensive hardware for it. 91 00:05:43,772 --> 00:05:48,232 it's still not easy to do at home, but that is something that, I see 92 00:05:48,232 --> 00:05:52,292 as a positive evolution that might happen thanks to quantum computing 93 00:05:52,332 --> 00:05:56,632 the encryption that we have today can be enforced, by a few orders of 94 00:05:56,652 --> 00:05:58,652 magnitude using quantum computers. 95 00:05:59,562 --> 00:06:03,312 So imagine you're talking to a five year old software engineer. 96 00:06:03,497 --> 00:06:07,437 they probably have heard of a Schroedinger's cat. 97 00:06:08,087 --> 00:06:12,187 They probably have heard of a double slit experiment. 98 00:06:12,237 --> 00:06:15,547 And that's about the extent of what they know about quantum physics, 99 00:06:15,637 --> 00:06:17,587 other than it's weird and strange. 100 00:06:18,437 --> 00:06:22,877 Could you try to explain in simple terms, things like qubits 101 00:06:22,957 --> 00:06:24,547 and what superposition is? 102 00:06:25,247 --> 00:06:30,447 just enough to explain how a quantum computer works at a high level. 103 00:06:30,930 --> 00:06:35,300 that question can, be answered by comparing with how classical computers 104 00:06:35,340 --> 00:06:39,320 work and then seeing where it is different with a quantum computer. 105 00:06:39,360 --> 00:06:43,720 So a five year old software engineer knows that a classic computer works 106 00:06:43,720 --> 00:06:46,720 with bits that can be zero and one. 107 00:06:47,340 --> 00:06:48,940 And in a computer there are many bits. 108 00:06:50,180 --> 00:06:55,060 All are at a given moment, either zero or one, and the combination of these zeros 109 00:06:55,060 --> 00:06:57,390 and ones allows you to do many things. 110 00:06:58,430 --> 00:07:01,860 but the thing is, a bit is always either zero or one. 111 00:07:02,880 --> 00:07:08,170 And the equivalent of a bit in quantum computing, is what we call the qubit. 112 00:07:08,190 --> 00:07:11,576 So that is the ultimate building block in in quantum computers. 113 00:07:11,576 --> 00:07:17,855 Now a qubit can have the value zero, It can have the value 1, like a 114 00:07:17,855 --> 00:07:23,105 regular bit, but it also can hold a combination of the values 0 and 1. 115 00:07:23,645 --> 00:07:27,365 that is the first and very weird thing about a quantum computer, 116 00:07:27,385 --> 00:07:28,445 because what does it mean? 117 00:07:29,154 --> 00:07:34,544 it does not mean that it can hold the value 0.35 or so, because when 118 00:07:34,544 --> 00:07:39,969 you would measure a qubit, You will either get 0 or you will get 1. 119 00:07:40,889 --> 00:07:43,259 Very similar to what you will measure on a bit. 120 00:07:43,819 --> 00:07:48,739 But during operations, the value can be a combination of 0 and 1. 121 00:07:49,569 --> 00:07:54,899 And the main difference is then that where a classical computer works 122 00:07:54,909 --> 00:07:59,609 with the value of a bit, a quantum computer is more about probabilities. 123 00:08:00,119 --> 00:08:05,459 How likely is it that if I measure this qubit now, that I will measure 0, and how 124 00:08:05,459 --> 00:08:07,829 likely is it that I will measure a one. 125 00:08:08,349 --> 00:08:13,509 while ultimately you will measure a zero or a one, you can still do 126 00:08:13,519 --> 00:08:17,369 all the computation simultaneously, pretending that the qubit is 127 00:08:17,369 --> 00:08:19,569 zero and that the qubit is a one. 128 00:08:20,319 --> 00:08:21,779 And that is a major difference. 129 00:08:21,829 --> 00:08:25,779 And that explains the, exponential, behavior of quantum computers 130 00:08:25,849 --> 00:08:29,479 because with one qubit, we can have two values, zero and one. 131 00:08:30,119 --> 00:08:33,619 With two qubits, we can have four values, zero, zero, zero, 132 00:08:33,619 --> 00:08:35,179 one, one, zero, one, one. 133 00:08:35,699 --> 00:08:38,379 And so that's why it scales exponentially. 134 00:08:39,489 --> 00:08:44,219 And that is the concept of superposition, which is not something that we invented 135 00:08:44,229 --> 00:08:45,849 to make quantum computers work. 136 00:08:45,969 --> 00:08:47,059 It's actually the opposite. 137 00:08:47,259 --> 00:08:49,759 It is a phenomenon that we see in nature. 138 00:08:50,094 --> 00:08:54,674 Some elementary particles, for example, the spin of an electron, have 139 00:08:54,674 --> 00:08:59,464 a property that can hold two values simultaneously, spin up or spin down. 140 00:09:00,094 --> 00:09:04,834 But the moment that you measure it, and that brings us to Schrodinger's cat, the 141 00:09:04,834 --> 00:09:08,584 moment that you look, the moment that you open the box, it's in one state only. 142 00:09:08,754 --> 00:09:09,904 It will be zero or one. 143 00:09:10,284 --> 00:09:12,944 So then the fun, the magic is gone. 144 00:09:13,534 --> 00:09:16,334 But as long as you keep it in the box, as long as your application 145 00:09:16,334 --> 00:09:20,854 is running, your qubit can, have two values, to compute with. 146 00:09:21,869 --> 00:09:25,519 Okay, so I think what we need to explain is basically how do you 147 00:09:25,519 --> 00:09:31,259 get from one Schrodinger's cat that is in a box to two Schrodinger's 148 00:09:31,299 --> 00:09:34,779 cats that are entangled, right? 149 00:09:35,239 --> 00:09:39,009 Because with one qubit, you can't do an awful lot of good. 150 00:09:39,489 --> 00:09:42,449 The whole thing is to get a lot of them, right? 151 00:09:42,529 --> 00:09:45,019 And they all need to be somewhat, connected. 152 00:09:45,269 --> 00:09:46,079 Is that right? 153 00:09:46,422 --> 00:09:51,462 so apart from superposition, which means that one qubit can be both zero 154 00:09:51,532 --> 00:09:55,252 and one, with some probabilities, that if you measure it, it's going 155 00:09:55,252 --> 00:09:59,972 to be zero and other probability that it will be one, that's one of the, 156 00:10:00,032 --> 00:10:01,782 strong powers of quantum computing. 157 00:10:02,022 --> 00:10:04,312 The other is indeed the concept of quantum entanglement. 158 00:10:05,532 --> 00:10:08,022 It's, quite different, but the combination is, huge. 159 00:10:08,172 --> 00:10:11,952 I have, for example, two qubits that are, entangled. 160 00:10:12,002 --> 00:10:14,712 And there are physical operations to entangle qubits. 161 00:10:15,012 --> 00:10:21,637 it means that if I sent one of the entangled qubits to you or to, somewhere 162 00:10:21,737 --> 00:10:27,547 on earth or even to the moon, that is not physically connected to my qubit anymore. 163 00:10:28,177 --> 00:10:33,677 And we don't know the value of the qubit, but the moment that, I measure 164 00:10:33,707 --> 00:10:38,962 the qubit, the value of the qubit in the other place is known as well. 165 00:10:39,782 --> 00:10:40,852 You don't know it upfront. 166 00:10:40,862 --> 00:10:44,182 You don't know it until, I measure mine, but then I also 167 00:10:44,182 --> 00:10:46,352 know the value of your qubit. 168 00:10:46,922 --> 00:10:50,002 And that is not because they had that value initially. 169 00:10:50,502 --> 00:10:52,142 No, they had no value initially. 170 00:10:52,232 --> 00:10:56,782 So it's not that the value was already there, but we just didn't know it. 171 00:10:57,182 --> 00:10:58,142 that's unrelated. 172 00:10:58,922 --> 00:11:03,282 And this is, of course, something that, one of the most obvious examples is 173 00:11:03,312 --> 00:11:08,972 this allows you to create shared keys, for example, because it is, the same 174 00:11:08,972 --> 00:11:15,692 value that's being sent via a qubit and you don't know, until you, you open the 175 00:11:15,692 --> 00:11:21,002 box, but if I open the box, In my place, the box in your place is open as well. 176 00:11:21,032 --> 00:11:22,292 And we have the same values. 177 00:11:22,802 --> 00:11:24,217 So that is, entanglement. 178 00:11:24,687 --> 00:11:27,337 so security is one of the, things that benefit from this. 179 00:11:27,342 --> 00:11:31,837 But just the fact that, there are, by nature, correlations between 180 00:11:31,842 --> 00:11:35,687 different qubits allows for a different, way of programming. 181 00:11:36,375 --> 00:11:40,505 this is a, a hot topic in quantum physics in general, it's really tempting to 182 00:11:40,505 --> 00:11:46,264 say that information travels faster than light, but it is not, because if 183 00:11:46,344 --> 00:11:48,944 I tell you what my qubit looked like. 184 00:11:48,984 --> 00:11:51,624 And if I would tell that to you and you would then compare it, yes, 185 00:11:51,624 --> 00:11:55,324 that's indeed the thing, then I would use a classical channel and 186 00:11:55,324 --> 00:11:57,014 that cannot go faster than light. 187 00:11:57,014 --> 00:12:01,384 So the information itself is not traveling faster than light. 188 00:12:01,684 --> 00:12:05,265 and it's something that I, to be honest, avoid, Talking about when I 189 00:12:05,275 --> 00:12:08,465 talk about quantum computing, because different quantum physicists will 190 00:12:08,835 --> 00:12:13,485 chime in and, start, correcting, me and each other to be honest, to 191 00:12:13,485 --> 00:12:16,105 me it does not make lots of sense. 192 00:12:16,455 --> 00:12:17,685 it's just something weird. 193 00:12:18,385 --> 00:12:21,840 And I think the key thing to be able to deal with quantum computing 194 00:12:21,840 --> 00:12:26,700 is to not try to understand it, I think it was Richard Fineman. 195 00:12:26,970 --> 00:12:30,495 If you think you understand quantum, physics, then you don't understand it. 196 00:12:31,605 --> 00:12:35,365 and it is so weird that, it helps giving up trying to understand it. 197 00:12:35,905 --> 00:12:41,295 the good thing is that if you just look at the mathematics, then it all makes sense. 198 00:12:41,985 --> 00:12:45,315 And if you don't want to do the mathematics, that's totally fine. 199 00:12:45,355 --> 00:12:47,539 Then you should just. 200 00:12:48,389 --> 00:12:51,930 acccept that those who did the mathematics did their homework, correctly. 201 00:12:52,370 --> 00:12:56,720 So superposition and entanglement are real things. 202 00:12:57,090 --> 00:13:02,860 but it's extremely hard to, intuitively understand what it actually means. 203 00:13:03,690 --> 00:13:05,940 And the math behind it is also not simple. 204 00:13:06,040 --> 00:13:10,490 So that makes, I think, quantum computing, something exotic, 205 00:13:10,540 --> 00:13:12,270 especially to developers. 206 00:13:13,160 --> 00:13:16,610 yeah, I think for me, it was the double slit experiment when you 207 00:13:16,610 --> 00:13:20,380 go and do it and, you can see the results that makes no sense. 208 00:13:21,010 --> 00:13:26,470 You're starting to think that, okay, Something's not quite as logical and 209 00:13:26,550 --> 00:13:32,270 intuitive as we all thought, but that's, an experience for a lot of people, right? 210 00:13:33,320 --> 00:13:33,710 True. 211 00:13:34,010 --> 00:13:34,400 Yes. 212 00:13:34,460 --> 00:13:36,765 And you clearly see what is happening. 213 00:13:36,765 --> 00:13:38,495 that there are, interference patterns. 214 00:13:38,925 --> 00:13:42,925 there's no doubt that they are there, but you don't understand it because 215 00:13:42,930 --> 00:13:49,845 how, our day-to-day observations of how things work, do not easily explain this. 216 00:13:49,890 --> 00:13:53,565 How can a particle be a wave and a particle at the same time? 217 00:13:54,047 --> 00:13:59,837 What kind of hardware, if you were going to talk a little bit more about, 218 00:13:59,857 --> 00:14:04,207 application side of all of this, but I'm just curious in terms of actual quantum 219 00:14:04,207 --> 00:14:05,877 hardware that you can lay your hands on. 220 00:14:05,947 --> 00:14:08,947 Let's say that you're lucky at your, at one of these companies 221 00:14:08,947 --> 00:14:10,657 working on it or some university. 222 00:14:11,302 --> 00:14:16,892 How many qubits does it have at the moment and how expensive is it to run? 223 00:14:17,572 --> 00:14:19,192 so it's definitely very expensive. 224 00:14:19,772 --> 00:14:24,752 the number of qubits, that used to be the, the discriminator to say, 225 00:14:24,832 --> 00:14:26,362 how good a quantum computer is. 226 00:14:26,922 --> 00:14:31,182 And then, for example, IBM had, for a long time, this, limited number 227 00:14:31,182 --> 00:14:34,832 of quantum computers that they make available, via their cloud infrastructure. 228 00:14:35,422 --> 00:14:37,672 those are the five qubits. 229 00:14:38,102 --> 00:14:43,342 and gradually, the quantum computers are getting more qubits. 230 00:14:43,832 --> 00:14:48,962 we're talking now, between 100 and 1000, qubits, but that number itself 231 00:14:48,962 --> 00:14:54,412 is not entirely irrelevant because, there's an important concept in quantum 232 00:14:54,412 --> 00:14:56,162 computing, which is error correction. 233 00:14:56,662 --> 00:15:00,872 it's so fragile to operate a quantum computer that they, 234 00:15:00,962 --> 00:15:02,952 the error rate is pretty high. 235 00:15:03,412 --> 00:15:07,202 So instead of just talking about how many qubits, it's better to get some 236 00:15:07,202 --> 00:15:09,252 noise and produce wrong results. 237 00:15:09,522 --> 00:15:14,562 So the quality of the quantum computer is more than just the number of, qubits. 238 00:15:15,022 --> 00:15:18,432 And that is a discipline in, quantum computing hardware 239 00:15:18,432 --> 00:15:22,822 that's, under heavy research, and they're, on a very frequent basis. 240 00:15:22,872 --> 00:15:26,802 there are new papers about, a breakthrough in the, new algorithms or 241 00:15:26,802 --> 00:15:30,512 new hardware, especially for, creating qubits with more error correction. 242 00:15:30,582 --> 00:15:35,212 I wish it was simple that we could just plot like, the clock speed of a CPU. 243 00:15:35,622 --> 00:15:38,252 but there is no consistent definition yet. 244 00:15:38,262 --> 00:15:41,672 IBM had this quantum volume defined, but not everyone is using it. 245 00:15:42,122 --> 00:15:47,562 but it is, the indication of how powerful quantum computers are It's not, 246 00:15:47,612 --> 00:15:51,442 something trivial, but it's clear that, they are getting better and better. 247 00:15:51,702 --> 00:15:52,682 That's for sure. 248 00:15:52,812 --> 00:15:55,492 The question is, how fast are they getting better? 249 00:15:56,622 --> 00:16:00,942 Okay, so for someone who maybe picks up your book, they're gonna spend most of 250 00:16:00,942 --> 00:16:03,022 their time in a simulator at the moment. 251 00:16:03,072 --> 00:16:03,822 is that right? 252 00:16:04,162 --> 00:16:09,982 so one of the good things about quantum computing is that, it is easy to 253 00:16:09,992 --> 00:16:11,782 separate the software and the hardware. 254 00:16:12,382 --> 00:16:17,502 We do understand how the hardware works because that's just the, the fundamental 255 00:16:17,512 --> 00:16:20,722 laws of nature and quantum physics. 256 00:16:21,322 --> 00:16:25,902 And, we do know, especially from experiments with small quantum computers, 257 00:16:26,342 --> 00:16:28,312 that it is indeed working, like this. 258 00:16:29,012 --> 00:16:33,192 And now that we know that, we can, create software on top of classical 259 00:16:33,212 --> 00:16:36,932 computers that simulate a quantum computer, because we know the rules. 260 00:16:37,602 --> 00:16:42,507 Of course, this is going to be much, much slower, and especially requiring much 261 00:16:42,507 --> 00:16:44,777 more memory than a real quantum computer. 262 00:16:45,317 --> 00:16:49,347 But the basic rules are known, and we can program them in a 263 00:16:49,347 --> 00:16:51,247 quantum computer simulator. 264 00:16:52,167 --> 00:16:55,927 And, typically today, if you write software, you do that in a 265 00:16:56,437 --> 00:16:58,597 higher level programming language. 266 00:16:58,837 --> 00:17:01,957 where you then leverage the lower level concepts. 267 00:17:02,427 --> 00:17:05,137 And that is what you do in a quantum, simulator as well. 268 00:17:05,687 --> 00:17:10,947 you write, code in most of the cases, almost all cases during 269 00:17:10,947 --> 00:17:14,417 development, that code is being executed on a, quantum simulator. 270 00:17:15,282 --> 00:17:20,422 But the same code, can theoretically also work on a real quantum computer. 271 00:17:20,842 --> 00:17:25,612 So the moment that, quantum computers are much more, available, the code 272 00:17:25,612 --> 00:17:29,072 that you write today and that you run on a quantum simulator will 273 00:17:29,072 --> 00:17:30,682 also run on a quantum computer. 274 00:17:30,732 --> 00:17:35,032 if that was not the case, then I would not recommend software developers to 275 00:17:35,032 --> 00:17:36,772 start with quantum computing today. 276 00:17:37,452 --> 00:17:42,922 But because we can already do it today, we can create quantum applications. 277 00:17:43,512 --> 00:17:47,722 it gives a huge advantage to those developers who are already dealing with 278 00:17:47,722 --> 00:17:52,352 it, because the moment that quantum computers are, more powerful, more 279 00:17:52,352 --> 00:17:57,722 available, those developers can run their applications almost immediately on the 280 00:17:57,762 --> 00:18:02,402 quantum computers, whereas others still have to start learning and writing, code. 281 00:18:03,382 --> 00:18:07,292 So before we jump into how different it actually is to write that kind 282 00:18:07,292 --> 00:18:12,582 of code to, classical, we should call it, programming language style, 283 00:18:13,552 --> 00:18:15,362 tell us a bit about your book. 284 00:18:15,492 --> 00:18:20,732 As I started reading this, it came across to me as a very applied kind of book. 285 00:18:21,822 --> 00:18:28,682 You talk about how there's a lot of resources that have to do with the very 286 00:18:28,682 --> 00:18:32,262 complicated, strange physics of that. 287 00:18:32,462 --> 00:18:37,352 And there's also a lot of hype and your book is trying to be an applied 288 00:18:37,372 --> 00:18:39,432 guide that's neither of these things. 289 00:18:39,877 --> 00:18:43,487 Gives you enough background, but also doesn't buy into the hype. 290 00:18:43,797 --> 00:18:46,107 Is that the right impression of the book? 291 00:18:46,532 --> 00:18:47,772 that was exactly the goal. 292 00:18:47,772 --> 00:18:50,852 So I'm glad that, you, have that observation because that 293 00:18:50,902 --> 00:18:51,922 was the goal of the book. 294 00:18:52,002 --> 00:18:56,122 I think it's, practical as it can be, because, I don't think most of 295 00:18:56,122 --> 00:18:58,722 the people who read the book have a quantum computer on their desk. 296 00:18:58,722 --> 00:19:02,682 So it's not that it's as practical as, more Python for dummies, for example, 297 00:19:02,682 --> 00:19:07,812 where you can, use it in practice, but it's mainly targeting existing developers 298 00:19:07,812 --> 00:19:14,652 who want to, know how day and day job will be impacted by quantum computing. 299 00:19:15,312 --> 00:19:16,692 How can they leverage it? 300 00:19:16,982 --> 00:19:18,252 How can they benefit from it? 301 00:19:18,782 --> 00:19:20,342 What's, are the expectations? 302 00:19:20,342 --> 00:19:23,782 What's, it's clear that quantum computers are not a solution for everything. 303 00:19:24,482 --> 00:19:29,612 And, I think by explaining how the quantum computers are 304 00:19:29,612 --> 00:19:31,102 working, which is non trivial. 305 00:19:31,312 --> 00:19:33,462 the reader gets a better idea. 306 00:19:34,322 --> 00:19:40,782 And, I try to minimize the maths in the book because it doesn't matter. 307 00:19:41,872 --> 00:19:43,922 it might help in understanding. 308 00:19:44,452 --> 00:19:48,392 And therefore, I wrote this, quantum, simulator, and the code is, open source. 309 00:19:49,962 --> 00:19:52,782 if you really want to know how it works, you can look at that code and 310 00:19:52,782 --> 00:19:56,372 then you understand the underlying things, but it is not needed. 311 00:19:56,792 --> 00:20:00,982 And that is something that in the software world that we, often see that, people 312 00:20:00,982 --> 00:20:04,842 are using libraries for example, in the Java world, there's a huge ecosystem with 313 00:20:04,902 --> 00:20:09,597 lots of libraries, and people can use those libraries and I think it's then 314 00:20:09,597 --> 00:20:13,807 important that they know what are these libraries doing, what problems are they 315 00:20:13,807 --> 00:20:18,557 solving, how can I benefit from it, and what do I need to do to, to use them. 316 00:20:19,517 --> 00:20:23,627 But you don't need to know how exactly they are solving the problem, 317 00:20:23,637 --> 00:20:28,397 because, then you could well, quite everything yourself, indeed. 318 00:20:28,397 --> 00:20:32,627 So I think in that sense, it's targeting the pragmatic developer. 319 00:20:33,027 --> 00:20:36,517 I want to know when I can use this, how I can use this. 320 00:20:37,027 --> 00:20:40,817 and it's good to understand that a bit of the background on why this is 321 00:20:40,827 --> 00:20:46,788 working, but, you don't need the, PhD in, physics or mathematics or so that 322 00:20:46,818 --> 00:20:48,298 was the main target of that book. 323 00:20:48,598 --> 00:20:51,948 And, I think It's actually funny why I did this. 324 00:20:52,028 --> 00:20:58,888 I did my PhD in physics, but then I, moved over to the iT, industry, because for 325 00:20:58,888 --> 00:21:03,678 my PhD, I needed to write software and then there was a new software, language, 326 00:21:03,728 --> 00:21:07,998 which was Java, but it didn't work on Linux and I had a Linux workstation. 327 00:21:07,998 --> 00:21:11,758 So I, together with a bunch of people we ported Java to Linux 328 00:21:12,288 --> 00:21:16,488 and then I rolled into the IT world and, yeah, I'm still there. 329 00:21:17,058 --> 00:21:22,383 But when, Jim Weaver, who is now developer advocate, quantum computing at IBM and 330 00:21:22,383 --> 00:21:27,653 a fellow Java champion, a good friend of mine, asked me to do some joint 331 00:21:27,703 --> 00:21:29,533 presentations about quantum computing. 332 00:21:29,543 --> 00:21:30,883 Then I said, Oh yeah, that's fine. 333 00:21:31,903 --> 00:21:35,523 I didn't know much about quantum computing, and I think the best way to 334 00:21:35,533 --> 00:21:41,583 really learn, or get a deep understanding of quantum computers is to write one. 335 00:21:42,008 --> 00:21:46,258 In software, I do not recommend that to everyone, but writing a quantum, 336 00:21:46,308 --> 00:21:50,508 simulator is really helpful if you want to understand, how it's actually working. 337 00:21:50,868 --> 00:21:54,378 it gives a better understanding and I think it also helps 338 00:21:54,378 --> 00:21:55,758 in explaining it, to people, 339 00:21:56,385 --> 00:21:57,605 That makes perfect sense. 340 00:21:58,555 --> 00:22:03,125 Would this be an accurate representation then that this is for a pragmatic 341 00:22:03,155 --> 00:22:05,855 developer, who also wants to future proof. 342 00:22:06,445 --> 00:22:10,075 there's skills by learning this so that, like you mentioned, when 343 00:22:10,075 --> 00:22:14,015 they become ubiquitous at some point, and hopefully they still 344 00:22:14,015 --> 00:22:17,455 alive by then, they can use that. 345 00:22:18,065 --> 00:22:24,615 Are there any applications that, quantum computing programming can give 346 00:22:24,615 --> 00:22:27,795 you today in terms of, production use? 347 00:22:27,825 --> 00:22:31,055 Is there anything that you can actually apply it to in your 348 00:22:31,105 --> 00:22:33,155 real programmer life day to day? 349 00:22:33,758 --> 00:22:39,198 the real practical, examples, require more qubits. 350 00:22:39,378 --> 00:22:40,858 so in the scientific industry. 351 00:22:41,893 --> 00:22:45,163 You can already do some work to get a better understanding about 352 00:22:45,223 --> 00:22:46,533 for example, how nature works. 353 00:22:47,013 --> 00:22:48,143 And that is possible. 354 00:22:48,833 --> 00:22:53,402 But the, applications that, are envisioned, typically require 355 00:22:53,402 --> 00:22:56,922 much more, powerful, quantum computers that we have today. 356 00:22:57,592 --> 00:23:00,552 There is an exception though, and that's what I mentioned early 357 00:23:00,932 --> 00:23:05,332 the quantum networking, that does not require many qubits. 358 00:23:05,912 --> 00:23:10,282 As long as you can send one qubit, from one place to another place, 359 00:23:10,782 --> 00:23:13,977 you can communicate in a secure way. 360 00:23:14,027 --> 00:23:18,347 that is something that's already being used today in commercial applications, 361 00:23:18,347 --> 00:23:23,512 and there are specialized companies that are, create devices that, generate, 362 00:23:23,802 --> 00:23:25,737 entangled, qubits, for example. 363 00:23:26,077 --> 00:23:30,122 sent each one of them to a party so they can generate a shared key. 364 00:23:31,282 --> 00:23:34,152 And as a consequence, they can communicate in a secure way. 365 00:23:34,752 --> 00:23:37,932 So that is something that's, used in a number of places, 366 00:23:37,932 --> 00:23:39,282 mainly for demonstrations. 367 00:23:39,372 --> 00:23:43,152 there's a great team at the University of Deloitte, where they 368 00:23:43,152 --> 00:23:48,702 are doing a proof of concepts with the port of Rotterdam, I believe. 369 00:23:49,182 --> 00:23:54,172 And, with telco operators as well, because, ultimately the qubits need to be 370 00:23:54,182 --> 00:23:56,802 sent over the telecommunication network. 371 00:23:57,252 --> 00:24:00,492 So that is something that's, at a small scale, but it can be used, today. 372 00:24:01,160 --> 00:24:03,790 can you tell me a bit more about how that actually works? 373 00:24:03,790 --> 00:24:09,965 Because what I'm picturing is someone With a fridge having two untangled qubits 374 00:24:10,075 --> 00:24:16,605 packing one up using FedEx to ship it to somewhere and then you have this change 375 00:24:16,675 --> 00:24:19,035 of that you can detect on either end. 376 00:24:19,455 --> 00:24:21,295 How does it actually work in practice? 377 00:24:21,315 --> 00:24:23,435 You mentioned about sending the qubits. 378 00:24:23,445 --> 00:24:24,935 How do you send qubits? 379 00:24:25,470 --> 00:24:29,180 the good thing is that, the qubit itself is not a physical concept. 380 00:24:29,200 --> 00:24:34,990 It's just a logical concept that has a physical representation and everything 381 00:24:35,000 --> 00:24:38,930 in nature that can have two states. 382 00:24:39,680 --> 00:24:40,390 simultaneously. 383 00:24:40,460 --> 00:24:43,510 as I said in the beginning, if you measure it, you will always measure 384 00:24:43,510 --> 00:24:48,980 one state, but, it carries two, states with each, having its own probability. 385 00:24:49,650 --> 00:24:51,740 that is a good candidate for being a physical qubit. 386 00:24:52,620 --> 00:24:55,610 So different quantum computers use different kinds of 387 00:24:55,620 --> 00:24:58,090 qubits for their hardware. 388 00:24:58,950 --> 00:25:04,180 It's often superconducting qubits are used, but trapped ions are also used 389 00:25:04,180 --> 00:25:09,190 because they have this physical property of allowing a superposition state. 390 00:25:09,850 --> 00:25:14,060 And for communicating qubits, you can use photons. 391 00:25:14,900 --> 00:25:18,030 which, can be transmitted, to, fiber. 392 00:25:18,700 --> 00:25:23,470 And that is a great advantage because, that means that we can use, a large part 393 00:25:23,500 --> 00:25:25,330 of the existing telco infrastructure. 394 00:25:25,890 --> 00:25:32,570 So if you put a photon, On your part of the fiber, you can send it to, your, 395 00:25:32,610 --> 00:25:34,935 friend at the other side, of the fiber. 396 00:25:35,375 --> 00:25:39,035 it can't travel long distances, yet. 397 00:25:39,525 --> 00:25:42,660 but you can have, repeaters in between, them. 398 00:25:43,150 --> 00:25:46,720 it's an interesting technical, challenge, but it's something that's at least. 399 00:25:47,130 --> 00:25:52,060 In labo experiments and on smaller scales, number of kilometers 400 00:25:52,150 --> 00:25:53,330 is proven to be working. 401 00:25:53,975 --> 00:26:00,165 Okay, that makes a lot more sense than my picture of a freezer with untangled 402 00:26:00,885 --> 00:26:05,500 atoms sitting in there and probably better than signing them by pidgeon. 403 00:26:06,160 --> 00:26:10,110 okay, so let's jump into what it actually looks like in practice. 404 00:26:10,150 --> 00:26:14,930 The, part one of your book was the intro to the quantum computing. 405 00:26:15,495 --> 00:26:19,985 Then you introduce in part two quantum computing concepts, a 406 00:26:19,985 --> 00:26:21,225 lot of what we talked about. 407 00:26:21,255 --> 00:26:24,715 And then part three is the getting your hands dirty, code examples, 408 00:26:24,735 --> 00:26:25,935 algorithms, and all of that. 409 00:26:25,935 --> 00:26:28,875 So let's start where we always start. 410 00:26:28,895 --> 00:26:33,845 What does a hello world look like in, the quantum computing world? 411 00:26:34,390 --> 00:26:37,160 again, there are some similarities and some differences 412 00:26:37,180 --> 00:26:38,790 with, classical computers. 413 00:26:39,230 --> 00:26:43,290 especially in my book, I try to focus on the similarities because that makes 414 00:26:43,290 --> 00:26:49,645 it, easier to understand and to use by, existing, developers and, I think 415 00:26:49,955 --> 00:26:54,845 at the low level, the similarity is that a classical computer, if you write 416 00:26:54,845 --> 00:26:59,585 a hello world, the code, whether you write it in, Java or, Python or Rust or 417 00:26:59,585 --> 00:27:05,905 whatever, that, code is being translated into machine code and is ultimately, 418 00:27:06,365 --> 00:27:11,935 a number of zeros and ones that are converted because some gates are applied. 419 00:27:11,935 --> 00:27:18,255 So a typical gate in a classical computer is the NOT gate or the AND gate. 420 00:27:18,265 --> 00:27:25,115 And so every hello world application is translated into binary operations 421 00:27:25,365 --> 00:27:32,264 on bits and the binary operations, are executed by gates, by logical gates. 422 00:27:33,304 --> 00:27:37,434 And the concept in a quantum computer is the same. 423 00:27:38,314 --> 00:27:42,594 the difference is that, whereas in a classical computer, the input of the gate, 424 00:27:42,604 --> 00:27:48,134 for example, we have a, a NOT gate and if you have, input zero, the output of the 425 00:27:48,134 --> 00:27:50,494 NOT gate will be that the bit is now one. 426 00:27:51,294 --> 00:27:55,224 And if the input was one and you apply the NOT gate, the input is zero. 427 00:27:55,974 --> 00:28:00,194 And with this limited number of gates, it's proven many times that with 428 00:28:00,194 --> 00:28:03,864 a limited number of gates, you can create, a whole logical, computer. 429 00:28:05,354 --> 00:28:09,614 same applies to the quantum computers, with a limited number of gates, we 430 00:28:09,614 --> 00:28:11,574 can create quantum applications. 431 00:28:12,054 --> 00:28:16,724 But here, if we compare the, the NOT gate and we move that to. 432 00:28:17,219 --> 00:28:18,559 the quantum world. 433 00:28:19,269 --> 00:28:25,619 If our qubit, holds, the value zero and we apply the NOT gate, then 434 00:28:25,619 --> 00:28:27,769 the qubit will hold the value one. 435 00:28:28,299 --> 00:28:35,129 Now, when I say hold the value, that actually is short for when the qubit has 436 00:28:35,139 --> 00:28:40,934 a state that if we would be measuring it, in all cases, it would guarantee 437 00:28:41,164 --> 00:28:43,684 a result in a 1 being measured. 438 00:28:44,454 --> 00:28:46,964 That is what I mean with the qubit holds 1. 439 00:28:47,844 --> 00:28:54,814 So when the qubit holds 1, and we apply the quantum NOT gate, if we would then 440 00:28:54,814 --> 00:28:56,594 measure the qubit, we would measure 0. 441 00:28:57,594 --> 00:29:02,964 And vice versa, if it's 0 initially, and then we apply the gate, it will become 1. 442 00:29:04,509 --> 00:29:08,539 Here's the difference with classical computers, because a qubit may 443 00:29:08,549 --> 00:29:10,959 hold a combination of 0 and 1. 444 00:29:11,999 --> 00:29:17,769 If we apply the NOT gate, we will again have a combination of 0 and 1, but with 445 00:29:17,869 --> 00:29:19,909 different probabilities than before. 446 00:29:20,589 --> 00:29:22,219 the, approach is the same. 447 00:29:22,279 --> 00:29:30,459 We apply gates to a number of qubits, and that is at a very low level. 448 00:29:30,819 --> 00:29:35,409 And at a higher level, we instruct which gates do we want to use 449 00:29:35,439 --> 00:29:37,489 on what bits at what moment. 450 00:29:37,829 --> 00:29:43,729 Similar to how a classical hello world is, going to tell the CPU, load 451 00:29:43,899 --> 00:29:49,109 this value in register one, load that value in register two, do an end, 452 00:29:49,199 --> 00:29:50,699 and the result is in register three. 453 00:29:51,559 --> 00:29:56,384 And, everything on top of that is high level programming, and that's the same 454 00:29:56,384 --> 00:30:01,654 for a quantum computers, everything on top of the, cubit, arithmetic is, higher 455 00:30:01,654 --> 00:30:06,334 level, programming, which you can do in your, language of choice, actually. 456 00:30:07,054 --> 00:30:11,794 So just a thing that I don't think I understand is that classical 457 00:30:11,794 --> 00:30:16,384 computer, you've got the gates and you go one cycle, you store something 458 00:30:16,384 --> 00:30:20,884 in a register in a quantum computer. 459 00:30:21,144 --> 00:30:24,204 Does it work the same way you do one cycle, it goes through all the 460 00:30:24,204 --> 00:30:28,444 gates and you have some kind of equivalent of a register that does 461 00:30:28,444 --> 00:30:30,274 the observation at the end of it? 462 00:30:30,984 --> 00:30:32,224 Or is it different? 463 00:30:32,864 --> 00:30:35,214 the registers are qubits as well. 464 00:30:36,284 --> 00:30:42,024 so you do operations just on the memory, like you do in the classical computing. 465 00:30:42,074 --> 00:30:46,124 in a classical computer, whether it's in main memory or register, 466 00:30:46,364 --> 00:30:50,664 it is a bit, the thing with the measurement is that you only do 467 00:30:50,664 --> 00:30:53,904 this at the end of your application. 468 00:30:54,054 --> 00:30:58,724 and you do that only, once, you can't peek inside the quantum computer. 469 00:30:59,184 --> 00:31:01,554 we have a classical computer and that's a big difference. 470 00:31:02,064 --> 00:31:04,394 you can inspect the values at every moment. 471 00:31:04,524 --> 00:31:06,364 And, we have great debuggers. 472 00:31:06,754 --> 00:31:08,024 I'm a big fan of, GDB. 473 00:31:08,429 --> 00:31:10,129 to check on every step, 474 00:31:10,569 --> 00:31:11,909 what are my registers and so on. 475 00:31:12,159 --> 00:31:14,099 You cannot do that on a quantum computer. 476 00:31:14,699 --> 00:31:16,649 The moment that you look, it's gone. 477 00:31:17,419 --> 00:31:19,739 At least all the superpositions are gone. 478 00:31:19,799 --> 00:31:21,289 You will only see zeros and ones. 479 00:31:21,769 --> 00:31:25,449 And that's, again, the analogy with, Schrodinger's cat. 480 00:31:25,979 --> 00:31:30,169 The moment that you open the box, the cat is either dead or, alive, The 481 00:31:30,409 --> 00:31:35,269 observation, the measurement is something that you can only do at the very end 482 00:31:35,729 --> 00:31:41,269 and at that moment, all the qubits will be measured as either zero or one. 483 00:31:41,839 --> 00:31:46,239 And the key thing in creating quantum algorithms is to manipulate those 484 00:31:46,269 --> 00:31:50,739 algorithms that, the end result will give you information about 485 00:31:50,759 --> 00:31:52,189 what you were actually looking for. 486 00:31:53,154 --> 00:31:57,704 And that is done by, applying, mathematical, algorithms that 487 00:31:57,744 --> 00:32:01,124 will amplify, or cancel, things. 488 00:32:01,204 --> 00:32:05,804 you want to understand something if the outcome that you measure is one, 489 00:32:06,304 --> 00:32:12,044 it means that what you, were examining has this characteristic, and if the 490 00:32:12,054 --> 00:32:16,674 outcome will be measured as zero, you want it to be, matching with, the other 491 00:32:16,724 --> 00:32:21,764 characteristic, and initially there might be, for example, 50 percent chance that 492 00:32:21,764 --> 00:32:25,014 you would measure zero and 50 percent chance that you would measure one. 493 00:32:25,644 --> 00:32:30,024 If you don't measure it, you don't know anything because it looks just random. 494 00:32:30,424 --> 00:32:35,384 But by applying the correct, gates, the result, makes sense. 495 00:32:36,484 --> 00:32:40,554 And I do understand that this is, quite different from classical computers, 496 00:32:41,474 --> 00:32:44,614 the zero and the one that you measure in a classical computer corresponds 497 00:32:44,614 --> 00:32:46,404 to what you really want to measure. 498 00:32:46,844 --> 00:32:52,424 Whereas in quantum computers, it often gives, meta information and, that 499 00:32:52,424 --> 00:32:56,354 is why, apart from the hello world, this is the first thing that I, often 500 00:32:56,364 --> 00:33:01,754 describe and it's in the book, no real practical, benefit, but which explains 501 00:33:02,544 --> 00:33:07,634 why it is, sometimes, useful to, manipulate the input and the output. 502 00:33:07,704 --> 00:33:11,564 And then you measure something and then you know something about the problem 503 00:33:11,564 --> 00:33:14,244 that you were trying to investigate. 504 00:33:14,814 --> 00:33:22,444 for anybody, for whom, words Deutsch and Jota don't necessarily mean anything, 505 00:33:22,454 --> 00:33:27,214 could you give us a little bit more of what the algo actually is like? 506 00:33:27,599 --> 00:33:28,779 Yes, absolutely. 507 00:33:28,889 --> 00:33:33,479 I try to simplify the parts that are not relevant to developers. 508 00:33:33,609 --> 00:33:38,899 but I try to avoid making fundamental, quantum physics mistakes, so 509 00:33:38,899 --> 00:33:40,019 I'm simplifying things here. 510 00:33:40,029 --> 00:33:44,749 So that was just my disclaimer in case so the Deutsch, algorithm is, 511 00:33:44,809 --> 00:33:48,559 or the problem that's trying to solve there is, effective problems. 512 00:33:48,609 --> 00:33:51,649 We know that, we are given a function. 513 00:33:51,689 --> 00:33:56,279 We don't know if it's a constant or a balanced function, there are two constant 514 00:33:56,279 --> 00:33:58,709 functions and two balanced functions. 515 00:33:59,549 --> 00:34:02,219 and we can only make one measurement. 516 00:34:02,439 --> 00:34:07,859 So suppose that we, measure, the result of applying the function to the value zero. 517 00:34:09,139 --> 00:34:10,769 If we then get as a result. 518 00:34:11,479 --> 00:34:16,319 zero, then we still do not know is this a constant function or a balanced 519 00:34:16,529 --> 00:34:20,959 function, because if we would apply, but we're not allowed because we had only 520 00:34:20,959 --> 00:34:25,959 one chance, but if we would apply the function to the value one, and if we would 521 00:34:26,009 --> 00:34:29,909 measure zero again, then we know, yes, the function is always returning zero. 522 00:34:30,189 --> 00:34:31,379 It's a constant function. 523 00:34:32,099 --> 00:34:34,899 But if we would apply it to one and the result would be one. 524 00:34:35,359 --> 00:34:39,139 then we know that it's a balanced function because apply to 0 it gives 525 00:34:39,139 --> 00:34:44,669 0, apply to 1 it gives 1, so that's a silly, problem, but it shows that if we 526 00:34:44,669 --> 00:34:48,919 want to know this in a classical way, we need to do two function evaluations. 527 00:34:49,699 --> 00:34:54,539 And on a quantum computer, if we can use qubits where those qubits 528 00:34:54,569 --> 00:34:58,569 can have a separate position, we can, prove and also show. 529 00:34:58,639 --> 00:35:02,839 So that's where, we show the code how it is shown that only one function 530 00:35:02,849 --> 00:35:07,449 evaluation determine if it's a constant function or a balanced function. 531 00:35:07,949 --> 00:35:11,799 And that is because we apply it to, a superposition of zero and 532 00:35:11,799 --> 00:35:16,649 one, and then do some operations so that we are guaranteed that after 533 00:35:16,649 --> 00:35:18,279 the operations, the value is zero. 534 00:35:18,799 --> 00:35:21,859 Then we know, for example, that it's a constant function or a balanced function. 535 00:35:22,189 --> 00:35:26,839 So we actually need pen and paper to follow this or, I think it's explained 536 00:35:26,849 --> 00:35:31,729 well in the book and you can run the code, but the key point here is that, 537 00:35:32,199 --> 00:35:37,199 we've proven that there is a kind of a problem, a completely useless problem, 538 00:35:37,849 --> 00:35:44,274 but there is at least one problem where, we need, two function evaluations on a 539 00:35:44,274 --> 00:35:48,744 classical computer to solve it, and we can solve it with only one evaluation 540 00:35:48,994 --> 00:35:50,934 on a quantum computer to solve it. 541 00:35:51,694 --> 00:35:57,154 Now we can extend this to the Deutsch Jozsa, and then you can easily prove 542 00:35:57,174 --> 00:36:01,914 that, you will exponentially need to do more, function evaluations on the, 543 00:36:01,954 --> 00:36:04,244 classical computer and only linearly. 544 00:36:04,859 --> 00:36:07,029 More evaluations on the quantum computer. 545 00:36:07,739 --> 00:36:12,709 So that is a simple example that shows that there are problems that 546 00:36:12,759 --> 00:36:17,119 require less, steps on a quantum computer than on a classic, computer. 547 00:36:17,719 --> 00:36:22,079 And that is I think, one of the, root advantages of, quantum computers. 548 00:36:22,489 --> 00:36:26,479 And it also immediately shows that this is not applicable to everything. 549 00:36:26,809 --> 00:36:30,239 It's not, applicable to, to user interfaces or so. 550 00:36:30,569 --> 00:36:35,299 It's to a special kind of problems that, Yeah, scale exponentially on a 551 00:36:35,309 --> 00:36:40,419 classical computer and you can prove that they, scale, sub exponentially 552 00:36:40,469 --> 00:36:43,159 or, linearly, on quantum computers. 553 00:36:44,454 --> 00:36:47,624 Yeah, I think this is becoming very clear from what you're saying that 554 00:36:47,924 --> 00:36:53,454 quantum computers are not just, as some people like to paint them, a 555 00:36:53,454 --> 00:36:58,974 replacement or an exponential improvement on classic computers, they're going 556 00:36:58,974 --> 00:37:03,744 to work on very specialized problems where they make sense, and they're 557 00:37:03,744 --> 00:37:08,434 going to be narrowed to that corner, probably for a very long time. 558 00:37:08,434 --> 00:37:12,874 I think you mentioned also shores and I think I remember Grover's search. 559 00:37:13,054 --> 00:37:16,964 This sounds a little bit more applicable, don't they? 560 00:37:17,201 --> 00:37:18,941 yeah, real applications with real benefits. 561 00:37:19,077 --> 00:37:24,516 But then the drawback is they are much harder to explain adding to what 562 00:37:24,516 --> 00:37:26,186 you said, and that's indeed right. 563 00:37:26,186 --> 00:37:29,336 So quantum computer is not, something that's going to replace your desktop 564 00:37:29,386 --> 00:37:31,586 computer or laptop, or mobile phone or so. 565 00:37:31,586 --> 00:37:37,066 But I actually compare it more with, in today's computers, and 566 00:37:37,076 --> 00:37:41,406 for a long time already, you have a CPU that's doing lots of work. 567 00:37:42,086 --> 00:37:44,346 and, it's getting more attention recently. 568 00:37:44,661 --> 00:37:46,631 I've been using this example for a long time. 569 00:37:47,781 --> 00:37:52,751 there's also, one or more cheap use in most, computers and, for some 570 00:37:52,801 --> 00:37:55,731 tasks, CPUs are extremely well suited. 571 00:37:55,831 --> 00:37:59,091 And for other tasks, GPUs are, much better. 572 00:37:59,831 --> 00:38:04,551 and I think the same applies to, quantum computers, and I envision that in the, 573 00:38:04,621 --> 00:38:08,661 potential, applications, or computers of the future, we have a combination of 574 00:38:08,671 --> 00:38:13,981 CPUs, GPUs, and then QPUs, so the quantum processing unit where The different 575 00:38:14,011 --> 00:38:19,001 processing units are executing tasks that they are, very well suited, for. 576 00:38:19,651 --> 00:38:23,876 So for the vector operations, you would go to the GPU for the, typical, operations. 577 00:38:23,876 --> 00:38:24,806 You would use the CPU. 578 00:38:24,811 --> 00:38:27,896 And then for operations that require lots of, explain scale up, you go 579 00:38:27,896 --> 00:38:33,501 to the QPU and then the, the cool thing is that as a developer, you 580 00:38:33,831 --> 00:38:38,531 can leverage the benefits from the CPU, the GPU and a quantum computer 581 00:38:38,961 --> 00:38:42,371 without, knowing all details about them. 582 00:38:43,131 --> 00:38:47,671 I think most people who, write, for example, AI, applications, 583 00:38:47,711 --> 00:38:52,511 they don't know the individual instructions that the GPUs, have. 584 00:38:53,136 --> 00:38:57,766 same with quantum, software, you do not need to know all the low level, gates 585 00:38:57,786 --> 00:39:02,306 and details about quantum computers, but, applications, should know that they can 586 00:39:02,316 --> 00:39:04,716 benefit from different, processing, types. 587 00:39:05,296 --> 00:39:09,526 So that is where I think that, there's a place for, quantum computers, 588 00:39:09,536 --> 00:39:11,616 for classical computers for GPUs. 589 00:39:11,646 --> 00:39:13,646 And so in typical applications, 590 00:39:14,476 --> 00:39:19,366 I think we're going to have potentially also like the TPUs, I think they call 591 00:39:19,366 --> 00:39:24,426 them, like the ones that are like GPUs, but work on lower resolution, 592 00:39:24,436 --> 00:39:29,006 so that they're better suited for like LLMs and the QPUs as well. 593 00:39:29,786 --> 00:39:35,036 so back to my question about Grover's search, for example, let's maybe just see. 594 00:39:35,601 --> 00:39:39,321 What's the potential of, an algo like this and how does it 595 00:39:39,381 --> 00:39:41,961 work like high, very high level? 596 00:39:42,461 --> 00:39:42,741 Yeah. 597 00:39:43,111 --> 00:39:44,881 it is more tangible. 598 00:39:44,881 --> 00:39:48,961 It's more, down to earth, than, the, Deutsch Josse algorithm. 599 00:39:49,301 --> 00:39:53,391 but it's also, I have to be honest that the name itself is a bit misleading. 600 00:39:53,801 --> 00:39:58,661 and especially if a marketing department was to sell Grover Search, then it would 601 00:39:58,671 --> 00:40:02,861 probably say that, This is going to speed up all your searches, by a, a multitude. 602 00:40:03,781 --> 00:40:06,531 But the search itself is, as I said, a bit misleading. 603 00:40:07,681 --> 00:40:13,091 The algorithm allows you to find an element in an unstructured 604 00:40:13,091 --> 00:40:16,171 list a base to a specific rule. 605 00:40:16,861 --> 00:40:23,981 So if you have, a list of, 1000, elements, entities, whatever, and you apply a 606 00:40:23,981 --> 00:40:28,651 function, to those, elements, and if there's exactly one element of the whole 607 00:40:28,661 --> 00:40:30,861 list where that function would say: true. 608 00:40:30,931 --> 00:40:33,551 And in all other cases, it would say false. 609 00:40:33,821 --> 00:40:37,731 so doing that is, faster with Grover search than any 610 00:40:37,731 --> 00:40:39,721 classical algorithm can realize. 611 00:40:39,911 --> 00:40:44,691 For example, if we have, let's say a very stupid example, would be, we have a 612 00:40:44,691 --> 00:40:52,091 list of 100, athletes, and one of them is the, world champion in the, 5000 meter. 613 00:40:52,801 --> 00:40:55,841 So the function that we apply is, is this person the world 614 00:40:55,841 --> 00:40:57,591 champion in the 5000 meters. 615 00:40:57,761 --> 00:41:01,451 So for all of them, except for one, that value will return zero. 616 00:41:01,921 --> 00:41:04,321 And for one, the value will return, one. 617 00:41:05,191 --> 00:41:08,431 If we would do this on a classical computer, There are extremely 618 00:41:08,431 --> 00:41:13,281 optimized search algorithms, but still it would be in best case linear. 619 00:41:13,301 --> 00:41:19,491 So the moment that we get more, if the list becomes bigger, then on 620 00:41:19,531 --> 00:41:25,501 average, we will have to do more searches linear with the input. 621 00:41:26,151 --> 00:41:30,171 And on a quantum computer with Shor's algorithm, we can prove that, 622 00:41:30,211 --> 00:41:32,311 We need to do more evaluations. 623 00:41:32,311 --> 00:41:35,931 But instead of linear, it goes with the square root off the 624 00:41:35,931 --> 00:41:38,411 number off evaluations that we do. 625 00:41:38,431 --> 00:41:43,931 So it's definitely showing a speed up compared to classic search algorithm. 626 00:41:45,481 --> 00:41:50,851 and I think, going with the square root instead of the whole 627 00:41:50,871 --> 00:41:53,101 number is a major improvement. 628 00:41:53,551 --> 00:41:57,931 But as I said, It does not replace your SQL search query. 629 00:41:58,481 --> 00:42:02,181 It's really for simple searches where you know that there's only 630 00:42:02,181 --> 00:42:08,511 one element in the list that will result in, that you're looking for. 631 00:42:08,901 --> 00:42:12,581 So it's not that give me a list of all people older than 40 years 632 00:42:12,581 --> 00:42:15,271 old who live in this city or so. 633 00:42:16,391 --> 00:42:20,951 It's really more the example of give me the one element in this list that 634 00:42:20,971 --> 00:42:25,221 is, the world, champion in the 5,000 meter or so, that is a grover's, 635 00:42:25,221 --> 00:42:27,771 search, which, is definitely, useful. 636 00:42:27,931 --> 00:42:33,011 so it's more down to earth and it's proven to give, an advantage, over 637 00:42:33,131 --> 00:42:35,331 the best known, classical algorithms. 638 00:42:36,114 --> 00:42:38,574 So let's jump back to the QPUs. 639 00:42:38,574 --> 00:42:43,494 I was going to ask you for predictions for the future, where you see all 640 00:42:43,494 --> 00:42:48,414 of this going in terms of hardware and applications, and maybe in, one 641 00:42:48,414 --> 00:42:53,164 and five and 10 years, you hinted already at that, seeing the QPUs 642 00:42:53,844 --> 00:42:56,134 integrated in everybody's desktop. 643 00:42:56,834 --> 00:42:59,554 What else do you predict is likely to happen? 644 00:42:59,634 --> 00:43:00,934 What's your best guess? 645 00:43:00,964 --> 00:43:02,304 What do you expect to happen? 646 00:43:02,314 --> 00:43:04,734 Let's say in five to 10 years from now. 647 00:43:05,221 --> 00:43:08,846 I think the quick win and then we're not talking five years, it's, sooner 648 00:43:08,996 --> 00:43:11,096 because it is actually already there. 649 00:43:11,126 --> 00:43:16,386 But on a limited scale is the, quantum networking, with, possibility 650 00:43:16,386 --> 00:43:21,116 to do quantum key distribution and to do secure, communication. 651 00:43:21,496 --> 00:43:24,016 creating a shared key between two parties. 652 00:43:24,536 --> 00:43:29,286 That is something that I think, will become, more widespread in the next, 653 00:43:29,286 --> 00:43:34,906 few years because the limitation there is, the hardware is available. 654 00:43:35,376 --> 00:43:38,006 you only need one qubit, to make this happen. 655 00:43:38,526 --> 00:43:40,146 The limitation is more the network. 656 00:43:41,416 --> 00:43:47,636 and the quantum repeaters and so that is, that is less of a technical problem 657 00:43:47,666 --> 00:43:50,356 than creating general quantum computers. 658 00:43:50,746 --> 00:43:54,226 So that's where what I think is going to work in the short term. 659 00:43:56,046 --> 00:44:02,961 The, bit longer term is I think, more, specialized algorithms that, 660 00:44:03,061 --> 00:44:07,111 are targeting a specific task and that can be, for example, optimization 661 00:44:07,151 --> 00:44:11,791 algorithm, traveling salesman, which is, extremely interesting for some 662 00:44:11,791 --> 00:44:16,821 companies, or specialized financial algorithms, for stock market, things. 663 00:44:17,466 --> 00:44:23,196 Or, specialized, physics or chemistry algorithms that are then 664 00:44:23,536 --> 00:44:27,386 applied on a dedicated quantum computer that's really optimized 665 00:44:27,436 --> 00:44:28,766 to solve this particular algorithm. 666 00:44:28,916 --> 00:44:31,776 is then more or less a combination of hardware and software. 667 00:44:32,216 --> 00:44:36,786 So the hardware is more or less pre programmed to run 668 00:44:36,856 --> 00:44:38,806 that specific, application. 669 00:44:39,306 --> 00:44:45,726 I think that is what we will see in the medium term and, yeah, let's say 670 00:44:45,736 --> 00:44:51,976 five years or so, and then the more general quantum computers, which, 671 00:44:52,026 --> 00:44:56,496 are completely, independent from what software is going to run on top of it. 672 00:44:57,786 --> 00:45:00,446 not that I have a personal, opinion about it. 673 00:45:00,446 --> 00:45:04,171 It's just what I read from, the, people who are dealing with the hardware, that 674 00:45:04,181 --> 00:45:09,121 they find realistic, and then depending on what your source is, you will see 675 00:45:09,441 --> 00:45:12,861 some hardware engineers will say that, it's going to be available in two years. 676 00:45:12,911 --> 00:45:15,621 Others are saying that it's never going to be available. 677 00:45:16,091 --> 00:45:16,761 So my. 678 00:45:17,246 --> 00:45:21,556 rough guess is 5 to 10 years, then there's a fair chance that Shor's 679 00:45:22,156 --> 00:45:27,216 algorithm can be, applied at a large, scale, which is, of course, very 680 00:45:27,216 --> 00:45:31,556 worrying if by then you're still using, algorithms that are vulnerable by 681 00:45:31,556 --> 00:45:37,266 source algorithm, or actually worse, if the data that you're using now 682 00:45:37,456 --> 00:45:44,266 for, communication, is stored somehow, That data can be decrypted by quantum 683 00:45:44,266 --> 00:45:46,516 computers when they are powerful enough. 684 00:45:46,866 --> 00:45:54,206 So the time frame about when Shor's algorithm, for example, is going to be 685 00:45:54,206 --> 00:45:59,696 available, it's maybe a bit misleading, because even if it's only in 10 years 686 00:45:59,696 --> 00:46:07,136 from now, that does not mean that your data today is safe, because it's not 687 00:46:07,916 --> 00:46:13,726 that hard to snoop data from a network and store it locally, and then once one 688 00:46:13,736 --> 00:46:17,856 of the quantum computers are powerful enough, they can decrypt that data. 689 00:46:18,016 --> 00:46:21,986 and, and that can give quite some interesting information, about secret 690 00:46:22,016 --> 00:46:27,336 conversations, in the past when I say that it's gonna take at least five years 691 00:46:27,356 --> 00:46:29,886 before Shor's algorithm is applicable. 692 00:46:30,936 --> 00:46:37,156 Do not want to say that people can use classical, encryption like AS and so forth 693 00:46:37,166 --> 00:46:40,176 the next five years without being worried. 694 00:46:40,726 --> 00:46:42,946 I think, We should be worried today already. 695 00:46:43,596 --> 00:46:44,556 You should be worried. 696 00:46:44,556 --> 00:46:50,386 And also with all the leaks where companies lose their entire databases 697 00:46:50,386 --> 00:46:51,786 and they say, Oh, don't worry. 698 00:46:51,856 --> 00:46:53,056 It was all encrypted. 699 00:46:53,686 --> 00:46:55,636 That's the same problem, right? 700 00:46:56,466 --> 00:46:57,666 Yes, absolutely. 701 00:46:57,676 --> 00:46:59,026 that is very dangerous. 702 00:46:59,026 --> 00:47:03,671 more companies, and organizations are realizing, this, for example, signal 703 00:47:03,676 --> 00:47:08,911 the, messaging application, is already using, post quantum cryptography algorithm 704 00:47:09,351 --> 00:47:15,561 next to the existing, algorithm to encrypt, the data because, If data, 705 00:47:15,861 --> 00:47:21,591 going from and to a signal users is put somewhere on the hard disk, that's safe. 706 00:47:21,591 --> 00:47:24,661 That cannot be decrypted with a quantum computer anymore. 707 00:47:24,671 --> 00:47:27,981 you never know if there's going to be new algorithms being found out. 708 00:47:27,991 --> 00:47:31,421 But a number of companies are now following that example. 709 00:47:32,111 --> 00:47:36,531 already enhancing their encryption algorithms, which I think 710 00:47:36,531 --> 00:47:37,851 is a very smart thing to do. 711 00:47:38,621 --> 00:47:43,701 I still think that in the end, it will still be better if they would use 712 00:47:43,721 --> 00:47:47,331 quantum key distribution and quantum encryption, because then a quantum 713 00:47:47,331 --> 00:47:49,841 computer can not break quantum encryption. 714 00:47:50,301 --> 00:47:52,631 So then they are still safer. 715 00:47:52,951 --> 00:47:58,101 That's, can only be, really rolled out practically when, quantum networking 716 00:47:58,111 --> 00:47:59,841 is rolled out across the globe. 717 00:48:00,451 --> 00:48:04,211 that's an optimistic note to wrap up the episode on. 718 00:48:06,021 --> 00:48:07,981 Hopefully you're not too scared. 719 00:48:08,591 --> 00:48:12,181 for anybody who wants to go and check out the book, once again, it's called. 720 00:48:12,296 --> 00:48:14,216 "Quantum computing in action". 721 00:48:14,286 --> 00:48:17,056 It's published by Manning so we can get it from manning. 722 00:48:17,226 --> 00:48:22,556 com or you can go to your usual, book provider and it's absolutely worth a read. 723 00:48:22,616 --> 00:48:24,496 my guest was Johan Voss. 724 00:48:24,856 --> 00:48:28,296 It's been an absolute pleasure and I hope to see you again. 725 00:48:29,281 --> 00:48:29,571 Thanks. 726 00:48:29,571 --> 00:48:32,301 It was really, fun to talk about this.