Search

US-12619902-B2 - System and method for identifying and rectifying application program interface errors using quantum computing

US12619902B2US 12619902 B2US12619902 B2US 12619902B2US-12619902-B2

Abstract

A method includes analyzing codes of a plurality of applications. Errors in the codes of the plurality of applications are identified based on a plurality of rules. An initial quantum state is generated and one or more iterations are performed on the initial quantum state to determine a final quantum state. Performing an iteration of the one or more iterations includes applying an oracle operator and a diffusion operator to the current quantum state. Based on the final quantum state, one or more APIs of the plurality of applications that correspond to the errors are determined. A first application corresponding to a first API of the one or more APIs is identified. A first code fix for a first code of the first application is determined. The first code fix is applied to the first code of the first application to determine a first fixed code of the first application.

Inventors

  • Kalyan Chakravarthy Pallapolu
  • Gondi Mahesh
  • Gali Mohan Sreenivas

Assignees

  • BANK OF AMERICA CORPORATION

Dates

Publication Date
20260505
Application Date
20240129

Claims (20)

  1. 1 . A system comprising: a memory configured to store: a quantum search algorithm; and a plurality of rules, wherein the plurality of rules are used to identify application programming interface (API) errors; a classical processor communicatively coupled to the memory, wherein the classical processor is configured to: analyze codes of a plurality of applications, wherein the plurality of applications are configured to be deployed to a plurality of computing systems; identify first errors in the codes of the plurality of applications based on the plurality of rules; receive, from a quantum processor, one or more APIs of the plurality of applications that correspond to the first errors; identify a first application of the plurality of application corresponding to a first API of the one or more APIs, wherein the first application is configured to be deployed to a first computing system of the plurality of computing systems; determine a first code fix for a first code of the first application; and apply the first code fix to the first code of the first application to determine a first fixed code of the first application; and the quantum processor communicatively coupled to the memory, wherein the quantum processor, when implementing the quantum search algorithm, is configured to: initialize a first plurality of qubits; generate a first initial quantum state based on the first plurality of qubits; perform one or more first iterations on the first initial quantum state to determine a first final quantum state, wherein performing an iteration of the one or more first iterations comprises: applying a first oracle operator to a first current quantum state; and applying a first diffusion operator to the first current quantum state; and determine, based on the first final quantum state, the one or more APIs of the plurality of applications that correspond to the first errors.
  2. 2 . The system of claim 1 , wherein the classical processor is further configured to: deploy the first fixed code of the first application to a test computing system; analyze the first application; determine whether first run-time errors are identified for the first application; and in response to determining that no first run-time errors are identified, deploy the first fixed code of the first application to the first computing system.
  3. 3 . The system of claim 2 , wherein: the classical processor is further configured to, in response to determining that the first run-time errors are identified: receive, from the quantum processor, one or more APIs of the first application that correspond to the first run-time errors; determine a second code fix for the first fixed code of the first application; and apply the second code fix to the first fixed code of the first application to determine a second fixed code of the first application; and the quantum processor is further configured to, in response to determining that the first run-time errors are identified: initialize a second plurality of qubits; generate a second initial quantum state based on the second plurality of qubits; perform one or more second iterations on the second initial quantum state to determine a second final quantum state, wherein performing an iteration of the one or more second iterations comprises: applying a second oracle operator to a second current quantum state; and applying a second diffusion operator to the second current quantum state; and determine, based on the second final quantum state, the one or more APIs of the first application that correspond to the first run-time errors.
  4. 4 . The system of claim 3 , wherein the classical processor is further configured to: deploy the second fixed code of the first application to the test computing system; analyze the first application; determine whether second run-time errors are identified for the first application; and in response to determining that no second run-time errors are identified, deploy the second fixed code of the first application to the first computing system.
  5. 5 . The system of claim 1 , wherein the first oracle operator comprises a Pauli X gate.
  6. 6 . The system of claim 1 , wherein generating the first initial quantum state based on the first plurality of qubits comprises applying a Hadamard operator to the first plurality of qubits.
  7. 7 . The system of claim 1 , wherein determining, based on the first final quantum state, the one or more APIs of the plurality of applications that correspond to the first errors comprises measuring the first final quantum state.
  8. 8 . A method comprising: analyzing codes of a plurality of applications, wherein the plurality of applications are configured to be deployed to a plurality of computing systems; identifying first errors in the codes of the plurality of applications based on a plurality of rules, wherein the plurality of rules are used to identify application programming interface (API) errors in the codes of the plurality of applications; initializing a first plurality of qubits; generating a first initial quantum state based on the first plurality of qubits; performing one or more first iterations on the first initial quantum state to determine a first final quantum state, wherein performing an iteration of the one or more first iteration comprises: applying a first oracle operator to a first current quantum state; and applying a first diffusion operator to the first current quantum state; determining, based on the first final quantum state, one or more APIs of the plurality of applications that correspond to the first errors; identifying a first application of the plurality of applications corresponding to a first API of the one or more APIs, wherein the first application is configured to be deployed to a first computing system of the plurality of computing systems; determining a first code fix for a first code of the first application; and applying the first code fix to the first code of the first application to determine a first fixed code of the first application.
  9. 9 . The method of claim 8 , further comprising: deploying the first fixed code of the first application to a test computing system; analyzing the first application; determining whether first run-time errors are identified for the first application; and in response to determining that no first run-time errors are identified, deploying the first fixed code of the first application to the first computing system.
  10. 10 . The method of claim 9 , further comprising, in response to determining that the first run-time errors are identified: initializing a second plurality of qubits; generating a second initial quantum state based on the second plurality of qubits; performing one or more second iterations on the second initial quantum state to determine a second final quantum state, wherein performing an iteration of the one or more second iterations comprises: applying a second oracle operator to a second current quantum state; and applying a second diffusion operator to the second current quantum state; determining, based on the second final quantum state, the one or more APIs of the first application that correspond to the first run-time errors; determining a second code fix for the first fixed code of the first application; and applying the second code fix to the first fixed code of the first application to determine a second fixed code of the first application.
  11. 11 . The method of claim 10 , further comprising: deploying the second fixed code of the first application to the test computing system; analyzing the first application; determining whether second run-time errors are identified for the first application; and in response to determining that no second run-time errors are identified, deploying the second fixed code of the first application to the first computing system.
  12. 12 . The method of claim 8 , wherein the first oracle operator comprises a Pauli X gate.
  13. 13 . The method of claim 8 , wherein generating the first initial quantum state based on the first plurality of qubits comprises applying a Hadamard operator to the first plurality of qubits.
  14. 14 . The method of claim 8 , wherein determining, based on the first final quantum state, the one or more APIs of the plurality of applications that correspond to the first errors comprises measuring the first final quantum state.
  15. 15 . A non-transitory computer-readable medium storing instructions that, when executed by at least one of a classical processor or a quantum processor, cause the at least one of the classical processor or the quantum processor to: analyze codes of a plurality of applications, wherein the plurality of applications are configured to be deployed to a plurality of computing systems; identify first errors in the codes of the plurality of applications based on a plurality of rules, wherein the plurality of rules are used to identify application programming interface (API) errors in the codes of the plurality of applications; initialize a first plurality of qubits; generate a first initial quantum state based on the first plurality of qubits; perform one or more first iterations on the first initial quantum state to determine a first final quantum state, wherein performing an iteration of the one or more first iterations comprises: applying a first oracle operator to a first current quantum state; and applying a first diffusion operator to the first current quantum state; determine, based on the first final quantum state, one or more APIs of the plurality of applications that correspond to the first errors; identify a first application of the plurality of applications corresponding to a first API of the one or more APIs, wherein the first application is configured to be deployed to a first computing system of the plurality of computing systems; determine a first code fix for a first code of the first application; and apply the first code fix to the first code of the first application to determine a first fixed code of the first application.
  16. 16 . The non-transitory computer-readable medium of claim 15 , wherein the instructions, when executed by the at least one of the classical processor or the quantum processor, further cause the at least one of the classical processor or the quantum processor to: deploy the first fixed code of the first application to a test computing system; analyze the first application; determine whether first run-time errors are identified for the first application; and in response to determining that no first run-time errors are identified, deploy the first fixed code of the first application to the first computing system.
  17. 17 . The non-transitory computer-readable medium of claim 16 , wherein the instructions, when executed by the at least one of the classical processor or the quantum processor, further cause the at least one of the classical processor or the quantum processor to, in response to determining that the first run-time errors are identified: initialize a second plurality of qubits; generate a second initial quantum state based on the second plurality of qubits; perform one or more second iterations on the second initial quantum state to determine a second final quantum state, wherein performing an iteration of the one or more second iterations comprises: applying a second oracle operator to a second current quantum state; and applying a second diffusion operator to the second current quantum state; determine, based on the second final quantum state, the one or more APIs of the first application that correspond to the first run-time errors; determine a second code fix for the first fixed code of the first application; and apply the second code fix to the first fixed code of the first application to determine a second fixed code of the first application.
  18. 18 . The non-transitory computer-readable medium of claim 17 , wherein the instructions, when executed by the at least one of the classical processor or the quantum processor, further cause the at least one of the classical processor or the quantum processor to: deploy the second fixed code of the first application to the test computing system; analyze the first application; determine whether second run-time errors are identified for the first application; and in response to determining that no second run-time errors are identified, deploy the second fixed code of the first application to the first computing system.
  19. 19 . The non-transitory computer-readable medium of claim 15 , wherein the first oracle operator comprises a Pauli X gate.
  20. 20 . The non-transitory computer-readable medium of claim 15 , wherein generating the first initial quantum state based on the first plurality of qubits comprises applying a Hadamard operator to the first plurality of qubits.

Description

TECHNICAL FIELD The present disclosure relates generally to code review and deployment, and more specifically to a system and method for identifying and rectifying application program interface errors using quantum computing. BACKGROUND Cloud computing systems include a plurality of computing systems, each of which hosts a plurality of applications. When new versions of the applications are to be deployed to a cloud computing system, one computing system and/or one application is analyzed at a time. Furthermore, code reviews for application programming interfaces (APIs) of the new versions of applications are done manually. Due to these limitations, turn-around time (TAT) of deployment for the new versions of the applications is delayed. SUMMARY The system described in the present disclosure provides several practical applications and technical advantages that overcome the current technical problems with code review and deployment. In general, a system for identifying and rectifying application programming interface (API) errors includes a code review system operably coupled to a cloud computing system including a plurality of service provider systems and a test computing system via a network. Each service provider system is configured to host a plurality of applications. The code review system includes a classical processor and a quantum processor operably coupled to a memory. The memory is configured to store a plurality of rules for identifying errors in to be deployed codes of the applications and one or more quantum search algorithms, such as Grover's algorithm, for example. In operation, the code review system receives a plurality of application codes. In certain embodiments, the plurality of application codes are application codes that are to be deployed to the service provider systems of the cloud computing system. The code review system analyzes the plurality of application codes and identifies errors in the plurality of application codes based on rules. The code review system implements a quantum algorithm (e.g., Grover's search algorithm) to determine APIs that correspond to the errors. The code review system initializes qubits and applies the Hadamard operator to the qubits to generate an initial quantum state. The code review system applies an oracle operator and a diffusion operator to the current quantum state. The code review system determines if the oracle and diffusion operators are applied to the initial quantum state for a threshold number of times. In certain embodiments, the oracle and diffusion operators are applied to the initial quantum state one or more times until the oracle and diffusion operators are applied to the initial quantum state for the threshold number of times. In response to determining that the oracle and diffusion operators are applied to the initial quantum state for the threshold number of times, the code review system identifies the current quantum state as a final quantum state and measures the final quantum state to determine the APIs that correspond to the errors. The code review system identifies an application code corresponding to each API and determines a code fix corresponding to each identifies application code. The code review system applies code fixes to the identified application codes to generate fixed application codes. The code review system deploys the fixed application codes to a test system. The code review system analyzes the fixed application codes and determines if run-time errors are identified. In certain embodiments, the above-described operations may be repeated one or more times until the run-time errors are not identified. In response to determining that the run-time errors are not identified, the code review system deploys the fixed application codes to the service provider systems of the cloud computing system. The system for identifying and rectifying application programming interface errors allows for an efficient code review for a plurality of applications hosted by a plurality of service provider systems of a cloud computing system. By using a quantum processor implementing a quantum search algorithm (e.g., Grover's search algorithm), speed of the code review process is increased due to quantum parallelism compared to classical algorithms executed by classical processors. This in turn reduces the overall turn-around time of deployment (TAT). Furthermore, by using quantum processors instead of classical processors, computing resources (e.g., memory, network bandwidth, etc.) that would be otherwise consumed by using the classical processors may be saved and used for other applications. Accordingly, the following disclosure is particularly integrated into practical applications of: (1) improving efficiency of a code review process; (2) improving speed of the code review process by using quantum processors that implement quantum algorithms; and (3) improving utilization of computing resources by using quantum processors instead of cla