A task flow orchestration method and device, electronic equipment and storage medium
By constructing workflows for quantum-classical hybrid computing tasks through a visual orchestration interface, end-to-end automated execution is achieved, solving the problems of low efficiency and frequent errors in existing technologies, and improving the development efficiency and accuracy of hybrid computing tasks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN SPINQ TECHNOLOGY CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, the orchestration of quantum-classical hybrid computing tasks is inefficient and error-prone, the development process is fragmented, and users need to manually switch between different tools or code modules.
This paper provides a task workflow orchestration method that constructs workflows through a visual orchestration interface, including quantum encoding nodes, quantum computing nodes, and semantic interpretation nodes, to achieve end-to-end automated execution and automatically complete data transformation, quantum computing, and result interpretation.
It significantly improves the development efficiency and accuracy of quantum-classical hybrid computing tasks, avoids errors caused by fragmented processes and manual connections, and simplifies the development process.
Smart Images

Figure CN122242808A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum computing technology, and more specifically, to a task scheduling method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] With the development of quantum computing technology, more and more application scenarios are attempting to combine classical data processing with quantum computing to form a quantum-classical hybrid computing process. Among related technologies, mainstream quantum programming frameworks are mainly geared towards low-level quantum operations, requiring developers to manually chain together the various processes of task execution in code. This forces users to manually switch between different tools or code modules when developing quantum-classical hybrid computing tasks, resulting in a fragmented development process, cumbersome operation, and a high risk of errors.
[0003] Therefore, how to improve the scheduling efficiency and accuracy of quantum-classical hybrid computing tasks is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a task flow orchestration method, apparatus, electronic device, and computer-readable storage medium, which improves the orchestration efficiency and accuracy of quantum-classical hybrid computing tasks.
[0005] To achieve the above objectives, this application provides a task flow orchestration method, including: A workflow for a target task is constructed through a visual orchestration interface; wherein, the workflow includes multiple process nodes organized by directed connections and the data input and output relationships between process nodes, and the process nodes include at least quantum coding nodes, quantum computing nodes and semantic interpretation nodes; In response to a workflow execution instruction, the workflow is executed to achieve the target task; The execution of the workflow to achieve the target task includes at least the following: the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method; the quantum computing node performs quantum computing based on the quantum state data and outputs the original quantum computing result; and the semantic interpretation node converts the original quantum computing result into interpretable semantic information.
[0006] Optionally, the process node may further include a classic data preprocessing node; Accordingly, before the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, the execution of the workflow to achieve the target task further includes: The classic data preprocessing node preprocesses the input classic data; wherein, the preprocessing includes data cleaning, missing value handling, normalization, standardization, feature extraction, and converting unstructured data into any one or a combination of any number of items in structured data; Accordingly, the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, including: The quantum coding node uses a preset quantum state coding method to convert the preprocessed classical data into quantum state data.
[0007] Optionally, the process node further includes a data format bridging node; Accordingly, before the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, the execution of the workflow to achieve the target task further includes: The data format bridging node converts the format or dimension of the classical data input to the quantum encoding node to adapt to the input format or dimension required by the preset quantum state encoding method.
[0008] Optionally, the preset quantum state encoding method includes any one or a combination of ground state encoding, amplitude encoding, angle encoding, Hamiltonian encoding, QAOA encoding, error correction encoding, and user-defined encoding.
[0009] Optionally, during the quantum computing process at the quantum computing node, executing the workflow to achieve the target task further includes: Context-aware code completion is performed on the quantum circuits configured in the quantum computing node based on the target version of the quantum computing framework. And / or, provide warnings for illegal operations planned to be performed in the quantum circuit; wherein the illegal operations include at least one or a combination of any of the following: repeatedly measuring the same sequence of qubits, using a quantum logic gate that is not supported by the target hardware platform performing the quantum computing, or constructing a quantum circuit whose depth or width exceeds the constraints of the target hardware platform.
[0010] Optionally, the process node further includes a parameter optimization iteration node; Accordingly, after the quantum computing node performs quantum computation based on the quantum state data and outputs the raw quantum computation result, the execution of the workflow to achieve the target task further includes: The parameter optimization node updates the quantum parameters based on the original quantum computing results and feeds the updated quantum parameters back to the quantum computing node.
[0011] Optionally, the raw results of the quantum computing are converted into interpretable semantic information, including: If the target task is a classification task, then the original quantum computing result is mapped to the probability of a sample belonging to different categories or the similarity between the sample and each category. If the target task is an optimization task, then the original result of the quantum computing is interpreted as the optimization process of the corresponding objective function value or the physical meaning of the optimal solution.
[0012] To achieve the above objectives, this application provides a task flow orchestration apparatus, comprising: A building unit is used to build a workflow for a target task through a visual orchestration interface; wherein, the workflow includes multiple process nodes organized by directed connections and the data input and output relationships between process nodes, and the process nodes include at least quantum coding nodes, quantum computing nodes and semantic interpretation nodes; An execution unit is configured to execute the workflow in response to a workflow execution instruction to achieve the target task; The execution unit is at least used for: converting input classical data into quantum state data by the quantum encoding node using a preset quantum state encoding method; performing quantum computing based on the quantum state data by the quantum computing node and outputting the original quantum computing result; and converting the original quantum computing result into interpretable semantic information by the semantic interpretation node.
[0013] To achieve the above objectives, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to implement the steps of the task flow orchestration method described above when executing the computer program.
[0014] To achieve the above objectives, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the task flow orchestration method described above.
[0015] The task orchestration method provided in this application constructs a workflow containing quantum encoding nodes, quantum computing nodes, and semantic interpretation nodes through a visual orchestration interface, and executes each node sequentially based on this workflow to achieve the target task. This method achieves end-to-end automated execution of quantum-classical hybrid computing tasks by linking the three key stages—quantum encoding, quantum computing execution, and result semantic interpretation—in a node-based and visual manner. Specifically, the quantum encoding node is responsible for converting classical data into quantum state data, the quantum computing node calls the corresponding quantum algorithm to complete the calculation and output the original result, and the semantic interpretation node further converts the original result into understandable semantic information, thus forming a complete task loop. This structured workflow orchestration effectively avoids the inefficiency and frequent errors caused by fragmented stages and manual connections in traditional development, significantly improving the efficiency and accuracy of quantum-classical hybrid computing task development. This application also discloses a task orchestration device, an electronic device, and a computer-readable storage medium, which can achieve the same technical effects.
[0016] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings are used to provide a further understanding of this disclosure and constitute a part of the specification. They are used together with the following detailed description to explain this disclosure, but do not constitute a limitation of this disclosure. In the drawings: Figure 1 This is a flowchart illustrating a task flow arrangement method according to an exemplary embodiment; Figure 2 A flowchart illustrating another task flow orchestration method according to an exemplary embodiment; Figure 3 This is a structural diagram illustrating an intelligent programming system that supports the entire development and visual workflow orchestration of quantum-classical hybrid computing, according to an exemplary embodiment. Figure 4 This is a structural diagram illustrating a task flow orchestration apparatus according to an exemplary embodiment; Figure 5 This is a structural diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0019] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0020] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] This application discloses a task flow orchestration method that improves the orchestration efficiency and accuracy of quantum-classical hybrid computing tasks.
[0022] See Figure 1 A flowchart illustrating a task flow orchestration method according to an exemplary embodiment, such as... Figure 1 As shown, it includes: S11: Construct the workflow of the target task through a visual orchestration interface; wherein, the workflow includes multiple sequentially connected process nodes and the data input and output relationships between process nodes, and the process nodes include at least quantum coding nodes, quantum computing nodes and semantic interpretation nodes; The visual orchestration interface is a user interface that allows users to design and organize complex computational processes through graphical operations. This interface provides a library of icon-based node components representing different computational functions (such as data input, processing, computation, and output).
[0023] In practice, users drag and drop nodes onto the design canvas and connect them with directed lines to define the execution order and data dependencies of the nodes, thereby constructing a complete workflow in the form of a directed acyclic graph that describes the process from data input to output. It should be noted that the nodes include at least the following functional nodes: classical data source nodes, data preprocessing nodes, quantum encoding nodes, quantum computing nodes (including at least quantum circuit construction sub-nodes), data post-processing nodes, and semantic interpretation nodes (or data interpretation nodes). The resulting workflow comprises multiple nodes, the directed graph relationships between nodes, and the input and output data structures.
[0024] For example, a user can drag a quantum encoding node and a quantum computing node onto the canvas, and then draw an arrow line from the encoding node to the execution node. This intuitively defines the basic process of classical data being quantum encoded and then sent to a quantum circuit for execution.
[0025] It is evident that the visual construction method greatly lowers the barrier to building hybrid quantum-classical computing tasks, enabling people without a strong background in quantum programming to intuitively design, understand, and assemble complex end-to-end computing processes, and achieving rapid prototyping and flexible adjustment of task logic.
[0026] S12: In response to workflow execution instructions, execute the workflow to achieve the target task; The workflow execution command is a command issued by the user through clicking a button on the interface, which is used to trigger the pre-built workflow to start running.
[0027] In practical implementation, the directed acyclic graph structure defined by the visualized workflow is first parsed, automatically generating a topological sorting execution sequence that conforms to the dependencies between nodes. Then, each process node is activated and run sequentially according to this sequence, while simultaneously, the format matching and transmission between upstream node output data and downstream node input data are automatically completed in the background. For example, in a workflow that includes classical preprocessing, quantum encoding, quantum computing, and result interpretation, the preprocessing node is first started to process the raw data. After processing, the result data is automatically transmitted to the quantum encoding node for state preparation. Then, the prepared quantum state data is scheduled to the quantum computing node for computation, and finally, the computation result is transmitted to the semantic interpretation node to generate the final report.
[0028] As can be seen, this step achieves fully automated execution of the entire computing task. Users do not need to manually intervene in each intermediate step or write glue code for data transfer, which significantly improves the efficiency, reliability and repeatability of task execution, and effectively avoids errors that may be introduced by manual operation.
[0029] S12 includes: S121: The input classical data is converted into quantum state data by the quantum coding node using a preset quantum state coding method; Quantum state encoding refers to a set of mathematical rules and physical operation sequences that map classical information (usually numerical data) to specific states of qubits.
[0030] In practice, quantum coding nodes perform corresponding mathematical transformations and quantum gate operations on the input data according to the coding scheme pre-selected by the user in the node configuration or the system default.
[0031] It is evident that this step automates and standardizes the crucial transformation from the classical information world to the quantum information carrier, shielding the complexity of the underlying physical implementation and providing correct and uniformly formatted input quantum states for subsequent quantum algorithm execution.
[0032] S122: Quantum computing nodes perform quantum computing based on quantum state data and output the original quantum computing results; Quantum circuits are circuits composed of a series of basic quantum logic gates acting on qubits, such as Hadamard gates, CNOT gates, and rotation gates, arranged in a specific order, and are used to implement quantum algorithms.
[0033] In this step, the quantum computing node receives quantum state data from the upstream node as the initial input state for the quantum circuit. It then invokes an integrated quantum computing backend to execute a specific quantum circuit defined or associated by the user within that node. This backend can be a local or cloud-based quantum simulator, or it can be real quantum hardware. After the quantum circuit is executed, the raw measurement results are obtained by measuring the qubits, such as measurement count statistics (probability distribution) on each computational ground state, or the expected value obtained through post-processing of the measurement results. For example, executing a quantum circuit for solving a factorization problem might output a series of bit strings and their frequencies.
[0034] As can be seen, by encapsulating complex operations such as quantum hardware scheduling, circuit loading and execution, and preliminary result acquisition within a single node, a unified, transparent, and easy-to-use quantum computing service interface is provided to users, allowing them to obtain quantum computing capabilities without having to worry about the underlying hardware details.
[0035] S123: Semantic interpretation nodes convert the original quantum computing results into interpretable semantic information.
[0036] Interpretable semantic information refers to structured conclusions or labels that can be directly received and processed by downstream classical software systems (such as decision support systems and databases).
[0037] In this step, the semantic interpretation node embeds specific interpretation models or mapping rule sets for different application scenarios. After receiving the raw results output by the quantum computing node, the node will call the corresponding interpretation logic to transform the raw data according to the current task type.
[0038] As can be seen, this step effectively bridges the semantic differences between the underlying, abstract quantum computing results and the higher-level, specific application requirements, enabling the results of quantum computing to support classical decision-making.
[0039] In a preferred embodiment, the process node also includes a classical data preprocessing node; correspondingly, before the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, the execution of the workflow to achieve the target task also includes: the classical data preprocessing node preprocessing the input classical data; wherein, the preprocessing includes data cleaning, missing value handling, normalization, standardization, feature extraction, and any one or a combination of any of the following: converting unstructured data into structured data; correspondingly, the quantum encoding node converting the input classical data into quantum state data using a preset quantum state encoding method includes: the quantum encoding node converting the preprocessed classical data into quantum state data using a preset quantum state encoding method.
[0040] Among them, the classical data preprocessing node is a functional module specifically designed to process, clean, and transform the original input classical data before quantum computing.
[0041] In practice, users can select and combine various preprocessing operators in the configuration interface of the classic data preprocessing node. These operators form a processing pipeline that operates on the data sequentially. For example, for a tabular dataset, the preprocessing pipeline might execute the following steps in sequence: deleting records with too many missing values, filling the remaining missing values with the mean, applying Z-score standardization to eliminate dimensional differences between different features, and finally performing principal component analysis to extract key features and reduce dimensionality. In a specific quantum image processing example, the preprocessing node might execute the following steps: loading the original image, converting it to grayscale, resizing it, and then flattening the pixel matrix into a one-dimensional vector and normalizing it.
[0042] It is evident that classical data preprocessing nodes ensure that the data input to quantum coding nodes is of high quality, noise-free, and in a standardized format, thereby fundamentally guaranteeing the accuracy and stability of subsequent quantum computing and avoiding algorithm failure or result deviation caused by data quality issues.
[0043] As a preferred implementation, the process node also includes a data format bridging node; correspondingly, before the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, the execution of the workflow to achieve the target task also includes: the data format bridging node converts the format or dimension of the classical data input to the quantum encoding node to adapt to the input format or dimension required by the preset quantum state encoding method.
[0044] Among them, the data format bridging node acts as an intelligent adapter in the workflow data pipeline, specifically solving the problem of data format or dimension mismatch between different computing modules.
[0045] In practical implementation, the data format bridging node incorporates various data transformation algorithms, such as reshaping, padding, truncation, interpolation, and dimensionality reduction algorithms like Principal Component Analysis (PCA). It can automatically select and apply the most suitable transformation strategy based on the input format requirements declared by the downstream quantum encoding node. For example, if the downstream amplitude encoding node requires the input vector length to be an integer power of 2 (e.g., 256), while the upstream preprocessing node outputs an eigenvector with a length of 230, the bridging node will automatically perform zero-padding by adding 26 zero values or compress the dimension to 256 using PCA. Another example is that if angle encoding requires the input data to be in the range [0, 2π], while the original data range is [0, 100], the bridging node will automatically perform linear scaling.
[0046] As can be seen, the data format bridging node enables seamless automatic connection between heterogeneous data processing nodes in the workflow. Users do not need to manually write code for complex data alignment and format conversion, which greatly enhances the flexibility of workflow construction and the reusability of modules.
[0047] As a preferred implementation, the process node also includes a parameter optimization iteration node; correspondingly, after the quantum computing node performs quantum computing based on quantum state data and outputs the original quantum computing results, the execution of the workflow to achieve the target task also includes: the parameter optimization node updates the quantum parameters according to the original quantum computing results and feeds back the updated quantum parameters to the quantum computing node.
[0048] The parameter optimization iteration node is connected downstream of the quantum computing node and receives the original quantum computing results output after quantum computing.
[0049] In practice, the parameter optimization iteration node integrates a classical optimizer, such as Stochastic Gradient Descent (SGD) or Adaptive Moment Estimation (Adam). Based on the received results, the optimizer calculates the gradient or update direction of the adjustable parameters (typically the angle of a rotating gate) in the current quantum circuit and generates a new set of quantum parameters. Subsequently, the node automatically transmits this new set of parameters back to the quantum computing node via a feedback link, triggering it to reconfigure and execute the quantum circuit using the new quantum parameters. For example, when training a quantum convolutional neural network for image classification, the classification error obtained after each circuit execution is input into the optimization node, which updates all adjustable parameters in the network accordingly and starts the next round of training.
[0050] As can be seen, the parameter optimization iteration node automates the most time-consuming parameter optimization loop in the quantum-classical hybrid algorithm. Users only need to define the initial circuit and loss function to automatically complete the entire training process, which greatly simplifies the task development and debugging process.
[0051] The task orchestration method provided in this application constructs a workflow containing quantum encoding nodes, quantum computing nodes, and semantic interpretation nodes through a visual orchestration interface, and executes each node sequentially based on this workflow to achieve the target task. This method achieves end-to-end automated execution of quantum-classical hybrid computing tasks by linking the three key stages—quantum encoding, quantum computing execution, and result semantic interpretation—in a node-based and visual manner. Specifically, the quantum encoding node is responsible for converting classical data into quantum state data, the quantum computing node calls the corresponding quantum algorithm to complete the calculation and output the original result, and the semantic interpretation node further converts the original result into understandable semantic information, thus forming a complete task loop. This structured workflow orchestration effectively avoids the inefficiencies and frequent errors caused by fragmented stages and manual connections in traditional development, significantly improving the efficiency and accuracy of quantum-classical hybrid computing task development.
[0052] This application discloses a specific method for achieving a target task by sequentially executing various process nodes based on a workflow. See also... Figure 2 A flowchart illustrating a workflow based on sequentially executing various process nodes to achieve a target task, as shown in an exemplary embodiment, is as follows: Figure 2 As shown, it includes: S221: The classical data preprocessing node preprocesses the input classical data; the preprocessing includes data cleaning, missing value handling, normalization, standardization, feature extraction, and converting unstructured data into any one or a combination of any items in the structured data. In practice, the function of the classical data preprocessing section is to normalize and characterize the various classical data of the original input, so as to provide qualified input for subsequent quantum processing.
[0053] S222: The data format bridging node converts the format or dimension of the preprocessed classical data to adapt to the input format required by the preset quantum state encoding method; In practical implementation, the data format bridging node, as an intelligent adaptation layer in the data processing flow, can dynamically select and apply the most suitable conversion algorithm according to the specific format and dimension requirements declared by the downstream quantum coding node, thus solving the problem of data interface mismatch between upstream and downstream modules.
[0054] S223: The quantum coding node converts the classical data into quantum state data using a preset quantum state coding method; In practice, the quantum coding node performs a physical mapping from classical information carriers to quantum information carriers. This node supports multiple mainstream quantum coding strategies, which users can choose based on data characteristics and computational objectives.
[0055] As a feasible implementation method, the preset quantum state encoding method includes any one or a combination of ground state encoding, amplitude encoding, angle encoding, Hamiltonian encoding, QAOA encoding, error correction encoding, and user-defined encoding.
[0056] Ground-state encoding is suitable for directly mapping discrete integer or enumerated data to the computational ground state, achieving simple and direct storage. For example, classical data 0 is mapped to |0>, and classical data 4 is mapped to |100>. Amplitude encoding can encode high-dimensional vectors into the superposition amplitude of a small number of quantum bits, making full use of the exponential representation capability of quantum states, and is suitable for the dense representation of high-dimensional data. For example, encoding normalized data into a quantum state, x=[3,4], then ||x||2=sqrt(3²+4²)=5, after normalization: [0.6,0.8], encoded with 1 quantum bit (because N=2=2¹): |ψ =0.6|0 +0.8|1 Angle encoding, through a one-to-one correspondence between rotating gate parameters and data values, naturally aligns with the training paradigm of parameterized quantum circuits and is a common choice for variational quantum algorithms. For example, by inputting numerical values into the rotating gate, θ... j =x j ×(π / max_value), the magnitude of the angle is θ. j , θ=x=1.57, cos(1.57 / 2)=cos(0.785)≈0.707, sin(1.57 / 2)=sin(0.785)≈0.707, |ψ =0.707|0 +0.707|1 Hamiltonian encoding directly maps the mathematical description of a problem (such as combinatorial optimization or quantum chemistry) to finding the ground state or low-energy state of a certain Hamiltonian. In other words, it describes the energy as a Hamiltonian matrix, progressively updating the parameters until the expected energy matrix is minimized. For example, in the Traveling Salesman Problem, the constraint that you can only visit one city at a time, and that each city must be visited, serves as a constraint on the matrix used to construct the shortest distance matrix.
[0057] Furthermore, the core objective of QAOA (Quantum Approximate Optimization Algorithm) encoding is to express the solution to the optimization problem. It can use encoding methods such as 1-hot encoding, binary encoding, and direct phase encoding to map candidate solutions to the problem (such as the path in the Traveling Salesman Problem) to the state of qubits, making it easier for quantum circuits to evaluate their cost. The core objective of error correction encoding is to resist noise and perform fault-tolerant computation. It can use encoding methods such as Shor codes, Steane codes, GKP codes, surface codes, and link codes to redundantly encode a logical bit by using the entanglement of multiple physical bits, and to detect and correct errors by measuring the "symptoms". The core objective of user-defined encoding is to implement specific algorithms or communication protocols. It can use encoding methods such as basic encoding, quantum super-dense encoding, and quantum steganography encoding. It is a non-general encoding scheme designed by users for specific purposes (such as efficient communication and information hiding), and has the highest flexibility.
[0058] S224: Quantum computing nodes perform quantum computing based on quantum state data and output the raw results of quantum computing. In practice, the quantum computing node receives encoded quantum state data as the initial state, then loads and runs a user-defined quantum circuit or one selected from an algorithm library. This circuit defines the specific quantum algorithm logic, such as Grover's search, quantum Fourier transform, or variational quantum eigenvalue solver circuits. The node is responsible for communicating with backend computing resources (local simulators, cloud simulators, or real quantum processors), scheduling task execution, and collecting raw computation results.
[0059] As a preferred implementation, during quantum computing on a quantum computing node, executing a workflow to achieve the target task further includes: performing context-aware code completion on the quantum circuits configured in the quantum computing node based on the target version of the quantum computing framework, and / or issuing warnings for illegal operations planned to be performed in the quantum circuits; wherein, illegal operations include at least one or a combination of any of the following: repeatedly measuring the same sequence of qubits, using quantum logic gates not supported by the target hardware platform for performing quantum computing, and constructing quantum circuits whose depth or width exceeds the constraints of the target hardware platform.
[0060] In practical implementation, a specialized training set is constructed for the target version of a specific quantum computing framework (such as SpinQit, Qiskit, or PyTorch). This training set not only includes official code examples, core code implementations, and documentation for that version, but also incorporates constraint hints for common illegal operations. This training set is used to fine-tune a large model of mature open-source code, enabling the model to deeply understand the syntax specifications, API (Application Programming Interface) usage patterns, and compliance boundaries of the target framework version. In practical use, when users develop in the code editing interface of quantum computing nodes, the corresponding fine-tuned model is automatically loaded according to the project configuration. This model provides context-aware intelligent code completion, accurately predicting and recommending functions, parameters, or complete code patterns that may be needed later based on the user's current code input, significantly improving coding efficiency and accuracy. Simultaneously, the model can perform real-time static analysis of the code. When it detects that a planned operation may violate quantum computing rules or platform constraints—for example, detecting repeated measurements of the same set of qubit sequences or the use of specific quantum logic gates not supported by the target hardware platform (such as T-gates not supported by some chips)—it immediately issues a warning in the editor through highlighting, underlining, or pop-ups, clearly indicating the error type and suggested corrections. Furthermore, to ensure the accuracy of the warnings, the hardware platform constraint information used for verification (such as the supported set of quantum gates, maximum line depth and width, and topological connections between qubits) is dynamically updatable. By calling the application programming interface provided by the target hardware platform, it periodically or in real-time obtains the latest physical constraint parameters and automatically updates the internal verification rule base accordingly.
[0061] As can be seen, the above implementation method reduces the development threshold and error risk of quantum programming, enabling developers to build quantum circuits that can run successfully on real quantum hardware more efficiently and reliably, greatly improving the development success rate and code portability.
[0062] S225: Semantic interpretation nodes convert the raw results of quantum computing into interpretable semantic information.
[0063] In practice, the semantic interpretation node receives the raw results from the quantum circuit execution node and triggers the corresponding interpretation logic according to the target task type defined in the workflow.
[0064] As a feasible implementation method, the original quantum computing results are converted into interpretable semantic information, including: if the target task is a classification task, the original quantum computing results are mapped to the probability of a sample belonging to different categories or the similarity between a sample and each category; if the target task is an optimization task, the original quantum computing results are interpreted as the optimization process of the corresponding objective function value or the physical meaning of the optimal solution.
[0065] In practical implementation, for classification tasks, the raw output of quantum circuits might be the measurement probability distribution or amplitude information of quantum states, which lacks intuitive semantic meaning. Semantic interpretation nodes, through specific mapping mechanisms, can transform these quantum state measurement results into probability values of samples belonging to each category, or calculate the similarity measure between the sample feature vector and the center vectors of each category. This allows the output of the quantum model to be directly used for decision-making and result evaluation, just like a classical machine learning model. For example, in a quantum K-nearest neighbor classifier, the node calculates and outputs the quantum similarity score between the sample to be classified and the centers of each training category, converting it into the conclusion that "the sample has an 80% probability of belonging to category A." For optimization tasks, the raw output of quantum circuits might be the energy value or expected value of the objective function under specific parameter configurations. In this case, semantic interpretation nodes restore these numerical changes to the optimization trajectory, demonstrating how the algorithm gradually approaches the global optimum, or assigning specific physical meaning to the optimum solution. For example, in the Traveling Salesman Problem, the output could be a semantic summary such as "The optimization process has converged, and the current optimal path length is 1532 kilometers, which is 18% higher than the initial solution." Furthermore, the bit string representing the path can be decoded into a specific list of city visit orders.
[0066] Therefore, this embodiment, through visual workflow orchestration, modularizes and graphically connects multiple stages such as complex quantum algorithm development, data processing, encoding conversion, execution optimization, and result interpretation, significantly lowering the development threshold and enabling developers without a quantum computing background to quickly build and iterate hybrid computing applications. Simultaneously, its integrated context-aware intelligent code completion function and illegal operation warning mechanism provide precise development assistance and compliance verification based on specific framework versions and real-time hardware constraints, improving coding efficiency and program reliability.
[0067] The following describes an application embodiment provided by this application, such as... Figure 3 The image shows an intelligent programming system that supports the entire development and visual workflow orchestration of quantum-classical hybrid computing. It includes a visual hybrid computing workflow orchestration module, a quantum-classical hybrid intelligent programming assistance module, a classical-quantum data automatic bridging module, a quantum computing execution and compliance verification module, and a quantum result interpretability and semantic output module.
[0068] Visualized hybrid computing workflow orchestration module: Supports users to visually construct an end-to-end workflow of "classical preprocessing → quantum encoding → quantum circuit → measurement postprocessing (optional parameter iterative optimization) → semantic interpretation" using lightweight modules.
[0069] Classical preprocessing: Since quantum circuits can only process numerical values, numerical conversion is required before quantum state encoding based on different data types; Unstructured data: Keyword extraction for text types; Conversion of text types to numerical types; Conversion of images, audio, and video into matrices; Structured data: Cleaning duplicate data, deleting / filling records with missing data, and performing mathematical transformations by column, such as standardization and normalization.
[0070] Quantum-classical hybrid intelligent programming assistance module: Based on quantum semantic understanding, it provides code auto-completion for specific frameworks (SpinQit, Qiskit, PyTorch), framework API hints, and illegal operation warnings (such as repeated measurements, unsupported gates), improving development efficiency.
[0071] Classical-Quantum Automatic Data Bridging Module: Automatically converts classical data (such as structured and unstructured data like images, tables, temperatures, and spatiotemporal data) into quantum-coded inputs.
[0072] Quantum computing execution and compliance verification module: Securely schedules the execution of quantum circuits, verifies platform constraints (such as device connectivity and legal gate sets), prevents runtime errors, and supports iterative optimization of optional parameters during execution.
[0073] The quantum result interpretability and semantic output module transforms raw measurement results (probability distribution, expected value, etc.) into interpretable semantic information, supporting downstream classical tasks such as classification and optimization.
[0074] The following describes a task flow arrangement device provided in an embodiment of this application. The task flow arrangement device described below and the task flow arrangement method described above can be referred to each other.
[0075] See Figure 4 A structural diagram of a task flow orchestration apparatus is shown according to an exemplary embodiment, such as... Figure 4 As shown, it includes: The construction unit 100 is used to construct a workflow for a target task through a visual orchestration interface; wherein, the workflow includes multiple process nodes organized by directed connections and data input / output relationships between process nodes, and the process nodes include at least quantum coding nodes, quantum computing nodes and semantic interpretation nodes; Execution unit 200 is configured to execute the workflow in response to a workflow execution instruction to achieve the target task; The execution unit is at least used for: converting input classical data into quantum state data by the quantum encoding node using a preset quantum state encoding method; performing quantum computing based on the quantum state data by the quantum computing node and outputting the original quantum computing result; and converting the original quantum computing result into interpretable semantic information by the semantic interpretation node.
[0076] The task orchestration apparatus provided in this application constructs a workflow comprising quantum encoding nodes, quantum computing nodes, and semantic interpretation nodes through a visual orchestration interface, and executes each node sequentially based on this workflow to achieve the target task. This method achieves end-to-end automated execution of quantum-classical hybrid computing tasks by linking the three key stages—quantum encoding, quantum computing execution, and result semantic interpretation—in a node-based and visualized manner. Specifically, the quantum encoding node is responsible for converting classical data into quantum state data, the quantum computing node calls the corresponding quantum algorithm to complete the calculation and output the original result, and the semantic interpretation node further converts the original result into understandable semantic information, thus forming a complete task loop. This structured workflow orchestration effectively avoids the inefficiencies and frequent errors caused by fragmented stages and manual connections in traditional development, significantly improving the efficiency and accuracy of quantum-classical hybrid computing task development.
[0077] Based on the above embodiments, as a preferred implementation, the process node also includes a classic data preprocessing node; Correspondingly, the execution unit is also used to: preprocess the input classical data by the classical data preprocessing node; wherein, the preprocessing includes data cleaning, missing value handling, normalization, standardization, feature extraction, and converting unstructured data into any one or a combination of any number of items in structured data; Accordingly, the execution unit is specifically used to convert preprocessed classical data into quantum state data by the quantum coding node using a preset quantum state coding method.
[0078] Based on the above embodiments, as a preferred implementation, the process node further includes a data format bridging node; Correspondingly, the execution unit is also used to: convert the format or dimension of classical data input to the quantum coding node by the data format bridging node, so as to adapt to the input format or dimension required by the preset quantum state coding method.
[0079] Based on the above embodiments, as a preferred implementation, the preset quantum state encoding method includes any one or a combination of ground state encoding, amplitude encoding, angle encoding, and Hamiltonian encoding.
[0080] Based on the above embodiments, as a preferred implementation, the execution unit is further configured to: perform context-aware code completion on the quantum circuits configured in the quantum computing node based on the target version of the quantum computing framework, and / or issue a warning for illegal operations planned to be executed in the quantum circuits; wherein, illegal operations include at least one or a combination of any of the following: repeatedly measuring the same sequence of qubits, using quantum logic gates that are not supported by the target hardware platform for performing quantum computing, and constructing quantum circuits whose depth or width exceeds the constraints of the target hardware platform.
[0081] Based on the above embodiments, as a preferred implementation, the process node also includes a parameter optimization iteration node; Correspondingly, the execution unit is also used to: update the quantum parameters by the parameter optimization node based on the original quantum computing results, and feed back the updated quantum parameters to the quantum computing node.
[0082] Based on the above embodiments, as a preferred implementation, the execution unit is specifically used to: if the target task is a classification task, map the original quantum computing result to the probability that the sample belongs to different categories or the similarity between the sample and each category; if the target task is an optimization task, interpret the original quantum computing result to the optimization process of the corresponding objective function value or the physical meaning of the optimal solution.
[0083] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0084] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device. Figure 5 This is a structural diagram of an electronic device according to an exemplary embodiment, such as... Figure 5 As shown, the electronic device includes: Communication interface 1 enables information exchange with other devices, such as network devices; Processor 2 is connected to communication interface 1 to enable information interaction with other devices and to execute the task flow arrangement method provided by one or more of the above-mentioned technical solutions when running computer programs. The computer program is stored in memory 3.
[0085] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 The general will label all buses as Bus System 4.
[0086] The memory 3 in this embodiment is used to store various types of data to support the operation of the electronic device. Examples of such data include any computer program used to operate on the electronic device.
[0087] It is understood that memory 3 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 3 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0088] The methods disclosed in the embodiments of this application can be applied to processor 2, or implemented by processor 2. Processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 2 or by instructions in the form of software. The processor 2 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 3. Processor 2 reads the program in memory 3 and completes the steps of the aforementioned method in combination with its hardware.
[0089] When processor 2 executes the program, it implements the corresponding processes in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.
[0090] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 that stores a computer program, which can be executed by a processor 2 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0091] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0092] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0093] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A task flow orchestration method, characterized in that, include: A workflow for a target task is constructed through a visual orchestration interface; wherein, the workflow includes multiple process nodes organized by directed connections and the data input and output relationships between process nodes, and the process nodes include at least quantum coding nodes, quantum computing nodes and semantic interpretation nodes; In response to a workflow execution instruction, the workflow is executed to achieve the target task; The execution of the workflow to achieve the target task includes at least the following: the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method; the quantum computing node performs quantum computing based on the quantum state data and outputs the original quantum computing result; and the semantic interpretation node converts the original quantum computing result into interpretable semantic information.
2. The task flow arrangement method according to claim 1, characterized in that, The process nodes also include classic data preprocessing nodes; Accordingly, before the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, the execution of the workflow to achieve the target task further includes: The classic data preprocessing node preprocesses the input classic data; wherein, the preprocessing includes data cleaning, missing value handling, normalization, standardization, feature extraction, and converting unstructured data into any one or a combination of any number of items in structured data; Accordingly, the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, including: The quantum coding node uses a preset quantum state coding method to convert the preprocessed classical data into quantum state data.
3. The task flow arrangement method according to claim 1, characterized in that, The process node also includes a data format bridging node; Accordingly, before the quantum encoding node converts the input classical data into quantum state data using a preset quantum state encoding method, the execution of the workflow to achieve the target task further includes: The data format bridging node converts the format or dimension of the classical data input to the quantum encoding node to adapt to the input format or dimension required by the preset quantum state encoding method.
4. The task flow arrangement method according to claim 1, characterized in that, The preset quantum state encoding method includes any one or a combination of several of the following: ground state encoding, amplitude encoding, angle encoding, Hamiltonian encoding, QAOA encoding, error correction encoding, and user-defined encoding.
5. The task flow arrangement method according to claim 1, characterized in that, During quantum computing at the quantum computing node, executing the workflow to achieve the target task further includes: Context-aware code completion is performed on the quantum circuits configured in the quantum computing node based on the target version of the quantum computing framework. And / or, provide warnings for illegal operations planned to be performed in the quantum circuit; wherein the illegal operations include at least one or a combination of any of the following: repeatedly measuring the same sequence of qubits, using a quantum logic gate that is not supported by the target hardware platform performing the quantum computing, or constructing a quantum circuit whose depth or width exceeds the constraints of the target hardware platform.
6. The task flow arrangement method according to claim 1, characterized in that, The process nodes also include parameter optimization iteration nodes; Accordingly, after the quantum computing node performs quantum computation based on the quantum state data and outputs the raw quantum computation result, the execution of the workflow to achieve the target task further includes: The parameter optimization node updates the quantum parameters based on the original quantum computing results and feeds the updated quantum parameters back to the quantum computing node.
7. The task flow arrangement method according to claim 1, characterized in that, Converting the raw results of the quantum computing into interpretable semantic information includes: If the target task is a classification task, then the original quantum computing result is mapped to the probability of a sample belonging to different categories or the similarity between the sample and each category. If the target task is an optimization task, then the original result of the quantum computing is interpreted as the optimization process of the corresponding objective function value or the physical meaning of the optimal solution.
8. A task flow orchestration device, characterized in that, include: A building unit is used to build a workflow for a target task through a visual orchestration interface; wherein, the workflow includes multiple process nodes organized by directed connections and the data input and output relationships between process nodes, and the process nodes include at least quantum coding nodes, quantum computing nodes and semantic interpretation nodes; An execution unit is configured to execute the workflow in response to a workflow execution instruction to achieve the target task; The execution unit is at least used for: converting input classical data into quantum state data by the quantum encoding node using a preset quantum state encoding method; performing quantum computing based on the quantum state data by the quantum computing node and outputting the original quantum computing result; and converting the original quantum computing result into interpretable semantic information by the semantic interpretation node.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the task flow orchestration method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the steps of the task flow orchestration method as described in any one of claims 1 to 7.