The quantum learning method according 18, wherein the method is configured to train the quantum circuit to approximate a solution to one or more differential equations, DEs, and wherein variationally optimizing the quantum circuit includes solving one or more differential equations, DEs, using a data processing system comprising a classical computer system and a quantum computer system, the method comprising:
- receiving or determining, by the classical computer system, a formulation of quantum circuits representing a trial function for the one or more DEs, the trial function being associated with one or more variables and a variable space, the quantum circuits including one or more function circuits for determining one or more values of the trial function around one or more points in the variable space, one or more derivative function circuits for determining one or more values of an derivative of the trial function around the one or more points and one or more quantum variational circuits associated with one or more optimization parameters;
- executing, the classical computer system, the quantum circuits for a set of points in the variable space of the trial function, wherein the execution of the quantum circuits includes:
- translating the quantum circuit into control signals for controlling quantum elements of the quantum computer system and for readout of the quantum elements to obtain and measurement data and controlling the quantum computer system based on the control signals;
- receiving, by the classical computer system, in response to the execution of the quantum circuits, the hardware measurement data and processing the hardware measurement data into one or more trial functions and one or more derivatives of the one or more trial functions;
- determining, by the classical computer system, on the basis of the one or more trial functions, the one or more derivatives of the one or more trial functions and a loss function, a score indicating how well the one or more measured trial functions satisfy the one or more DEs;
- and,
- optimizing the loss function, the optimization including adjusting the one or more optimization parameters and repeating the execution of the quantum circuits, the processing of the hardware measurement data and the determination of a score, until the score meets a predetermined optimization condition.