{"id":35,"date":"2025-12-16T13:31:40","date_gmt":"2025-12-16T13:31:40","guid":{"rendered":"https:\/\/qc.thelazydreamer.com\/?p=35"},"modified":"2025-12-17T00:05:56","modified_gmt":"2025-12-17T00:05:56","slug":"chap-1-first-step","status":"publish","type":"post","link":"https:\/\/qc.thelazydreamer.com\/?p=35","title":{"rendered":"Chap 1 &#8211; First Step"},"content":{"rendered":"\n<p id=\"b4ad\">Welcome to&nbsp;<strong>QUBO: From Zero to Hero (I\u2019m not Hero yet \ud83d\ude04 )<\/strong>.<\/p>\n\n\n\n<p id=\"d5d3\">I recently joined a company working on&nbsp;<strong>quantum computing, optimization, and AI<\/strong>. While learning the tech stack, I kept seeing&nbsp;<strong>QUBO<\/strong>&nbsp;everywhere but it wasn\u2019t always clear what it really meant or how people were using it day to day.<\/p>\n\n\n\n<p id=\"2d92\">This series is my way of understanding what problems are being solved and what people around me are actually doing.<br>It is also&nbsp;<strong>how I reflect and organize my own understanding while learning QUBO<\/strong>.<\/p>\n\n\n\n<p id=\"74fe\">I start from zero, keep things simple, and focus on practical understanding.<br>If you\u2019re also new or curious, let\u2019s learn together.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ab1b\">1. What is QUBO?<\/h2>\n\n\n\n<p id=\"6d4d\">QUBO is a way of writing decision problems using:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>binary choices<\/strong>\u00a0(0 or 1)<\/li>\n\n\n\n<li><strong>a formula<\/strong>\u00a0that adds penalties when rules are broken<\/li>\n\n\n\n<li><strong>a solver<\/strong>\u00a0that tries to make the formula as small as possible<\/li>\n<\/ul>\n\n\n\n<p id=\"6d68\">Think of QUBO like a&nbsp;<strong>game<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You try combinations of 0s and 1s<\/li>\n\n\n\n<li>Breaking rules adds penalty points<\/li>\n\n\n\n<li>The best answer is the one with\u00a0<strong>lowest score<\/strong><\/li>\n<\/ul>\n\n\n\n<p id=\"51e4\">If the score becomes&nbsp;<strong>0<\/strong>, that means \u201cperfect \u2014 all rules satisfied.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"c2db\">2. Why learn QUBO?<\/h2>\n\n\n\n<p id=\"1800\">Because many real-life problems can be turned into QUBO and solved automatically. Here are typical examples QUBO handles well:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e894\">Choosing the Best Combination (Knapsack Problem)<\/h3>\n\n\n\n<p id=\"f72c\">You pick items to put in a backpack:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>maximize value<\/li>\n\n\n\n<li>but don\u2019t exceed weight<\/li>\n\n\n\n<li>and follow some conditions<\/li>\n<\/ul>\n\n\n\n<p id=\"4efa\">QUBO evaluates all choices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5e1e\">Scheduling (Classes, Meetings, Shifts)<\/h3>\n\n\n\n<p id=\"3119\">You want:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>no conflicts<\/li>\n\n\n\n<li>respect availabilities<\/li>\n\n\n\n<li>minimal gaps<\/li>\n\n\n\n<li>balanced load<\/li>\n<\/ul>\n\n\n\n<p id=\"2c5b\">All these constraints can be written in QUBO.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"39bd\">Route Optimization (Delivery, Travel)<\/h3>\n\n\n\n<p id=\"aa25\">Example: Deliver pizza to 10 houses in the shortest path<\/p>\n\n\n\n<p id=\"1569\">\u2192 A very hard problem<\/p>\n\n\n\n<p id=\"f24b\">\u2192 QUBO can solve it<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1400\/0*kHxjGAKIz5ElFnth.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"d901\">Task Assignment<\/h3>\n\n\n\n<p id=\"ee9c\">Which person should do which task?<\/p>\n\n\n\n<p id=\"d581\">Match skills, avoid overload, respect preferences.<\/p>\n\n\n\n<p id=\"f29a\">QUBO handles these \u201cmany choices + many rules\u201d problems naturally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ce4e\">3. Super simple example: Choose 1 drink<\/h2>\n\n\n\n<p id=\"9740\">Let\u2019s start very simple.<\/p>\n\n\n\n<p id=\"a77d\">You have&nbsp;<strong>two<\/strong>&nbsp;drinks:&nbsp;<strong>Coke<\/strong>&nbsp;and&nbsp;<strong>Milk Tea<\/strong><\/p>\n\n\n\n<p id=\"5d19\">Variables:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>x = 1<\/strong>\u00a0if you choose Coke<\/li>\n\n\n\n<li><strong>y = 1<\/strong>\u00a0if you choose Milk Tea<\/li>\n<\/ul>\n\n\n\n<p id=\"b6e2\">Rule:&nbsp;<strong>Choose exactly ONE<\/strong>&nbsp;drink.<\/p>\n\n\n\n<p id=\"2edd\">We express this rule as:&nbsp;<strong>QUBO = (x + y \u2212 1)\u00b2<\/strong><\/p>\n\n\n\n<p id=\"9b43\">This formula becomes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>0<\/strong>\u00a0when the rule is satisfied<\/li>\n\n\n\n<li><strong>positive number<\/strong>\u00a0when the rule is broken<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"b5d0\">4. Testing all drink choices<\/h2>\n\n\n\n<p id=\"d20b\">Check all combinations:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*pRBbiO_KL3wXzw2DrJlSKQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"52c7\">The solver will pick solutions with&nbsp;<strong>0 penalty<\/strong>&nbsp;\u2192 choose exactly 1 drink.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3a45\">5. Assessment: Try it yourself<\/h2>\n\n\n\n<p id=\"0b86\">Now try a slightly bigger case.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ece9\">You now have 3 drinks:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Coke<\/li>\n\n\n\n<li>Milk Tea<\/li>\n\n\n\n<li>Orange Juice<\/li>\n<\/ul>\n\n\n\n<p id=\"f064\">Variables:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>x = 1<\/strong>\u00a0if you choose Coke<\/li>\n\n\n\n<li><strong>y = 1<\/strong>\u00a0if you choose Milk Tea<\/li>\n\n\n\n<li><strong>z = 1<\/strong>\u00a0if you choose Orange Juice<\/li>\n<\/ul>\n\n\n\n<p id=\"8791\">Rule:<\/p>\n\n\n\n<p id=\"48c4\"><strong>Choose exactly ONE.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"d740\">Your task:<\/h2>\n\n\n\n<p id=\"79b8\">Write the QUBO formula for this rule.<\/p>\n\n\n\n<p id=\"fcb9\">(Hint: in the 2-drink case, we used&nbsp;<strong>(x + y \u2212 1)\u00b2<\/strong>.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to&nbsp;QUBO: From Zero to Hero (I\u2019m not Hero yet \ud83d\ude04 ). I recently joined a company working on&nbsp;quantum computing, optimization, and AI. While learning the tech stack, I kept seeing&nbsp;QUBO&nbsp;everywhere but it wasn\u2019t always clear what it really meant or how people were using it day to day. This series is my way of understanding what problems are being solved and what people around me are actually doing.It is also&nbsp;how I reflect and organize my own understanding while learning QUBO. I start from zero, keep things simple, and focus on practical understanding.If you\u2019re also new or curious, let\u2019s learn together. 1. What is QUBO? QUBO is a way of writing decision problems using: Think of QUBO like a&nbsp;game: If the score becomes&nbsp;0, that means \u201cperfect \u2014 all rules satisfied.\u201d 2. Why learn QUBO? Because many real-life problems can be turned into QUBO and solved automatically. Here are typical examples QUBO handles well: Choosing the Best Combination (Knapsack Problem) You pick items to put in a backpack: QUBO evaluates all choices. Scheduling (Classes, Meetings, Shifts) You want: All these constraints can be written in QUBO. Route Optimization (Delivery, Travel) Example: Deliver pizza to 10 houses in the shortest path \u2192 A very hard problem \u2192 QUBO can solve it Task Assignment Which person should do which task? Match skills, avoid overload, respect preferences. QUBO handles these \u201cmany choices + many rules\u201d problems naturally. 3. Super simple example: Choose 1 drink Let\u2019s start very simple. You have&nbsp;two&nbsp;drinks:&nbsp;Coke&nbsp;and&nbsp;Milk Tea Variables: Rule:&nbsp;Choose exactly ONE&nbsp;drink. We express this rule as:&nbsp;QUBO = (x + y \u2212 1)\u00b2 This formula becomes: 4. Testing all drink choices Check all combinations: The solver will pick solutions with&nbsp;0 penalty&nbsp;\u2192 choose exactly 1 drink. 5. Assessment: Try it yourself Now try a slightly bigger case. You now have 3 drinks: Variables: Rule: Choose exactly ONE. Your task: Write the QUBO formula for this rule. (Hint: in the 2-drink case, we used&nbsp;(x + y \u2212 1)\u00b2.)<\/p>\n","protected":false},"author":1,"featured_media":40,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_featured_media_url":"https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/sketchplanations-the-travelling-salesman-problem.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":1,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions\/36"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/media\/40"}],"wp:attachment":[{"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}