Hybrid quantum-classical computing combines classical processing with quantum subroutines and subsequent classical processing. The classical and quantum code are tightly coupled, with each part assigned tasks suited to its capabilities. section 1.3.4 section 7.0
A typical hybrid program follows this workflow:
- Perform classical preprocessing: obtain the problem description and convert it into the input format required by the quantum subroutine. section 7.0
- Run the quantum computation for the portion that may be inefficient on a classical computer. section 7.0
- Apply classical postprocessing to convert measured results into the final solution or determine whether further calculations are needed. section 7.0
- Test the coupled implementation with unit or end-to-end tests, using simulators to inspect quantum states on small instances. section 1.3.4 section 6.0
- Estimate resources and compare performance with the best classical algorithm before claiming practical advantage. section 1.3.4 section 6.0
Search and factorization
A Boolean satisfiability solver can preprocess a Boolean expression, use a quantum search subroutine, and postprocess its results into a satisfying assignment. In Shor’s algorithm, the quantum part finds a period, while classical processing obtains the integer factors. section 7.0 section 6.0
Figure 7.2 A quantum algorithm can combine classical and quantum computations. Typically, it starts with a classical data preprocessing step that prepares input data for the quantum computation and passes it to the quantum subroutine. The results of the quantum computation are then fed into another classical step, postprocessing, that converts them into the final problem solution. Some of these steps can be omitted for simple algorithms or repeated with some variation for iterative algorithms.
Use the workflow diagram to trace data from classical preprocessing through the quantum subroutine into classical postprocessing, including omitted or repeated stages. section 7.0
