.. _sec_intro: ===================== Ket Programming Guide ===================== .. topic:: Abstract The development of quantum computing necessitates specialized software tools. Ket is an open-source quantum programming platform that enables gate-based quantum development in Python, supported by a Rust-based runtime library and simulator. This is a programming guide for the Ket platform. It covers the core concepts required to develop quantum applications, including quantum process management, gate operations, measurement strategies, and Hamiltonian construction. Designed for readers with prior knowledge of quantum computing and Python, this guide bridges the gap between theoretical algorithms and practical software implementation. To consolidate these concepts, this guide concludes with a practical tutorial applying QAOA, VQE, and FALQON to the Max-Cut problem, ultimately equipping researchers and developers to fully utilize the Ket platform. It has long been known theoretically that quantum computers have the potential to solve certain problems faster than classical computers, and this reality is steadily moving closer to practical application. While it remains unclear exactly when today's quantum computers will achieve a definitive advantage in solving real-world problems, the path toward this future is well-established :cite:`googlequantumaiandcollaborators2025`. Quantum computing is an emerging paradigm for data processing that relies on the fundamental principles of quantum mechanics. This new paradigm introduces superposition and entanglement, powerful new tools for software development, while also imposing strict physical constraints, such as the impossibility of copying an unknown quantum state and the destructive nature of quantum measurement. These unique characteristics drive the need for specialized quantum programming tools. Ket :cite:`rosa2026` is an open-source quantum programming platform that provides the necessary functions and types to enable quantum programming natively in Python. The platform is built around the gate-based quantum computing model, where data is stored in qubits and the program is expressed as a quantum circuit. This programming guide for the Ket platform demonstrates how to develop quantum applications and explore the nuances of quantum software development. A priori knowledge of quantum computing and Python programming is expected from the reader. Exhaustive details, such as comprehensive lists of available gates and optional parameters, can be found in the :doc:`../ket/ket` documentation; we recommend consulting the official documentation as supplementary material. The remainder of this guide is organized as follows: * :doc:`platform` outlines the architecture of the Ket platform. * :doc:`process` explains the management of the quantum process. * :doc:`gates` details the application of quantum gates, encompassing controlled operations, higher-order gate composition, and inverse operations. * :doc:`measurement` discusses measurement strategies, expectation value calculations, and state extraction for retrieving classical information from quantum circuits. * :doc:`hamiltonian` provides a comprehensive guide to Hamiltonian construction. * :doc:`vqa` consolidates the presented concepts through a practical tutorial implementing QAOA, VQE, and FALQON for the Max-Cut problem. * :doc:`conclusion` concludes the guide with final remarks and an outlook on future developments. .. toctree:: :maxdepth: 2 :hidden: :caption: Contents: platform process gates measurement hamiltonian vqa conclusion