{"id":55,"date":"2025-12-22T07:46:12","date_gmt":"2025-12-22T07:46:12","guid":{"rendered":"https:\/\/qc.thelazydreamer.com\/?p=55"},"modified":"2025-12-22T07:46:14","modified_gmt":"2025-12-22T07:46:14","slug":"chapter-5-solving-qubo","status":"publish","type":"post","link":"https:\/\/qc.thelazydreamer.com\/?p=55","title":{"rendered":"Chapter 5: Solving\u00a0QUBO"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><em>(Classical vs Quantum)<\/em><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">Goal of this&nbsp;chapter<\/h3>\n\n\n\n<p>By the end of this chapter, you will:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Understand <strong>how QUBO problems are actually solved<\/strong><\/li>\n\n\n\n<li>Connect the <strong>graph view (Chapter 4)<\/strong> to real solvers<\/li>\n\n\n\n<li>See <strong>how annealing explores the energy landscape<\/strong><\/li>\n\n\n\n<li>Understand <strong>why solvers get stuck in local minima<\/strong><\/li>\n\n\n\n<li>Know clearly <strong>when you do <em>not<\/em> need a quantum computer<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">First Reality Check: QUBO Is Already the Hard&nbsp;Part<\/h3>\n\n\n\n<p>Once you have a QUBO: <em>Your problem is finished conceptually.<\/em><\/p>\n\n\n\n<p>All solvers (classical or quantum) are doing the same thing: <em>Searching for the lowest-energy configuration of the graph.<\/em><\/p>\n\n\n\n<p>From Chapter 4:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Nodes want to turn ON<\/li>\n\n\n\n<li>Edges add cost when bad combinations happen<\/li>\n<\/ul>\n\n\n\n<p>Solving QUBO means: <em>Find a set of ON\/OFF nodes that creates the deepest valley.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">How Solvers See Your Problem (Graph&nbsp;View)<\/h3>\n\n\n\n<p>From a solver\u2019s perspective:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Node weights \u2192 hills or slopes<\/li>\n\n\n\n<li>Edges \u2192 cliffs or walls<\/li>\n<\/ul>\n\n\n\n<p>The solver explores the graph by:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Turning nodes ON or OFF<\/li>\n\n\n\n<li>Checking how energy changes<\/li>\n\n\n\n<li>Moving toward lower energy states<\/li>\n<\/ol>\n\n\n\n<p>This is true for <strong>all solvers<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Two Big Families of&nbsp;Solvers<\/h3>\n\n\n\n<p>There are only two categories:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Classical solvers<\/strong> (run on normal computers)<\/li>\n\n\n\n<li><strong>Quantum \/ quantum-inspired solvers<\/strong><\/li>\n<\/ol>\n\n\n\n<p>They differ in <em>how<\/em> they explore the graph, not <em>what<\/em> they solve.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_cns3gzcns3gzcns3-1-1024x559.png\" alt=\"\" class=\"wp-image-57\" srcset=\"https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_cns3gzcns3gzcns3-1-1024x559.png 1024w, https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_cns3gzcns3gzcns3-1-300x164.png 300w, https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_cns3gzcns3gzcns3-1-768x419.png 768w, https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_cns3gzcns3gzcns3-1-1140x622.png 1140w, https:\/\/qc.thelazydreamer.com\/wp-content\/uploads\/2025\/12\/Gemini_Generated_Image_cns3gzcns3gzcns3-1.png 1408w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. Classical Solvers (Used Most of the&nbsp;Time)<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Brute Force (Learning Only)<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Try every possible combination<\/li>\n\n\n\n<li>Guaranteed correct answer<\/li>\n\n\n\n<li>Only works for very small problems<\/li>\n<\/ul>\n\n\n\n<p>Graph intuition:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check every valley<\/li>\n\n\n\n<li>Pick the deepest one<\/li>\n<\/ul>\n\n\n\n<p>Good for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Education<\/li>\n\n\n\n<li>Debugging<\/li>\n\n\n\n<li>Very small QUBOs<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Local Search &amp; Heuristics (Real&nbsp;World)<\/h4>\n\n\n\n<p>Most real QUBOs are solved using heuristics like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Simulated Annealing (SA)<\/li>\n\n\n\n<li>Hill Climbing<\/li>\n\n\n\n<li>Tabu Search<\/li>\n\n\n\n<li>Genetic Algorithms<\/li>\n<\/ul>\n\n\n\n<p>These solvers:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start somewhere on the graph<\/li>\n\n\n\n<li>Flip a few nodes<\/li>\n\n\n\n<li>Move downhill if energy improves<\/li>\n<\/ol>\n\n\n\n<p>Problem:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>They can get stuck in local minima.<\/em><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Why Local Minima&nbsp;Happen<\/h4>\n\n\n\n<p>From Chapter 4\u2019s landscape view:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A local minimum = small valley<\/li>\n\n\n\n<li>Global minimum = deepest valley<\/li>\n<\/ul>\n\n\n\n<p>A solver may reach a valley where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All nearby moves go uphill<\/li>\n\n\n\n<li>But a deeper valley exists elsewhere<\/li>\n<\/ul>\n\n\n\n<p>This is <strong>not a bug<\/strong>. It\u2019s the nature of complex graphs.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Annealing: Escaping Local&nbsp;Minima<\/h4>\n\n\n\n<p>Annealing adds one key idea:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Sometimes accept worse moves on purpose.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>Intuition:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Early: jump around freely<\/li>\n\n\n\n<li>Later: settle down carefully<\/li>\n<\/ul>\n\n\n\n<p>Graph view:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Early: hop over hills<\/li>\n\n\n\n<li>Late: roll gently into valleys<\/li>\n<\/ul>\n\n\n\n<p>This is why annealing works well for QUBO.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. Quantum &amp; Quantum-Inspired Solvers<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Quantum Annealing<\/h4>\n\n\n\n<p>Quantum annealers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Map your QUBO graph to a physical system<\/li>\n\n\n\n<li>Let physics explore low-energy states<\/li>\n<\/ul>\n\n\n\n<p>Important facts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Still heuristic<\/li>\n\n\n\n<li>Still probabilistic<\/li>\n\n\n\n<li>Not guaranteed optimal<\/li>\n<\/ul>\n\n\n\n<p>Quantum \u2260 magic shortcut.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Quantum-Inspired Solvers<\/h4>\n\n\n\n<p>Very important in practice:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run on classical hardware<\/li>\n\n\n\n<li>Use ideas inspired by quantum physics<\/li>\n\n\n\n<li>Often faster than naive methods<\/li>\n<\/ul>\n\n\n\n<p>These are widely used today.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">When You Do Not Need&nbsp;Quantum<\/h3>\n\n\n\n<p>You usually do NOT need quantum if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Problem size &lt; thousands of variables<\/li>\n\n\n\n<li>Good-enough solution is acceptable<\/li>\n\n\n\n<li>Stability and cost matter<\/li>\n<\/ul>\n\n\n\n<p>This is <em>80\u201390% of real optimization work today.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Key Takeaways<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>QUBO is solver-agnostic<\/li>\n\n\n\n<li>Local minima are normal<\/li>\n\n\n\n<li>Annealing helps escape them<\/li>\n\n\n\n<li>Quantum is a tool, not a miracle<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">What\u2019s Next<\/h3>\n\n\n\n<p>In the next chapter, we will solve QUBO <strong>hands-on with Python. <\/strong>See you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Classical vs Quantum) Goal of this&nbsp;chapter By the end of this chapter, you will: First Reality Check: QUBO Is Already the Hard&nbsp;Part Once you have a QUBO: Your problem is finished conceptually. All solvers (classical or quantum) are doing the same thing: Searching for the lowest-energy configuration of the graph. From Chapter 4: Solving QUBO means: Find a set of ON\/OFF nodes that creates the deepest valley. How Solvers See Your Problem (Graph&nbsp;View) From a solver\u2019s perspective: The solver explores the graph by: This is true for all solvers. Two Big Families of&nbsp;Solvers There are only two categories: They differ in how they explore the graph, not what they solve. 1. Classical Solvers (Used Most of the&nbsp;Time) Brute Force (Learning Only) Graph intuition: Good for: Local Search &amp; Heuristics (Real&nbsp;World) Most real QUBOs are solved using heuristics like: These solvers: Problem: They can get stuck in local minima. Why Local Minima&nbsp;Happen From Chapter 4\u2019s landscape view: A solver may reach a valley where: This is not a bug. It\u2019s the nature of complex graphs. Annealing: Escaping Local&nbsp;Minima Annealing adds one key idea: Sometimes accept worse moves on purpose. Intuition: Graph view: This is why annealing works well for QUBO. 2. Quantum &amp; Quantum-Inspired Solvers Quantum Annealing Quantum annealers: Important facts: Quantum \u2260 magic shortcut. Quantum-Inspired Solvers Very important in practice: These are widely used today. When You Do Not Need&nbsp;Quantum You usually do NOT need quantum if: This is 80\u201390% of real optimization work today. Key Takeaways What\u2019s Next In the next chapter, we will solve QUBO hands-on with Python. See you!<\/p>\n","protected":false},"author":1,"featured_media":56,"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-55","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\/Gemini_Generated_Image_cns3gzcns3gzcns3.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts\/55","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=55"}],"version-history":[{"count":1,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":58,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/58"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=\/wp\/v2\/media\/56"}],"wp:attachment":[{"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qc.thelazydreamer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}