[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-397854-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-397854-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","optimizing-zx-diagrams-with-deep-reinforcement-learning-paper","Optimizing ZX-diagrams with deep reinforcement learning - Paper","","ZX-diagrams provide a graphical language for describing quantum processes and support many applications in fundamental quantum mechanics, quantum circuit optimization, and tensor network simulation. Their usefulness comes from local transformation rules that preserve the represented quantum process, enabling structural optimization. However, selecting an optimal rule sequence is typically open. This work combines ZX-diagrams with reinforcement learning, showing learned policies can outperform greedy, simulated annealing, and hand-crafted optimizers, while graph neural networks improve generalization to larger diagrams.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/optimizing-zx-diagrams-with-deep-reinforcement-learning-paper/397854/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/optimizing-zx-diagrams-with-deep-reinforcement-learning-paper/397854.png","ImageObject",300,407,{"name":42,"@type":43},"asba","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-27","2026-09-27",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",16,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does the paper address in ZX-diagram optimization?","Question",{"text":63,"@type":64},"It addresses finding an optimal sequence of local ZX-diagram transformation rules that preserves the underlying quantum process while improving the diagram’s structure.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does reinforcement learning help optimize ZX-diagrams?",{"text":68,"@type":64},"A reinforcement learning agent iteratively rewrites diagrams by learning a policy that predicts an effective action sequence, outperforming greedy, simulated annealing, and handcrafted methods.",{"name":70,"@type":61,"acceptedAnswer":71},"Why are graph neural networks used in the method?",{"text":72,"@type":64},"The policy is encoded with a graph neural network to exploit the diagram’s graph structure, enabling generalization to ZX-diagrams larger than those seen during training.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},397854,1790813805,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":33,"preview_urls":147},3985747872567,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","PAPER • OPEN ACCESS  \nOptimizing ZX-diagrams with deep reinforcement learning  \nTo cite this article: Maximilian Nägele and Florian Marquardt 2024 Mach. Learn. : Sci. Technol. 5 035077  \nYou may also like  \n-The ZX-calculus is complete for stabilizer quantum mechanics  \nMiriam Backens  \n-Simulating quantum circuits with ZX  \ncalculus reduced stabiliser decompositions  \nAleks Kissinger and John van de Wetering-Graphical structures for design and verification of quantum error correction  \nNicholas Chancellor, Aleks Kissinger, Stefan Zohren et al.  \nView the article online for updates and enhancements.  \n Mach. Learn.: Sci. Technol. 5 (2024) 035077 [https://doi.org/10.1088/2632-2153/ad76f7](https://doi.org/10.1088/2632-2153/ad76f7)  \nOPEN ACCESS  \nRECEIVED  \n26 April 2024  \nREVISED  \n23 July 2024  \nACCEPTED FOR PUBLICATION 3 September 2024  \nPUBLISHED  \n19 September 2024  \nOriginal Content from this work may be used under the terms of the  \nCreative Commons Attribution 4 .0 licence.  \nAny further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.  \nPAPER  \nOptimizing ZX-diagrams with deep reinforcement learning  \nMaximilian Nägele1,2, ∗􀁂 and Florian Marquardt1,2􀁂  \n1 Max Planck Institute for the Science of Light, Staudtstraße 2, 91058 Erlangen, Germany  \n2 Physics Department, Friedrich-Alexander-Universität Erlangen-Nürnberg, 91058 Erlangen, Germany  \n∗ Author to whom any correspondence should be addressed.  \n[E-mail:](E-mail: maximilian.naegele@mpl.mpg.de)[ maximilian.naegele@mpl.mpg.de](E-mail: maximilian.naegele@mpl.mpg.de)  \nKeywords: reinforcement learning, ZX-calculus, quantum computing, graph neural network, quantum physics  \nAbstract  \nZX-diagrams are a powerful graphical language for the description of quantum processes with applications in fundamental quantum mechanics, quantum circuit optimization, tensor network simulation, and many more. The utility of ZX-diagrams relies on a set of local transformation rules that can be applied to them without changing the underlying quantum process they describe. These rules can be exploited to optimize the structure of ZX-diagrams for a range of applications. However, finding an optimal sequence of transformation rules is generally an open problem. In this work, we bring together ZX-diagrams with reinforcement learning, a machine learning technique designed to discover an optimal sequence of actions in a decision-making problem and show that a trained reinforcement learning agent can significantly outperform other optimization techniques like a greedy strategy, simulated annealing, and state-of-the-art hand-crafted algorithms. The use of graph neural networks to encode the policy of the agent enables generalization to diagrams much bigger than seen during the training phase.  \n1. Introduction  \nZX-calculus is a diagrammatic language for the representation of quantum processes as graphs equipped with a set of local transformation rules. Due to the utility of these transformation rules, ZX-calculus has been applied to a wide range of problems ranging from fundamental quantum mechanics [1] over the description of measurement-based quantum computing [2] and analyzing variational quantum circuits [3] to quantum error correction [4, 5] . In particular, ZX-calculus has proven a promising candidate for speeding up tensor network simulations [6] and quantum circuit optimization [7–11] . However, finding the optimal sequence of transformation rules to achieve a given task is often a non-trivial task. Therefore, we bring together  \nZX-diagrams with reinforcement learning (RL), a machine learning technique where an agent iteratively interacts with an environment to learn a policy predicting an optimal sequence of actions. RL has been successfully applied to various domains such as game-playing [12, 13], robotics [14, 15], quantum chemistry [16, 17], and problems in quantum computing like quantum error correction [18–20], q","cbCaijnQADfAPNl4","https://ap.wps.com/l/cbCaijnQADfAPNl4","pdf",1204603,15,"English","# Introduction\n## Background on ZX-calculus and transformation rules\n## Reinforcement learning for rule-sequence optimization\n## Graph neural network policy encoding\n## Proof-of-principle task and results","[{\"question\":\"What problem does the paper address in ZX-diagram optimization?\",\"answer\":\"It addresses finding an optimal sequence of local ZX-diagram transformation rules that preserves the underlying quantum process while improving the diagram’s structure.\"},{\"question\":\"How does reinforcement learning help optimize ZX-diagrams?\",\"answer\":\"A reinforcement learning agent iteratively rewrites diagrams by learning a policy that predicts an effective action sequence, outperforming greedy, simulated annealing, and handcrafted methods.\"},{\"question\":\"Why are graph neural networks used in the method?\",\"answer\":\"The policy is encoded with a graph neural network to exploit the diagram’s graph structure, enabling generalization to ZX-diagrams larger than those seen during training.\"}]","Optimizing ZX-diagrams with deep reinforcement learning - Paper | PDF",1790467396,38,[148,152,156,160],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/194eeced7a8f6d4b5f27bd56b4902605.webp",983,1390,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/34ce44cb1500ff71251d5fb33c3da904.webp",982,1388,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/931102f00b6863801290761801c6558b.webp",981,1387,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/60ddfe09de1dcce150a43f98815dc821.webp",980,1385]