TWed Talk: Thilanka Munasinghe (26 Mar 2025)
Key Takeaways
The video discusses evaluating the feasibility of quantum machine learning application development using NASA Earth observational data and US Census Bureau's socioeconomic datasets, with a focus on supervised learning techniques and data encoding techniques.
Full Transcript
Welcome everybody to uh this tw for 26 March. We're um we're very fortunate today to have uh what to me as a as a real skeptic of applying quantum computer to real problems. We've got Theelanka talking about his his escavades in uh using some uh pretty standard I guess now quantum machine learning algorithms to some some real data. Um thank you very much for for being here. Thank you. And it I my understanding is you can be demoing and all sorts of stuff. one demo uh like I'm going to run it on the simulator first like let me um get into that one one one step at a time. Uh thank you for having me today. uh based on the past wet talks that I attended and I've seen it like you know very um you know interactive uh way so that I thought like doing the same way I wasn't expecting different audience or like in a demo or like a very formal structure or like that but u um and if you have taken a class with me you know that I try to minimize the colors in my slides so don't doesn't have RPI red there right you remember right so I just want your attention to the point if I have lot of text means I am trying to explain something and then I will talk it out okay so those who have taken classes with me and they understand that as well and first of all I am so thankful for having me here today but when I walked in here today it it um it was a little bit of emotional if you remember why and what um I actually went upstairs and I'm dedicating this talk to this person. Um he he was my boss. He he literally in that second floor room when he interviewed me, he literally nailed me like into a point and said like why why are you doing this and that like you know when I started teaching data analytics but now pay attention to the date. If Peter was here today, he was alive four years ago. So I'm dedicating this thread talk to Peter Fox. um he was my boss, a great mentor, colleague um like I don't have to tell you that. So it just recalled my memory. So this is for him. And also when I was at NASA last um summer and fall and they they were telling like when I was I came from RPI and there was like do you know Peter Fox was like he single-handedly wrote the uh earth informatics thing and like you know and somebody told me a joke at NASA he said he was a Tasmanian dare devil or something but I didn't know I was like I said he was my boss I was not supposed to know. So but that's my icebreaker so that I can get your attention so while you know those who took the class that I with me and then you all know that I try to talk and bring you back your attention. All right so my talk today I broke into two parts. The reason I'm I we did some preliminary studies right uh evaluating the capabilities uh of RPI quantum computer with real world data sets and we published that and that's the part one of this talk but the second part is is built up from what we have done from the part one and from there onwards I want to discuss this with you show you some code because if you don't code if you don't put your hands you know into that it'll otherwise like you know it'll be hard so I have after that I'm going to share this code repository so you can try that by yourself uh learn it because learning by doing it is the best way that we could do all right so the pre I'm going to call it as a preliminary quantum machine learning study using NASA earth observational data set on RPI quantum computer which we have worked And this work got published at IRL epic data conference this fall and also uh featuring on the NASA technical report server right now. You could go there. You're going to access this as well. Um so I will use this as my base like a stepping stone for you to explain what I'm going to do. Now I am going to hit the pain points pain points of quantum machine learning how we can teach that class to the students when we are trying to teach it what are the problems we are going to face lessons learned from this techniques and stuff and also the current challenges in this field and how it is evolving um let's now machine learning data sets if you know the iris data set you have taken a class with me I you know data analytics Iris data set abalone data set you know the those are beautifully prepared clean data sets real world data is not like that but when you go to the IBM kisskit machine learning environment learning tutorials and stuff it's they use the Iris data set too but they don't tell you how to use a real world data set there's no tutorial go to IBM test kit ecosystem tutorial sessions you don't find anything that was my challenge 2024 spring semester when I started parallely the xin informatics class was trying to teach to going through this concepts along with uh with other things now let's try to build a problem based on real world data sets and a real pro real world problem now we all know about climate change so I'm not going to go and talk about it what are the effects so we can't solve all the problems let's narrow it down, narrow it down, narrow it down to a small chunks size problem that we can solve, we can do, we can understand. We don't need to build the most sophisticated model. We will start from the baby steps. From baby steps, we'll get into that. So, we will start explaining using a classical methods in a binary classifier. Then we'll look at the equivalent one in the in the quantum realm. Right? So there are multiple algorithms we could do that we can benchmark on a quantum simulator and also on RPI quantum computer that's what we started with. All right we when we talked about this now I had discussions with the people my colleagues at NASA we wanted to do a problem and we we thought like where we need a pilot study we don't want the data sets from the IBM kisskit which is like the UC Irvine nice data sets. So when we talked about the freezing rain we had had couple of years ago in Texas, people thought about the problem is mainly like you know we thought about like you know the power grid failure. No that's not the main one. The problem was in te over Texas crop frosting it did a bigger damage. Okay. Now how do we convert this into a classroom project problem? Right. So how do we use that and test it out on our RPI quantum computer? Similarly now now you understand this problem. This is I put some images as well. Um you don't I don't need to explain this what the IBM RPI quantum computer is. So we all know it's 127 cubits uh quantum computer we have now. Now the prop frosting either frost or no frost cool enough or cold enough or warm enough we can convert that into a what a binary classification problem right so let's start with that instead of building the biggest toughest problem than that we'll build one step at a time so that we can understand all right from there now the question is we don't need CSV data right if you're using it like we are defeating the purpose but the real world data It's not like nicely CSV data. So we decided to use what NASA observational data. So I see Daniel smiling in my exin informatics class how I heard them to use and taught them to convert the network common common data formats one of the uh rainfall temperature land surface temperature humidity data uh soil moisture data that's in that format. So then we want to convert that to CSV to numpy arrays. After that we can use that inside the IBM kiss machine learning environment. First we get the data set from the satellites. Then we have to clean them. That satellite is not in easy to use format. There are lots of uh I think you remember that too. She's nodding. She took the class as well. Yeah. So now with that but we had to understand what kind of a data set we are going to use right we want to use a data set with the context and the context and also metadata is available and also verified by other research scientists who are the domain experts. So that's why we decided to go for the MEA 2. I'm not going to go into details that if you want you can read that what the MERA 2 is. It's a reanalysis research and application version two data from NASA. By using that let's formulate this question. All right. Here is a tool that you don't you can get this data from the NASA API earth data portal API and also there's a tool called NASA Jawani. Now here I just put it that here you could easily get them download different data sets and you can incorporate into the machine learning data pipelines. Right? So just just wonder the QR code will take you to Joanni website as well. Now in this part you could see what's in NASA Joanis. Take a look at it at at your convenience. Now I'm going to use couple of data sets uh soil moisture, land surface temperature and other data sets so that I I can formulate my binary class uh classification problem. in a seat. Okay. All right. So now among all these data sets we use the total surface precipitation data again meta 2 analysis surface soil wetness data set and soil temperature layer one data set. Now this data is available hourly half an hour but I decided to use to use the monthly because our current like if you have a lot of data like hourly data we can't feed that in the quantum computer that's a problem I'll go and address one of the difficulties we have now you might ask why Texas is the biggest state in the United States of America the continental US right Um I mean like you know the so and also we if we can do that with the Texas we can use that as a pilot study and expand to other regions. The other thing is Texas gets lot of uh like all type of like you know the natural extreme weather events hurricanes flooding wildfires it's a very diverse and also Texas has the highest number of counties in the United States 254 counties so because the part two of this study I'm using US Census Bureau data and overlapping with that okay so now you understand we are going to get so now we are formulating a very basic question saying uh if now again it's the data is in Kelvin uh temperature so because that's how the satellite data comes in so we would say if it is greater than 295 Kelvin it is about 71 Fahrenheit we could say warm hot and less than that cold okay then after that in this particular study we use IBM kiss kit quantum machine learning 0.7 7.2 which is the current stable version. When you go to the website it's a8 it's not stable. It's not working properly. But if you there's a deprecated version 0.5. Now this tells you this is not even 1.0. This field is emerging. There's no that everybody's trying to contribute and this is the area that we can also contribute. That's where I'm going to start taking you towards. Now there are like binary classification we could do logistic regression even support vector machines uh as well. Now equivalent algorithm for like support vector machines there's a one algorithm called quantum support vector classifier we use that now the other type the the classification algorithm called the variational quantum classifier BQC's which are actually based on I can explain the details but I'll going to go and say the variational quantum algorithms these are based on the variational quantum item solvers so VQ is our two branches are going that we could get a VQ. See the classifiers VQR regressors. Now because I'm formulating this problem and I have something that I can compare with classical already everybody has done. Tristine probably has done read your paper early days but so we need something to compare. The other thing was for me to go and explain into the the classroom is I need something my students can all students already know otherwise if I start with the variational quantum classifier we can see immediately without explaining they cannot relate. So what we did was we we used the quantum support vector classifier because this has some resemblance with the quant support vector machines right so that's one thing we did this along with that all right now you understand so the problem formation you could say this data prep-processing converted CDF data classical machine learning within SVM with a linear linear radial basis function polom this part I don't have to explain you all know now this is the area is the hot stuff how do we get into this what are the pain points what are the pitfalls the hurdles that we have we need to identify that this is what the project workflow now doing this using the NAS earth observational satellite data we ran the classical SVM model with a linear kernel polomial radial basis Gaussian based classifier we got these results I give you the code. It's available for you to see and also the paper is available there for you to read as well. Now you could see okay again you have to understand this you might ask why they don't have a very high accuracy of things because this is a kind of a weather related problems if you cannot if you can get a like you know high accuracy with this it it's really difficult right so I mean it's it is low but applicable to the context of the problem so because I had to always talk with my NASA person uh Jennifer Hey, she is the prov she is the domain expert with the satellite data. Otherwise, I could go and work with the students. But if I don't understand the context and the content how to apply them, then I'm just like I have a hammer in my hand. I'm just like hitting every nail in front of me. Oh, I have a Yes. How big are the data sets? I'll get into that one. This one was 300 uh 376 data points. Yeah. we started we couldn't hold on to the uh the machine because what we did was we decided to go for monthly data. So that's because the objective was to test it first then we could get like the smaller data sets then gradually try to build it like you know go to the bigger data sets we've tested it out where it breaks where it breaks means simulator breaks first then we can go and run that on the machine. So this was the results. The next one what we did variational quantum classifier model on IBM 127 cubits quantum computer. It was close enough but remember I have only two independent variables. So my I have one dependent variable. I have two independent variables. This is working nicely when the data set is small and when you have a small number of features when we have a large number of features usually in real world problems we have large number of features right when you formulate them that's where this quantum machine learning problems start experiencing problems so that's where we are documenting right now which models we can use and also we had it on the uh simulator as well now you could See even with two different models and also when we're running different different cases somewhat results similar results we were able to get but still classical ones are better but this particular problem that we created and again the crowd frosting problem or that has been already studied by USDA and the NASA this is their problem formulation mechanism. I I asked them is this are we doing this correctly? Just because we are we say 29 uh the this Kelvin 295 we are using it is it is it the benchmark there they said yeah over Texas that is the value you want to use if you are using it over Washington state or Maine it's a different one so you have to understand the context before you apply so that's why we partnered with the research scientists from the NASA so the earth NASA justice god earth science data information center So we always as you can remember Daniel we had NASA scientists come to our X informatics class right every two weeks they come and with the similarly we discuss with them and we get the domain knowledge then we apply our data analytics techniques what we do all right now we understand that now the evaluation the preliminary study it worked only two cubits why two cubits every time you have an independent adding an independent variable you have to add have to have a additional cubits That's how the problems are formulated. Now, now you will see we going to hit a limit. We can't have go beyond how many cubits RP 128 127. But we can't even still use all 127 because it's needed for other stuff as well. Okay. So that is those are the lessons learned from our small preliminary study. classical method showed slightly higher results than the the quantum one on the machine which is 81 was the classical 76 was the come on participate with me with the uh on the IBM quantum computer. So anyway, now the future directions run times compare. How did the run times between classical and quantum compare the on the simulator or the real one? I'm just saying if did the quantum computer give you a speed advantage relative to the classical machine learning. I'm glad you asked that question because at this point we were not looking at the speed. I'll explain that you accuracy is very important in the I it's like this. I give you an analogy. I feel like it's speed up. I feel like I'm climbing up the ladder. What if the ladder is leaning to the wrong building? Right? So, uh we have checked like how much time it would take couple of seconds on like you know our laptop with these data sets. It's quickly like that. I you could see that when I'm running a sim uh demo right at the end of this but the focus was the accuracy. Can we use this model correctly? If it is not accurate enough, no point of having the speed. I mean it is important. We could algorithmically correct them. We call the uh quantum error correction and all these techniques and stuff later. But my this starting point the focus was to see it was Yeah. So I mean I don't know everyone else may already be really up to speed on this. So I don't want to delay you with this by any means but that's where I'm coming from. I'm curious like okay I'm using quantum machine learning. Why quantum right? What what about this data set? What about this problem? Motivates a quantum versus classical approach. And I would normally think there's a subpiece of it that's computationally expensive and suitable to put on a c on a circuit. But I'm just telling you what I'm thinking. I don't need you to slow down. No, that is a great questions. I am also interested what you just said. Later I'm going to explain that to you. Quantum machine learning will not work alone with cell the classical and quantum together. So the analogy I like to mention that is quantum would be like a bulldozer would like you know they reduce the search space or what do you part then the classical would be the shovel so you could do some parts I mean that's an analogy in my head that I was trying to explain to the students but the thing is it later if you look at the papers and the publications and also the uh uh the Jay Gamba talk last from IBM he said classical and quantum will work together it will not place that's where we are heading as well. So did I answer your question somewhat? Yeah. Okay, it's good to go. All right. So the future directions and after that I just want to thank people who helped us with this was going Jim Hendler and John Cobb and especially the NASA group and as you can remember Ankita and Daniela they've been coming to my class and I that I could not have done this without the domain knowledge. I am not a satellite data mirror 2 expert. That person came and uh sometimes we we bothered the students to meet come to the meet into the meetings right but it paid off but thanks for everybody here. Now end of the part one now the next thing is we cannot forget or neglect the socioeconomic and demographic aspect. Now we talked about using some weather data but we want to look at people at risk right like crop frost wildfires flooding there's always people associated with that now that means we have abundance of data from US census bureau now we could use that then the problem changes to we will have a lot of features right then it'll become highdimensional problem and all these Now how do we going to tackle now in this part we're going to see how many what's the number of maximum number of features we can use at least on the simulator if this if we can run it on the simulator then we step onto the RPI quantum computer and ben after that we benchmark it you see so we want to find out where are the buckling points where it's going to break down when you have the is it 10 features or is it 11 features is we hit the we push the boundary to 38 features and after that it breaks. Yes, it is fabulously breaks right that no that is a very important question because that's where we need new algorithms new mechanism how new data encoding techniques we can't rely on the basis encoding or amplitude encoding techniques that's where the math need to come up with that's where need the practical applications we need to take the resource reverse engineer it and tell hey you guys are the experts on error correction all these cubits like physicists material people I can't solve this problem I hit this problem at this number of features we have to collaborate with them work together so that that's where this is this second part is hitting yes is that limit do you think is an architectural issue or it is because we're trying to do some machine learning specific code on the quantum computer that is is triggering that issue. And that is a very good question. There's a little bit of a bias associated with this because I'm only using the IBM test kit environment. Currently, I'm like I'm slowly going to say I'm using Google's circ simulator as well using their TensorFlow quantum tensorflow mechanism. So then we could compare that and also the answering your first part of the question number of cubits also and also the architectures are affected. So I was talk I think Michael Microsoft is here. We were talk we were I was talking to Michael and say can we run the same code that we had with this on 56 cubits on huron and see if there's an improvement. So we are going to work on that after the down the road. Um let's see then we might I might have a better answer to give you. But I I think I understand there's also hardware limitations applies. Okay. Yes. Um it's what did you see in terms of the length of the circuit itself? The number of steps in the circuit because these things can get huge in a hurry. Yes. So that's where also pays limitations as well. I'll show you like you know when you get like you know the repetitions racks number two three four increases it's also collapse it's number of cubits you you're going to use depends on the number of independent variables and also uh how much like you know the coherence times it can hold right bigger the problems how the holding the coherence times is important so there are that that field is emerging that field is emerging so if we can do that if you can learn and if you can contribute ute to that we could get that part and the the the one thing I realized is like I was trying to teach this to the Xin Informatics plus students over there they were thinking hey you know what let's feature engineer this part like you know yeah we do that in classical machine learning but how do we share that with the others I'll get into that one some I kept a notebook on the side and say like okay these are my after when I'm free I'll think about those things questions all right QM applications develop uh development using soio economic and demographic data and environmental data set. Now what I'm trying to do here is not weather related data environmental related data as an example NASA satellites can look at it over from there and get the NDVI value normalized difference in vegetation index NDBI normalized difference in built index. If you look at it, oh, Albany right now, NDBI value, built index is different than Saratoga Springs. So that tells us okay what how much pe people are there, vegetation and these these are important facts when it comes to flooding, wildfire and those things. So I'll explain that to you. I'll show you how we got the data and started encoding into the uh quantum um environment. All right. So first of all I want to study human migration why that is a good way to get to know people move out we saw that California fire right uh people start had to move and also want to know what for what purposes people move in and move out to cal to Texas in that case we can get five year data from the American community survey data so we can use that in our data analytics causes course as well so we can do a parallel classical and quantum. So we could teach them like you know this is additional data source that I like to use. Now here along with that some some research questions can quantum machine learning techniques when I say techniques means because quantum supervised learning techniques quantum unsupervised learning techniques. Now the the problem with that is everybody's trying to solve everything together. No what I want to focus I want to put my blinders right now. I'm going to take a one problem, one area and figure that out. I focus on the supervised learning technique one. Why? Because if I get now I'm switching my shotgun approach to a rifle right now. I'm going to take one area figure it out what are the most problems we have when it comes to teaching when it comes to research where the math needed to be developed encoding techniques. Once you get that, we can go into that. I I narrow my work into this area. But then after that the base model that's why I said that I put that in italic in order to emphasize that the model produced favorable result similar to the classical one. Oh, I mean we know the classical is good but five years from now because IBM is telling we are going to have this advantage 10 years from now Google is saying this okay right now then my next question is kind of a research question what are the limitations when applying quantum machine learning models to address the problems in larger data sets now Christian you asked me that how big it is now first let's start with a small big small set figure it out what are the problems then scale it then when we have models that are robust enough right that way we can we we know our part otherwise we are like shooting in like in blind that's my personal opinion so contain soio economic demographic and environmental data now we know satellite data is noisy but observational satellite data is noisy it's hard it's not like CSV it has multiple steps hierarchical data formats need to convert. So you can see the complexity of this problem. Now along with that separate research questions will come up. How do weather and climate events influence county to county migration in Texas? Now county to county migration in Texas because we know flooding in Harris County. Do you know what's Harris County? The biggest city. Houston. Yes. What is the Dallas County? Dallas. Travis County. San Antonio Austin. Austin my head's kind of exploding. It's okay. And I have to try um I'm going to come back to the existential question. Thank you. Okay. Well, so um I there's I'll try to support it to me. There's there's kind of two aspects. One is the big question why? Okay. Is this a is is the point of this to demonstrate uh can it be done or is the point uh that there is a um that there's a performance advantage a quantum advantage that's that's one aspect of the question but for me as the engineer um I'm possibly the only engineer in the room um that the how what are the the steps you know so in the first part the first part of the presentation um I did not see how you actually do it you know for me what I want to actually understand is the how I want to understand practical aspects of how I take an arbitrary data set uh there's a a first question which is uh is the question I'm trying to to ask of that data set what is the appropriate because Because part a big part of classical uh you know classical machine learning and those techniques is deciding um what is the appropriate methodology for for achieving the the an answer to the question okay what and that includes like what architecture should I use should I be using uh uh GPUs on this problem etc etc etc so there is the should I apply this this technique and this this uh this architecture to this problem to this question I'm asking um and then given that there is some suitability uh there's some potential quantum advantage do I do that how do I actually take my data and and and and uh use the kids get mumbo jumbo to to actually do it I said I was the ultimate skeptic um because you know in in uh a lengthy length of time of us having this this quantum computer it's still I still don't understand how I actually take a problem, you know, one of my problems and and and apply it to the quantum computer. I I I sure know how to do a whole world on a quantum computer, but I don't know how together. No. Well, let's do it, you know. I want to know how you can do it. That's a great question. That is a great question. Let's do that. But the thing is like the what he has a good point. um how do we do that and also the examples on the IBM kisskit thing is all the data sets that they have UCI ones it's like a fabulously created beautiful data sets without error and things you just like they have a data set they give you this hit the button run you get that but you don't understand that's why the code notebook that I brought here to explain how the conversion part like you know going from classical to quantum encoding after that which models go there. Yes, go through it. See it. All right. So, now what's the time right now? I want to be mindful with that. Yep. You got check. Good. So, now we you understand these things. High number of features hinder the performance of current uh QML models. So, I should have some kind of a test case. That's where I'm heading towards. Now, now this part you all know where the data come from. I did some exploratory data analysis work with this data set as well because outliers, trends, patterns, all these things or effects. We conduct the classical machine learning models. Then I do a regression part. This is not directly compatible with that. But I was very interested. Then I apply the QSBC and VQC. Okay. So now this is the methodology overview that I went through explorative data analysis. Now I need to I'm formulating this problem into the migration in and out as an example. So net moved in moved in means people the county A to county B if people moved into this county from all of the other counties of the US we call it moved in and minus moved out the difference will be net net moved I don't have to calculate that this data is available through US census bureau using an API you can get them that's why I kept these things you see that now once we have that when we know this net flux if it is positive that means people are moving into like the Texas Houston areas but like the counties like El Pacho other all these rural counties people are moving out so we will have a positive value net flux net flux positive and negative if it is positive positive, I'm going to label it as one. If it is negative, I'm going to label that zero. Then I can go back to my classical methods, binary classification model and the quantum counterpart of that and test it. So that's where I ran the uh the notebooks. So you see that we created a problem using real world data, US Census Bureau data. We are using earth observational satellite data and we are using environmental data along with that we are creating a problem and see what are the features what are the things that affects our human mobility and this is backed by I didn't arbit these variables just because came to my head no I did a literature review and people have studied this there's a theory called revenance pushpull theory people p get p pulled into the areas with the economic prosperity and people are pushed out pulled into the rural counties and things. All right. So again these are the factors we figure it out income and employment age groups you might ask why age groups again I'll tell you this is the hardest part when I try to encode that demographic factor age groups male female young adults are considered as 18 to 20 25 they moved into regions 65 and above people are considered as like the retirement or elderly people they go to retirement states areas like Florida or different part of the even the same state. So now without spending too much time now you understand this problem in hand uh we conducted the feature importance as well. Now again I put the slide so that way that you can understand what are the counties. I can sit down so people can see me study focus area conducted the exploratory data analysis. I'm going to skip that because this is a classical part. You all know you don't need to need need me. This is the out methodology of the data analysis which is I you sometimes I use that in my data analytics class as well. Then after that we I did PCA K means all these things to identify what are the clusters and things like that. Here's again little bit of an overview of land surface temperature coming from NASA vegetation index and also I taught the students how to use the Google Earth Engine and Daniela is like ah because why Google Earth Engine? Because I want to put that into a county. I'm going to lock that county the residential data and also the weather data that NASA doesn't pro provide that once I get that CS data I can put that into the Google Earth Engine then I can lock it over there then I can do a real world study that's what it is now traditional data splitting training I'm not going to go and talk about it it's same same stuff classical machine learning now how do I evaluate it this is classical you all know that right so I'm going to keep that. Now this is the important part in Texas distribution of net migration there are counties the count means number of counties about 70 counties about 5,000 people moved there are counties over 20,000 people moved in what are the counties Dallas County Travis County Austin now I'm trying to put this because there is a reason our the the variance and the distribution right it's different it's not like normally distributed data. This is also important when when we do that machine learning and this is also important when we do that quantum machine learning right based on that we have to determine what algorithm we going to use what treatment we know we need to do we have to normalize the data we have to identify the outliers we have to determine whether that outlier is an influential point or a leverage point influential point will affect the slope of my regression line right so that's why I put this distribution ution. Now you see these three counties are my extreme outliers. Okay, now you understand. Now let's get get into that. Here's a fancy part. Fancy part using geopandas. I decided we map them. I have the map uh right now here as well. The I I can share the code if you are if you are willing to run this. So using the precipitation data and this is a mobility one. the one that I want to do median household income and also age 65 above you see Houston Dallas Austin the people they're trying to flock into there this is like more like other counties are more like homogeneous ah these are the counties what the 25 to 18 to 25 young adults what are these University of Dallas Houston all like 30 to 40 like you know they flock into. So this shows it that exploited data analysis you all know. Now this is the one fun part. This data set contain 2016 to 2020 data 31st of 2021. Look at the migration reduce reduction. Why do you think that co I because for fun you know I I do data analytics you know that you know it just get me going. I had to do check other years as well. It's almost similar in the color pattern. But anyway, now I just kept that for the pan part. So I'm going to go and I identify my key variable because I want to know because I can't use all my 40 variables that I've determined in my quantum one because it's going to collapse because from my preliminary studies we all know that. So anyway get into this one. I'm gonna skip this because at the time this is classical again. how we label the moved out. That's what I mentioned here. Now I'm going to say these are my two labels with the mobility data. Then I'm going to switch the gear to quantum and test test with them. QSVC and variational quantum classifier again classical results with grid search cross validation it improved. So we have evidence for that classical I'm going to skip it. ROC curve all these things that's good. Now some of the features this is a very interesting important stuff. Do you see this when it comes to moving and move out age male demographic 67 to 69 is the most people out the second important feature is 22 to 24 female not male. You're talking about Texas. I had to actually ask from a social scientist why this is little bit get little bit political so I don't want to go into that part. This is the year politically changed and uh reproductive rights. That was a hypothesis that person told me but I am not. This is the data shows me. I'm just going to leave it there. Wrap it there. I'm going to take it out. But I'm a data scientist. I'm a data analyst. This is what interests me. So here's I had to look at the variance inflation factors all these things. Let's get past that data distribution. Shapiro test called macros mirov test. Now this I'm going back. I'm using the classical data classical quantum environment again. Now let's use the variational quantum classifier and run this with the important features. This is a theory behind it. It will take a lot of time for me to explain two cubits. If you are using two independent variables, you'll go to more. Then we do the data encoding techniques. It could be basis encoding, amplitude encoding, Hamiltonian encoding. In this example, we are using the uh the real uh amplitude encoding. Then we have the variational circuit VQC. We get the parameters, we get back. Let's get since we're waiting, let's go to the code and run this. Okay, so we got this results and uh run them and we could see like when I'm running to have the large feature set, this is this is important about 10 features I'm trying to run. It doesn't give me this. This look at the accuracy. It's 0.51. It's like 50/50 chance. It's like a coin flip. So, it just it doesn't produce anything with the simulator. So, that's where a good area was to research why this algorithm behaves like this way. What's the behind the curtain, the math and all these things? That's something very interesting. Did you try the step one feature at a time? You keep adding more. Yeah. So I will show you like you know the I had like you know the all 38 features that I kept 10 features. So I selected the one that easily can run with se you know the lower number of features that I'm going to run and show it to you. Okay. So again the paper the initial papers are available. Okay let's try to get in here. So the students have the difficulty when they're using a quantum computer because I think for them to learn the best tool is the Anaconda environment. I will demonstrate to you because this was a trial and error. I had to figure that out. Even when you go to IBM, when you go to IBM test kit tutorial, the video the IBM people they say use the VS code. But I I know Abra you like that but when it comes to teaching that was difficult because I had to install in all these modules and things and it was easier for me. This is for my you know I I learned from trial and error in CI building with the students. So I'm going to run the up indices I could run that. Give me a minute. Open it up. It should be running. I'm going to run the kernel. Activate the kernel. Oh, what? Okay. Now, so what I'm going to do is quickly without hyperparameter tuning on anything. the first one to demonstrate how fast we can do it classicalally. You will see that here I'm going to run all these in the cells at a time. Uh here is my research the comprehensive machine learning data set Texas 2015 to 2019. So we could run cell by cell if you like or I could run all cells quickly u and explain that to you a little bit. So could you zoom in a little bit just uh this is it. Yeah. Good. Thank you. I'll go and explain one that when we finish because I choose 100 iterations the small number of variables that we have then we we get the results we can compare again I said the seed is not like you know the same seed that you can't directly compare because I want to see the variance like you know how we vary the data we get a random sample and run that so that's one aspect I mean I could lock into that one with a set seed parameter but now when we are running this it's a VQZ algorithm now what we doing here is we are objective function. We are running that and you will see it about in a minute or two. This is a good laptop. I mean like M3 with lot of RAM on it. So M3 chip you could see with the simulator now I I will show you number of features that I used there in okay it's already generated these things. All right. So what I'm going to do here train set split this part I think these are my features median household income I'm now predicting the class label moved in moved out right for 254 counties we add and using the net flux percentage of people who are age 65 because we got to know age 65 people and the young adults are the one important and in counties unemployment rate is important we can get that unemployment number of people in from the US Census Bureau average rainfall also plays a huge important factor and summer temperature why summer temperature because I didn't know I use the temperature my NASA colleague came and said you cannot do that because you have to use the June July August average summer month average three months temperature and use that otherwise you will not represent that because that's a demographic uh I mean domain expert knowledge they came. So go back to your importance your factor importance plot. Which one? The factor importance plot that you had. Ah feature importance. Future importance. Yes. That one. So want to make it bigger. Yeah. One. So this felt told me remember I can't use all these things when I ran. I know, but but I what what I was looking at I was looking to see based on what you said, I would have thought rainfall. So summer temperatures way down there. Yes. But I wanted to use that as a combination of variables, demographic variables, environmental variables, and weather variables. Summer temperature and rainfall would go into because I wanted to use a combination. It's not like all four and I'm running it. I want to see that how because the again the values varies as well like you know the the again I this time when I was doing I want to tell the students how to normalize the data like you could use the minmax method or the standard scalar function or standard deviation that one as well so median income was used then here I mean like I'm experimenting like you know just going there as well yes if I want to do that I'll choose the top ones and do that okay okay go ahead So now after that I create that data set check my data frames. This is like u I usually do it in R in my data analytics class but this is in Python because I had to go back to the kisskit. So that's why I did that. So you could see this I'm checking my train set test set then after that I test labels train label I run it like you know the I again I said that I'm not tweaking any par hyperparameters. I just want to know the classical one was ready it went because I'm interested to see whether I can use the quantum one in the highest number of features that I can use where the my breaking point the simulator if I know where the it breaks at the simulator let's say 10 features then I could go back to up to nine features and test it out then compare that on the simulator and on the classical computer that's my next step I'm going to do let's go yeah so here you could see I use six uh seven features in this case that was working without a problem. If I use 10 it's going to you know take too much time so you could see the and probably all these like you know the connecting these things. The most important part here is that I want to tell my students now we change this repetition to three to number of times it's like a hyperparameter tuning in quantum level and also how do we encode the data to classical data to quantum the the one we use here was the real amplitudes right there are basis uh there are various techniques now you need to test them out by reading the documentation as well this is where we could test it about how can we use different techniques, encoding techniques and other things as well. So by doing this and again it's a this is a BQC just go back up and wait I want to see where you're actually reading your data into your quantum. Yeah. Where's that you just highlighted you just made a huge step where where do you actually take the data okay and throw it into the quantum. Good. Let's go on cell by cell. Now I am reading the data frame PD desktop. This is in CSV file. Yeah. Yeah. I see this is all conventional stuff. Yes. Now after that I drop this my uh the x and y then keep going okay which part you didn't understand I want to see where the quantum happen actual quantum stuff this is where it's starting right of choice train c training a quantum machine learning model from this this cell onwards but the data itself the you actually throwing the data at it actually because it is on saved here take a look at this my training set and the test set is the same. If you go and take a look at the IBM kisskit one, it's the same mechanism you're using. So yes, something happened in in a package that takes just regular real data and automatically initializes the quantum system. Is that what you're relying on? So if you defi define which one encoding method we want to use, right? So since you asked that go to the line where you had amplitude encoding or what I think that's what that was that was what caught my eye. This this is the feature map. ZC feature maps. That's what the encoding part is that function. Let's Okay, so ZZ feature map. Mhm. Okay. That's that's the instruction or the using you could. Now, have you have you decomposed ZZ feature map to see what's inside of it? Not not necessarily on this one, but it's like it gets it. It automatically gets me the other part. It's what I'd be curious about is what it actually uses inside. A lot of these functions have multiple layers until you get down to the actual gates. It's not until you get to the gates that you really start to see what they're doing. And I use the initialize function all the time and u some of the stuff comes out of that is crazy even for initializing very simple things. Oh, maybe I'm just can you give me a very specific example because this is a mirror image of what the exact IBM tutorial with the Iris data set is doing. Can you explain? I have not seen a tutorial. Yeah. Yeah. Let let me get that for you. And and then the reason I use it is because it's the only way I've been able to take a vector of numbers and actually put it into the computer. So that's that's your circuits and things. Okay. But let's get into tutorials and data it um you you set up your cubits and throw the data into it. Okay. So what I'm after so you tell it how many features you have you you build the circuit and then the data that understood understood. Yeah because what what I good good is where you actually so so the take your data where you actually take your data and present it to the circuit. That's what we're asking about. Where do you actually where does the data meet the quantum? It seems like it's buried in a package. It's a buried in a package. That's why I don't create the package. It's available. Then I limit the find out the limitations in that package. So as an example, when you have an R package or scikitlearn package, do you implement the package before you use it and say like you are going to use the random forest. No, but wait a minute. I sure in R Python, you can look you can see the the source code of the package and read the source code and see what it's doing. Yeah. But more to the point, if I'm doing a if I'm doing a a PCA, okay, I sure as hell tell the PCA what data I'm applying. It's a vector of numbers. Yeah. And what I don't see here is where you actually where the data meets the that meets the I don't see that the amplitude whatever it was so hold this but a package I so we use the package and we test it out later we can go there and check these functions parameters so there's an argument in that package that is the data set yes could you show us the line please okay so if you okay Now I understand. Okay. It's like all right. So what happens to the data? Okay. Okay. Now we get that feature dimensions, right? The feature maps. We pass that data set. This is the creation part. Then wait, wait, wait. That's not the data set. Let's leave it there for I see. Okay. I see numbum features. Mhm. But where's your where's your data? I feed it up here. My train set and test set. I see train set. I see test set. But where do but where do you how do you give that? Might be object-oriented. Oh Jesus in Python. I mean in Python should be bought someplace. I mean you're not thinking objectly, Marty. Wait, I'm confused. Hold on for a second. Let's step one step at a time. Let's di diagnose this problem. So what part is where it's the data is come from? So number of features is determined by the number of variables we have. I get that. Okay. So now we initiate this. Then after give me a minute based purely on the number of features. Yes. Then we feed the data set into that. Show us exactly. Okay. Okay. So we get that we got the sampler and feature map on SAS. This is the call back function to get that. Here is my VQC variational content classifier, the score, the training data set, testing data set. Okay. Okay. Well, that's what we you jumped. Oh, before my steps, I had to explain. Yeah. This is the it's like you know the SVM in like this is the method, right? This is my model that I'm building. You see this? I'm fitting the model train features, test labels. Mhm. This is the part. You get that? Yeah. No, that's what we were asking. He was at the bottom. At the bottom. I get it now. I'm glad. I'm glad. I'm glad. I was I should I should point of order. It's It's five o'clock now. It's actually got to get to the good part. So, you could see. Okay. Now, I was able to get that and I like demonstrated we how we could use that. The hardest part is when we go to this tutorial, right? That you could go to the tutorial. There's a getting started one then they tell migration guide 0.5 they they initially jumped to the point 8 the 72 was missing that we did work on that we still this is unstable work now everyone can yeah everyone can do that. So this is training a model data set with the iris data set load Iris data set it's an R and Python you could do that. So they built the classical one and the quantum one and explained that I built it based on there and I'm testing the limits and finding out how many features maximum number of features I can have before it breaks down. Okay. What how did it break? How did it break? When it comes to 37 features it breaks down. Okay. And how's the accuracy? Accuracy is bad. That's even at 20. How about at 20? 20. Um I by 11 minutes breakdown I stopped it so there's no point. It was 61 and it comes to about six uh features that's what in the presentation slides it was after 61 which is 61%. And this is after that I increase the number it'll go to 51. This then I realized there's no point which is like 50%. Yeah. So that tells us then know this is a very give me one minute. This is a very important thing. We need to investigate why this algorithm fails this way. What's the math behind it? How did they code it? Will that work in a higher cubit environment? Is this the way because of this quantum simulator is programmed? Will that work differently with the Google's CQ simulator? Those are good questions to ask. So we can't jump to a conclusion and say like that. Those are the open questions for us to think. So is the simulator is different than the quantum. Did you run both like on the computer and the previous one with the satellite data? We ran it with the two cubits two independent variables on the quantum computer and the classical but this one we can't run on our computer. We are working on it because the point one was when I was trying to talk with Microsoft if you is there we were trying to figure it out if this is was uh you know the uh the the library is working properly. Here's a a question. So run talking about that it broke. It broke with X number of features on the on the simulator. It just break. Why why would it break on the simulator? That's a question I want to know that too. Using conventional computing. Why would it break on? It breaks means there it gives me garbage. Uh like you know the I I Yes. Yeah. You were asking Yeah, I think I got the answer. I was just asking what yeah that's mean by breaking breaking means like you know the I try to have like you know there are 100 different variables and things I think I have a uh like you know data frame like this just trying to run this and it just stopped right so you could see like different age groups like an 18 to 19 20 21 all these things the next one was after that I realized the accuracy is like this this is like 50/50 chance there's no no point even wasting my time on that yeah No. Great. No, no. I mean, my head's exploding, too. But please, you're No. I I meant I like that. Great. I I This is G you're giving me more questions to think about and how to take it to the next part. Yeah. So, when you meant breaking, does it mean like uh like the accuracy drops or like an error? Like what I'm trying to Oh, I should use a careful English words onto that. breaking means like you know um what I meant is it's not producing good enough results that it just like because after this I realized like yeah still run it can run and also and one point when I had like 100 trying to run that it just computer froze maybe like you know some other things running on the back also on the simulator I have not run it on the real the reason I was asking about that very first one there the amplitude thinging where you're telling it the number of features Um, I suspected if you if you decompose that and started to look inside, you'd see that that's where it's trying to figure out how many cubits to actually ask for. And and I, you know, if you put in 10 features, I bet it's more than 10 cubits. Yes, exactly. The number of cubits equal to the number of cub uh number of features is equal to number of cubits that we need to use. Well, but I I'd be willing to bet that it's more uh All right. You're saying you you can't I until you open that thing up and see the actual absolutely correct. Yes, that is I agree with you. I'm with you. I am on that page with you. And my guess is that correct, you know, you're getting you maybe getting more cubits than than actual features in in there. And then you know the rest of it is well it eventually you do some sort of well there's a I can't remember what the thing that initialize actually uses but um Tom I'm I I am with you on that that's an area that I want to explore and more to go and see as well. Yeah I a couple of colleagues are working on right now with let's work together. I'm willing to see where we can do those things. Yeah. Is that the end? I I'm going to I'm going to uh declare mental bankruptcy at this point. Let's let's let's thank uh thank you very much. Thank you. I mean certainly provocative. I'm going to end the
Original Description
TWed Talk: Thilanka Munasinghe on "Evaluating the Feasibility of Quantum Machine Learning Application Development Using NASA Earth Observational Data and US Census Bureau's Socioeconomic Datasets" (26 Mar 2025)
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Playlist UU4rjm_R9sgRNvv9QsgH8LDw · Tetherless World · 35 of 40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
▶
36
37
38
39
40
TWed Talk: Katie Chastain on "Breaking the Gender Schema" (6p, 24 Oct)
Tetherless World
TWed Talk: Neha Keshan on "Stress and Machine Learning"
Tetherless World
TWed Talk: Sabbir Rashid on "A Semantic Data Dictionary Modelling Methods Tutorial"
Tetherless World
TWed Talk: Brenda Thomson on "Explanation in Human-AI Systems"
Tetherless World
Spring 2019 TWed Lighting Talks: Tetherless World Constellation
Tetherless World
Twed Talk: "Global Earth Mineral Inventory: A DCO Data Legacy" (Anirudh Prabhu)
Tetherless World
TWed Talk: Minor Gordon on "Test early, test often, and keep your master branch stable" (4 Sep 2019)
Tetherless World
TWed Talk: Oshani Seneviratne on Ontology Aided Smart Contract Execution for Unexpected Situations
Tetherless World
IDEA Talk: Adrien Pavao (INRIA) on Machine Learning Challenges: Crowdsourcing Big Data Problems
Tetherless World
TWed Talk: Jim McCusker, "OWL at the Crossroads Set Theory, Graph Theory, Logic, and Computability"
Tetherless World
TWed Lightning Talks Fall 2019 (11 Dec 2019)
Tetherless World
TWed Talk: Sola Shriai on "What's a Personal Health Knowledge Graph?"
Tetherless World
TWed Talk: Minor Gordon on "A CLEAN architecture for semantic web applications" (04 Mar 2020)
Tetherless World
TWed Lightning Talks Spring 2020 (29 Apr 2020)
Tetherless World
TWed Talk: Henrique Santos on "Making Sense of Common Sense" (Weds, 07 Oct 2020)
Tetherless World
TWed Talk: Sabbir Rashid on "Annotating and Transforming Data with Semantic Data Dictionaries"
Tetherless World
TWed Lightning Talks (Fall 2020)
Tetherless World
TWed Talk: Sabbir Rashid on "SQuARE: The SPARQL Query Agent-based Reasoning Engine"
Tetherless World
TWed Lightnining Talks: Spring 2021
Tetherless World
TWed Lightning Talks (Fall 2021)
Tetherless World
TWed Talk: Jamie McCusker on "Build Your Own Knowledge Graph With Whyis 2.0" (28 Sep 2022)
Tetherless World
TWed Talk: Sola Shirai on "An Introduction to Rule-Learning Models for Link Prediction" 20 Oct 2022
Tetherless World
TWed Talk (28 Feb 2023): Brenda Thomson on "Bibliometrics: The limitations and possibilities"
Tetherless World
TWed Lighting Talks Spring 2023
Tetherless World
TWed Talk (11 Oct 2023): Jamie McCusker on " "Splitting the World With My Grandfather's Axe"
Tetherless World
FOCI LLM Users Group: "Beyond Autocomplete: Instruction Following & CoT Reasoning in LLM Agents"
Tetherless World
FOCI GenAI Users Group (31Jan2024) : The Large Language Model for Mixed Reality (LLMR)
Tetherless World
TWed Lightning Talks Spring 2024 (14 Feb 2024)
Tetherless World
FOCI LLM Users Group: "A Guide into Open Source Large Language Models and Techniques"
Tetherless World
Danielle Villa "Testing Faithfulness of Language Model-Generated Explanations" (25 Sep 2024)
Tetherless World
Jamie McCusker "Getting Started with Knowledge Graphs using Whyis" (23 Oct 2024)
Tetherless World
TWed Talk: Tom Morgan on "Intro to Quantum Fourier Transform on the RPI Quantum One" (4p Wed 13 Nov)
Tetherless World
TWed: Abraham Sanders on "Training Large Language Models to Reason in a Continuous Latent Space"
Tetherless World
TWed Paper Talk: Danielle Villa on "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL"
Tetherless World
TWed Talk: Thilanka Munasinghe (26 Mar 2025)
Tetherless World
TWed Talk: "ChatBS-NexGen: A Platform for Automated KG-based LLM Fact Checking" (23 Apr 2025)
Tetherless World
"Toward Fluid AI Conversation with Natural Turn-taking: Full-duplex Modeling with Audio Codec LMs"
Tetherless World
TWed Talk: "Detecting Ambiguity in Question Answering over Financial Documents using LLMs"
Tetherless World
TWed Talk: "Model Context Protocol (MCP): Standardizing Tool Use for LLM Systems" (18 Feb 2026)
Tetherless World
TWed Talk: "Discourse-Aware Scholarly Knowledge Graphs for the LLM Era" 18 Mar 2026
Tetherless World
More on: ML Maths Basics
View skill →Related Reads
📰
📰
📰
📰
“Los Movimientos”: The Routing Problem That Nearly Broke My Spirit
Towards Data Science
How Guardoc transforms medical document processing with Amazon Nova models
AWS Machine Learning
The Reward Calibrator That Learns the Shape of Its Own Judgment
Dev.to · Daniel Romitelli
Reducing Human Annotation with ML Active Learning
Towards Data Science
🎓
Tutor Explanation
DeepCamp AI