Solving computational problems using trainable quantum feature maps

By using trainable quantum feature maps that dynamically optimize eigenfrequencies, the limitations of fixed feature encoding in quantum machine learning models are overcome, resulting in improved accuracy and efficiency in solving complex computational problems.

WO2025017173A1PCT designated stage expired Publication Date: 2025-01-23PASQAL SAS

Patent Information

Application Number
PCT/EP2024/070524
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-19
Filing Date
2024-07-19
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

Existing quantum machine learning models face challenges in accurately solving complex computational problems like differential equations due to fixed feature encoding architectures, which limit the representation space and require prior knowledge of optimal encoding configurations.

Method used

The introduction of trainable quantum feature maps, where a set of trainable parameters acts directly on the generator Hamiltonian, allows for the dynamic tuning of feature maps during training, optimizing eigenfrequencies and improving the model's ability to approximate solutions to complex problems.

Benefits of technology

This approach enables quantum models to learn optimal basis functions and spectral properties, leading to more accurate and efficient solutions for computational problems like differential equations, without increasing the depth of quantum circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024070524_23012025_PF_FP_ABST
    Figure EP2024070524_23012025_PF_FP_ABST
Patent Text Reader

Abstract

A method and system for solving a computational problem using a hybrid data processor comprising a classical computer and quantum computer the method comprising receiving or determining information on one or more quantum circuits defining operations of a parameterized quantum model of a target function, the target function representing an approximate solution to the computational problem, preferably one or more differential equations and one or more associated boundary conditions, the one or more quantum circuits comprising one or more quantum feature maps for encoding one or more classical input features associated with the target function into the Hilbert space of the quantum register, wherein the one or more feature maps include one or more unitary operators defining a time evolution over a Hamiltonian, preferably a generator Hamiltonian, applied to quantum elements of the quantum register, the Hamiltonian evolution being parameterized by a first set of variational parameters and the one or more classical input features; and, determining the target function based on the parameterized quantum model and a loss function associated with the computational problem, the determining including varying the first set of variational parameters to determine a set of eigenfrequencies of the Hamiltonian which is optimized for the computational problem, the set of eigenfrequencies defining quantum modes, which the parameterized quantum.
Need to check novelty before this filing date? Find Prior Art

Description

[0001]Solving computational problems using trainable quantum feature maps Technical field The disclosure relates to trainable quantum feature maps, and in particular, though not exclusively, to methods and systems solving computational problems using trainable quantum feature maps, and a computer program product for executing such methods. Background The use of parameterised quantum circuits as quantum machine learning (QML) models is a promising approach to solving relevant problems in machine learning with today’s quantum computers. For example, Kyriienko et al describe in their article Solving nonlinear differential equations with differentiable quantum circuits, Phys. Rev. A 103, 052416 (2021), QML models which can be trained to model functions that are solutions to sets of (non)linear differential equations wherein quantum feature maps are used to encode function variables into the Hilbert space associated with a quantum register. Similarly, Paine et al, describe in their article Quantum Quantile Mechanics: Solving Stochastic Differential Equations for Generating Time-Series QML models which can be trained to solve stochastic differential equations, which play an important role in a broad range of applications including molecular dynamics, fluid dynamic and biology. These trainable quantum models use quantum circuits that include a data encoding block, also referred to as a quantum feature map, which encodes input features into the Hilbert space of the quantum register, and a trainable block , e.g. a variational ansatz, containing trainable parameters. Based on a variational optimization scheme a quantum model may be trained to approximate a target function. An important application of such trainable quantum models is solving complex computational problems such as differential equations or graph problems. In conventional QML models, the architecture and configuration of the feature encoding is set beforehand and fixed for the course of training. Importantly, the specific form of the feature encoding determines the space of possible solutions the model can represent. Hence, the choice of feature encoding is very influential for the practical performance of quantum models in terms of accuracy and trainability. Despite this, in many cases it is hard or not possible to a priori determine what the best feature encoding would be for a particular problem, which may require knowing the solution to begin with. In these cases a generic configuration is used, limiting what solution functions can be approximated efficiently. Techniques such as non-linear encoding functions, data re-uploading and serial quantum feature maps are used to improve the practical performance of quantum models so solve a computational problem. For example, Manuel, et al. "Optimizing Quantum Classification Algorithms on Classical Benchmark Datasets." Entropy 25.6 (2023): 860 and Gentinetta, Gian, et al. "Quantum Kernel Alignment with Stochastic Gradient Descent." arXiv:2304.09899 (2023) describe the application of gates with trainable parameters on data already encoded into the Hilbert space. Simiarly, Perez-Salinas et al described in their article “Data re-uploading for a universal quantum classifier”, Quantum 4, 226 (2020) a scheme for encoding data in the Hilbert space using data re-uploading. In practice however these approaches only provide limited improvement, while the depth of the quantum circuits increase considerably. Hence, there is a need in the art for improved quantum models that provides accurate estimates of solutions to complex computation problems without substantially increasing of the depth of the quantum circuits defining a quantum model. Summary As will be appreciated by one skilled in the art, aspects of the present embodiments may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a "circuit," "module" or "system." Functions described in this disclosure may be implemented as an algorithm executed by processors of a hybrid computer comprising a classical computer and a quantum computer. Furthermore, aspects of the present embodiments may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied, e.g., stored, thereon. Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber, cable, RF, etc., or any suitable combination of the foregoing. Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object- oriented programming language such as Java(TM), Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). Aspects of the present invention are described below with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor, in particular a microprocessor or central processing unit (CPU), of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer, other programmable data processing apparatus, or other devices create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks. The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. Additionally, the Instructions may be executed by any type of processors, including but not limited to one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FP- GAs), or other equivalent integrated or discrete logic circuitry. The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In an aspect, the embodiments may relate of a method for for solving a computational problem using a hybrid data processor comprising a classical computer and quantum computer. In an embodiment, the method may include receiving or determining information on one or more quantum circuits defining operations of a parameterized quantum model of a target function, the target function representing an approximate solution to the computational problem, the one or more quantum circuits comprising one or more quantum feature maps for encoding one or more classical input features associated with the target function into the Hilbert space of the quantum register, wherein the one or more feature maps include one or more unitary operators defining a time evolution over a Hamiltonian applied to quantum elements of the quantum register, the Hamiltonian evolution being parameterized by a first set of variational parameters and at least part of the one or more classical input features. In an embodiment, the method may include determining the target function based on the parameterized quantum model and a loss function associated with the computational problem, the determining including varying the first set of variational parameters to determine a set of eigenfrequencies of the Hamiltonian which is optimized for the computational problem, the set of eigenfrequencies defining quantum modes, which the parameterized quantum model can use to determine the target function. In an embodiment, the computational problem may include one or more differential equations and one or more associated boundary conditions. In an embodment, the Hamiltonin may be generator Hamiltonian. In an embodiment, the first set of variational parameters my directly act on the Hamiltonian of the one or more unitary operations. In an embodiment, the first set of variational parameters may directly act on terms of the Hamiltonian, such as the Pauli operators, of the one or more unitary operators. In an embodment, the varying of the first set of variational parameters may include: translating the operations of the one or more quantum circuits into control signals for controlling and reading out of the quantum elements; applying the operations to the quantum elements based on the control signals; determining classical measurement data by measuring the state of the quantum elements of the quantum register; determining a target function based on the classical measurement data; using the loss function to compute a loss value based on the target function and adjusting the first set of variational parameters based on the loss value. In an embodiment, the method may further comprise repeating the varying of the first set of variational parameters and the determining of a target function based on the classical measurement data until the computed loss value indicates that the target function matches or approximates a solution to the computational problem or until one or more other exit conditions are met. The output of variational quantum models can be represented as a Fourier series in the input features of the quantum model. For example if the model has an input feature ^, the Fourier series is in terms of frequencies of ^. In quantum models based on a quantum feature map and a variational ansatz, frequencies of the Fourier series are uniquely determined by the eigenvalues of the so-called generator Hamiltonian of the feature map, while the Fourier coefficients are tuned based on the variational parameters of the ansatz. The inventors realized that for conventional quantum models these frequencies are fixed throughout training. In theory this is not a problem, since the spectrum of an infinitely large quantum model forms a universal orthogonal basis set which can accurately approximating any intricate function. Yet in reality, practically sized quantum computers will only permit quantum models with a finite number of frequencies. Thus, it is in this real-life regime that great importance should be given to the choice of basis functions, which may not be the orthogonal convention. To address this problem, the embodiments in this disclosure, define quantum models which comprise a set of trainable parameters ^^^into the generator Hamiltonian of the feature map thereby defining a trainable feature map (TFM). Importantly, it can be shown that the addition of these trainable parameters lead to a quantum model with eigenfrequencies that are not fixed, but are themselves also trainable. This circumvents the issue of knowing the optimal basis functions a priori, without relying on the orthogonal convention. The use of trainable feature maps as described with reference to the embodiments has a significant impact on the effectiveness of quantum models, allowing the learning of generator Hamiltonians with desirable spectral properties for the task at hand. Quantum neural networks (QNNs) comprising TFMs can learn basis functions that are inaccessible to efficient fixed feature maps (FFM) QNN architectures. Furthermore, even when the optimal choice of basis functions are in fact orthogonal as convention, TFMs have a practical advantage in choosing the correct number of frequencies. The practical effectiveness of TFMs is illustrated by solving the Navier-Stokes equations to higher accuracy with a simple linear parameterisation of each FM qubit. In an embodiment, the one or more quantum circuit further comprises one or more variational quantum circuits, for example one or more ansatze, wherein the one or more variational quantum circuits are parameterized by a second set of variational parameters but not parameteterized with the one or more classical input features and wherein determining the target function further includes varying the the second variational parameters to determine the contribution of each of the quantum modes to the target solution. In an embodiment, at least part of the first and second variational parameters may be adjusted using the same classical optimizer, preferably using a gradient-based optimizer. In another embodiment, at least part of the first and second variational parameters are adjusted using different classical optimizers In an embodiment, determining the target function may further include: initializing the first set of variational parameters based on the index of the quantum elements the feature map applies to create an initial set of eigenvalues of the Hamiltonian. In an embodiment, the loss function may include a distance metric for evaluating the estimated target function. In an embodiment, the computational problem includes one or more differential equations. In that case, one or more derivatives of the target function may be determined based on automatic differentiation of the quantum model, preferably using quantum circuit differentiation. In an embodiment, the quantm circuit differentiation may be based on the generalized parameter shift rules. In an embodment, the parameterized quantum model may comprise one or more differentiable quantum circuits (DQCs), the one or more differentiable quantum circuits including one or more derivative features maps for encoding the one or more derivatives of the target function. In an emboimdent, the one or more derivative feature maps may include one or more unitary operations defining a time evolution over a Hamiltonian applied to quantum elements of the quantum register, the Hamiltonian being parameterized by at least part of the variational parameters of the first set of variational parameters or one or more further variational parameters. In an embodiment, the one or more quantum circuits may futher comprise one or more further quantum circuits configured to evaluate one or more quantum kernels and one or more derivatives of the one or more quantum kernels. In an embodiment the one or more further quantum circuits may be configured to determine an overlap between a first quantum state associated with a one of the one or more classical input features and the first set of variational parameters and a second reference quantum state. In an embodiment, the overlap may be determined based on a Hadamard test or a SWAP test. In an embodiment, the one or more classical input features may be encoded based on rotation operations. In an embodiment, Hamiltonian evolution may be parameterized using a function of the one or more classical input features, preferably a non-linear encoding function, such as one or more Chebyshev polynomials. In an embodiment, the one or more quantum circuits may further include one or more further quantum circuits configured to evaluate one or more quantum kernels and one or more derivatives of the one or more quantum kernels. In an embodiment, the one or more furhter quantum circuits may be configured to determine an overlap between a first quantum state associated with a first input variable and a second static reference quantum state. In an alternative embodiment, the one or more further quantum circuits may be configured to determine an overlap between a first quantum state associated with a first input variable and a second quantum state associated with a second input variable. In an embodiment the overlap between the first and second quantum state can be determined via a Hadamard test or a SWAP test. In an embodiment, the one or more quantum feature maps may be configured as analog-digital quantum circuits. In an embodiment, the quantum model may be implemented based on gate-based quantum devices, digital / analog quantum devices, neutral-atom-based quantum devices, ion-based quantum devices, optical quantum devices, superconducting quantum devices, silicon based quantum devise and / or gaussian boson sampling devices. In a further aspect, the embodiments may relate to a system for solving a computational problem, the system comprising a hybrid data processor comprising a classical computer and quantum register, the system being configured to: receiving or determining information on one or more quantum circuits defining operations of a parameterized quantum model of a target function, the target function representing an approximate solution to the computational problem, preferably one or more differential equations and one or more associated boundary conditions, the one or more quantum circuits comprising one or more quantum feature maps for encoding one or more classical input features associated with the target function into the Hilbert space of the quantum register, wherein the one or more feature maps include one or more unitary operators defining a time evolution over a Hamiltonian, preferably a generator Hamiltonian, applied to quantum elements of the quantum register, the Hamiltonian evolution being parameterized by a first set of variational parameters and the one or more classical input features; and, determining the target function based on the parameterized quantum model and a loss function associated with the computational problem, the determining including varying the first set of variational parameters to determine a set of eigenfrequencies of the Hamiltonian which is optimized for the computational problem, the set of eigenfrequencies defining quantum modes, which the parameterized quantum model can use to determine the target function. In an embodiment, the varying of the first set of variational parameters may include: translating the operations of the quantum circuit into control signals for controlling and readout of the quantum elements; applying the operations to the quantum elements based on the control signals; determining classical measurement data by measuring the state of the quantum register; determining an target function based on the classical measurement data; using the loss function to compute a loss value based on the target function and adjusting the first set of variational parameters based on the loss value. In further embodiment, the system for solving a computational problem, comprising a hybrid data processor comprising a classical computer and quantum computr, may be configured to perform any of the steps described with reference to the embodiments described above. The embodiments may also relate to a computer program or suite of computer programs comprising at least one software code portion or a computer program product storing at least one software code portion, the software code portion, when run on a hybrid data processing system comprising a classical computer and a quantum computer comprising a hardware quantum register, being configured for executing the method steps according any of the above-described embodiments. Brief description of the drawings Fig.1 depicts a hybrid computer processor comprising a classical computer and a quantum computer; Fig.2A and 2B illustrate a scheme of training a quantum model for approximating a certain target function, and a generic fixed feature map composed solely by a single layer of rotations; Fig.3A and 3B illustrate a scheme of training a quantum model comprising a trainable feature map according to an embodiment; Fig.4A-4B depict an example of a trainable feature map and the loss for training a QNN using trainable feature maps and fixed non-trainable feature maps; Fig.5A-5C depict solutions to Laplace equations computed on the basis of different schemes; Fig.6A and 6B depict a method for solving computation problems using a quantum model with trainable feature map according to an embodiment; Fig.7A-7C depict experimental results of training a QNN using a conventional feature map and a trainable feature map Fig.8A-8D depict a quantum model comprising trainable quantum feature maps and solutions of a Navier-Stokes computational problem determined by the quantum model; Fig.9A-9C depict examples of trainable quantum feature maps; Fig.10 depict a hardware-level schematic illustrating the application of logical operations to qubits using a quantum circuit; Fig.11A-11C schematically depict hardware-level schematics illustrating the application of logical operations to qubits using a quantum circuit; Fig.12A-12C schematically depicts a quantum circuit based on a digital- analog implementation; Fig.13A-13C schematically depicts a quantum circuit based on a further digital-analog implementation; Fig.14A-14B schematically depicts a quantum circuit based on another digital-analog implementation; Fig.15A-15B schematically depicts a quantum circuit based on yet another digital-analog implementation; Fig.16 schematically depicts a quantum circuit based on a further digital- analog implementation. of the embodiments The embodiments in this disclosure generally relate to improved schemes for solving computational problems using a quantum model, in particular a quantum machine learning model, that comprises one or more trainable quantum feature maps for encoding classical features, e.g. classical variables, associated with the computational problem into the Hilbert space of the quantum register. In conventional quantum models, the architecture and configuration of the feature encoding is set and fixed beforehand based on a quantum feature map. The form of the encoding determines the representation space of possible approximations to solutions of the computational problem. Hence, the specific choice is very influential for the practical performance of the quantum model, in terms of accuracy and trainability. However, in many cases it is hard or not possible to determine a good or best representation space and hence configuration. In the prior art, techniques such as data re-uploading and serial quantum feature maps were proposed to address this problem but in practice these approache only provided limited improvements. The embodiments in this application addres this problem by using quantum models using trainable feature maps, wherein a trainable feature map comprises one or more unitary operations ^^^^^, ^, ^comprising a set of trainable parameters ^^that directly act on the generator Hamiltonian of the unitary operation. As will be described hereunder in more detail, trainable feature maps enable automatic tuning or modification of the feature map encoding for a specific computational problem that needs to be solved. The quantum model can be efficiently trained for producing an accurate approximation of the solution to different computational problems, without any prior knowledge of the representation space for these solutions. This way, quantum models with trainable feature maps provide a very versatile tool for many applications in which complex computational problems need to be addressed including for example solutions for complex equations such as (nonlinear) differential equation or stochastic differential equations (SDEs) which are used for simulating complex physics processes such as plasmas and other diffusive processes, scrambling data using a quantum embedding for anonymization, generating solutions to graph-based problems like maximum independent set or maximum clique, etc. The quantum models described with reference to the embodiments in this application may be executed by a hybrid computer system including a quantum register. Fig.1 depicts an example of a hybrid computer system comprising a classical computer 102 comprising one or more classical processor and a quantum computer system 104, which may be used to implement the embodiments described in this application. The hybrid computer system may be used to train a quantum model to provide an accurate approximation of solution to a computational problem. As shown in the figure, the quantum computer system may comprise one or more quantum registers 106, wherein each quantum register may comprise a plurality of quantum elements, e.g. qubits or qudits. Such quantum register may also be referred to as a quantum processor or a quantum processing unit (QPU). The quantum register may be implemented based on one of the well known quantum hardware platforms including but not limited to superconducting circuits, quantum dots, neutral atoms, ions, optical qubits or NV centers. The system may further include a memory storage for storing a representation of a quantum circuit 114. A quantum circuit defines a sequence of operations which can be executed on a quantum computer. In practice, the execution of quantum circuits involves applying a sequence of signals to the quantum elements of the quantum registers. A controller system 108 comprising input output (I / O) devices may form an interface between the quantum register and the classical computer. For example, the controller system may include an optical and / or electromagnetic pulse generating system for generating pulses, e.g. optical, voltage and / or microwave pulses, for applying operations to the qudits of the quantum register in accordance with the quantum circuit. Further, the controller may include readout circuitry for readout of the qudits. At least a part of such readout circuitry may be located or integrated with the chip that includes the qudits. The system may further comprise a (purely classical information) input 110 an (purely classical information) output 112. The input and output may be part of an interface, e.g. an interface such as a user interface or an interface to another system. Input data may include training data and / or information about one or more differential equation(s) which may be used as constraints in the generative modelling or for which a solution needs to be determined. This information may include the dimensionality, order, degree, coefficients, boundary conditions, initial values, regularization values, etc. The input data may be used by the system to classically calculate values, e.g. parameter settings, which may be used to initialize a quantum circuit that is implemented on the quantum processor. Similarly, output data may include loss function values, sampling results, correlator operator expectation values, optimization convergence results, optimized quantum circuit parameters and hyperparameters, measurements of quantum state overlaps, and other classical data. The system may include a training module 116 that is configured to train a quantum model based on operations of a parameterized quantum circuit 114 which may be stored in a memory of the system. Information about the quantum circuit and training data may be provided via input 110 to the classical computer. Fig.2A and 2B illustrate a known scheme of training a quantum model for approximating a certain target function, e.g. a solution to differential equation. As shown in the figure the quantum model may be represented by a quantum circuit including a feature map 204 for encoding one or more classical input features ^ into the Hilbert space of quantum register 202 and a variational ansatz 206. These input features could be for example classical data, for example pixels in a classification problem, or the variables of differential equation. The feature map may comprise one or more unitaries ^)associated with a Hamiltonian ^^^(^(^)), wherein ^(^) is an encoding function and wherein the variational ansatz may comprise one or more unitaries ^^^^^^ parameterized by parameters ^, which may be variationally optimized. It is noted that in this disclosure different notations ^(^), ^(^)or ^(^) for the encoding function may be used. The quantum circuits may include sequences (layers) of quantum operations which may be executed by the quantum register. The training of the quantum model may be based on an optimization scheme, wherein after initialisation of the variational parameters, the operations of the quantum circuit may be executed by the quantum register, and the state of the quantum register may be measured. For example, a cost operation ^^may be applied to the final quantum state of the quantum register producing a set of classical outputs representing the prediction of the quantum model. In an alternative embodiment, computation of the overlap between the final quantum state and a cost quantum state, which may be either a reference state, or one parameterised by other inputs and operations, produces a set of classical outputs representing the prediction of the quantum model. Based on the measured state, quantities such as a loss value may be computed using a loss function and if the quantities do not meet one or more optimization conditions, the variational parameters may be updated by an optimizer. Typically, the loss function may depent on the computational problem to be solved. For example, in case of solving a differential equation, the loss function may include the primitive elements f(x), df(x) / dfx, ect. of the differential equation. Thereafter, the quantum circuit may be executed using the updated variational parameters and the state of the quantum register may be measured and a new loss value may be computed based on the measured state. These steps may be repeated until the one or more conditions are met. The state of the optimized quantum circuit may represent an optimized approximation of a desired target function. The scheme depicted in Fig.2 may be used as quantum machine learning model which has applications including but not limited to applications of classical machine learning, and specific applications such as generating unknown distribution from a set of input features or solving differential equations. The embodiments apply to such quantum models in general, including but not limited to specific architecture implementations such as quantum neural networks and quantum kernels as illustrated in more detail with reference to the embodiments in this application. Fig.2B depicts an example of a simple quantum feature map wherein input features ^(^) = ^ are encoded based on a single rotation gate operation ^^. This quantum feature map may be defined by a unitary defined as tensor product of ^^rotations: ^^^(^)= ^∑^ ^^^^^^^ ^^ / ^, where ^^is the Pauli matrix and the ^ superscript refers to the tensor product space the operator is applied to and is not an exponent. Here, the input ^ is rescaled by a factor of 1 / 2 for simplicity, such that the feature map can be implemented in a quantum circuit by a set of parallel gates ^^(^)acting across each qubit as shown in the figure. More generally, quantum feature maps may be described as the tensor product of an arbitrary number of sub-feature-maps, wherein each sub-feature map may be represented by the time evolution of a Hamiltonian, referred to as a generator Hamiltonian, applied on an arbitrary sub-dimension of the qubits according to the following expression: where for the sub-feature-map ^, ^^^(^)is the generator Hamiltonian which depends on non-trainable parameters ^ and As described by Schuld et al in their article, “The effect of data encoding on the expressive power of variational quantum machine learning models”, Phys. Rev. A 103, 032430 (2021), it is well understood that the output of the quantum model may be expressed as a partial Fourier series in the features. For example, a quantum model may be based on a quantum kernel, which is a quantum model wherein an output is obtained by measuring the so-called kernel distance from one static reference state, e.g. ground state ^ to the parameterised quantum state (the overlap of two different states), such that ^^^, ^^ =〈^^^^^^^^^^^(^)^0〉(or its real part, or absolute value). Here|0^is the standard notation for a fiducial quantum state that quantum registers are initialised with. Its physical interpretation depends upon the hardware architecture of choice. In this kernel case, an output ^ may be described by the following expression: where ^ spans the Hilbert space of the generator up to ^ = 2^for ^ qubits. Here, the eigenvalues ^^^^ of the generator ^^sets the frequencies of the Fourier modes, whilst the action of the quantum variational ansatz ^^^^^^ with variational parameters ^ can only change the coefficients ^^. This implies that the Fourier modes accessible to the quantum models are fixed once the generator has been chosen. As described in Paine et al “Quantum Kernel Methods for Solving Differential Equations”, arXiv:2203.08884 (2022), alternatively a quantum kernel may involve computing the overlap of two states may involve a second state parameterised against a second classical input value ^, such that the output of the quantum model can be described by the expression ^^^, ^, ^^ = (or its real part, or absolute value). Note that for some applications like those invoked in the the article one can replace = ^^^^^^^, hence removing the variational ansatz blocks. The frequencies involved will in this alternative case depend on the eigenvalues ^^^ ^ ^^ and ^^^ ^ (see also below), nevertheless they remain fixed. Any training procedure can therefore only change ^^^^^ how much each mode contributes to the output of the quantum model. This same logic applies for the general feature map described in Eq. (1), whereby the contribution of the eigenvalues of each sub-feature-map leads to a fixed macro-eigen-spectrum of the entire quantum model. This fixes the degree of spectral modes of the quantum model for any encoding function ^(^), for example one that encodes the input features in as a Chebyshev series rather than Fourier series. Other quantum models also have a similar expression as a Fourier series. For example, a quantum neural network (QNN) may be defined as a quantum model in which a classical output is obtained through measuring the expectation value of a cost operator ^^applied to the output of the quantum circuit ^^^, ^^ =〈0^^^^ ^(^) (^)^0〉. In this case the output can be written as: Compared to the model in wich a quantum kernel approach is used (eq. (3)), in this case the frequencies of the Fourier series are determined by the difference − ^^in the eigenvalues of ^^(also known as the spectral gaps). The important similarity between the two is that – also in this case - the variational parameters can only change the coefficients ^^, whilst it is the generator eigenvalues that uniquely determine the frequencies. Based on this insight, it is observed that current QML models use a static feature map, which fixes the distribution of generator eigenvalues and thus the spacing of modes accessible to the quantum model over the course of training. The consequence of a fixed eigen-spectrum during training is apparent when considering that the ideal distribution of eigenvalues, that produces a quantum model whose output exactly solves the computational problem, e.g. a differential equation, is not known beforehand. Thus, the feature map chosen in advance may produce an eigenvalue distribution that does not have the optimal number of unique modes or optimal spectral spacing, thus limiting access to the optimal frequencies for a specific problem. As a consequence, a quantum model may be unable to learn the correct solution of a computational problem up to a desired accuracy. To address this problem the embodiments in this application use a feature map comprising a unitary associated with a Hamiltonian that is parameterized by a trainable parameters ^^. Such feature map may be referred to as a trainable feature map. Hence, the trainable feature map may comprise a unitary operation ^^^^^, ^, ^^^ wherein the trainable parameters ^^of the feature map directly act on the Hamiltonian of the unitary operation, in particular the generator Hamiltonian. In this context, to “directly act on” means that on or more terms of the generator Hamiltonian ^^^^^(^), ^, ^^^ are multiplied by at least one or more of the trainable parameters ^^or some function of the the trainable parameters ^^. Fig.3A and 3B illustrate illustrate a scheme of training a quantum model comprising a trainable feature map according to an embodiment. The quantum model may be represented by a quantum circuit including a trainable quantum feature map 304 comprising one or more unitaries ^^^^^, ^, ^^^ associated with a generator Hamiltonian ^, ^^^ which is parameterized by first parameters ^^. The trainable quantum feature may is configured to encode one or more classical input features ^ into the Hilbert space of a quantum register 302 using encoding function ^(^). The parameters may be used to variationally optimize the quantum model using a certain loss function which may be associated with a certain computational problem. In some embodients, the quantum circuit may also include a variational ansatz 306 which is parameterized by second parameters ^^. An optimization scheme may be used to train the quantum model in which a loss value is determined based on the measured state of the quantum register in a similar way as explained in Fig.2. In this case however, at least one optimizer 310 may be used to update the variational parameters ^^for the feature map and the variational parameters ^^for the ansatz. The variational parameters may be optimised by a single optimiser or by two different optimisers. Fig.3B depicts an example of a parameterized feature map according to an embodiment. The quantum circuit illustrates the parameterized version of the feature map as depicted in Fig.2B. The parameterized feature map may be defined by tensor ^ product of parameterized ^ ro ^∑ ^^^^^^^^^^^ ^^^^ / ^^tations ^^^^, ^^^= ^ . Hence, the embodiments require a parameterized version of the generator Hamiltonian, in this particular example ^^=∑^^^^^^^^^^, whereby the generator acting on qubit ^ is multiplied by a trainable parameter ^^^from the overall set of newly introduced parameters ^^. The included parameterization allows varying the parameters ^^during training to learn a generator eigen-spectrum of the generator Hamiltonian with eigenvalues which are optimized for the computational problem to be solved. The eigen-frequencies forming the quantum modes of the quantum model may be optimized by minimizing a loss value that is computed on the basis of a loss function, which is associated with the problem to be solved. More generally, from the above it follows that the trainable feature map used in the embodiments in this application may be defined as a tensor product of a set of ^ sub-feature maps according to the following expression: wherein ^(^)is an encoding function and wherein a parameterization ^^is introduced that acts directly on the one or more generator Hamiltonians ^^^^^, ^^^. It is noted that this trainable feature map is fundamentally different from combining a feature map and variational ansatz into a higher-level abstraction containing one unitary that describes the total quantum circuit ^^^^^^, ^^ = ^^^(^)^^^^^^, since in such cases the parameterisation does not act directly on the generator Hamiltonian in the exponent of Eq. (5). The trainable parameters that directly act on the generator Hamiltonian will provide a trainable eigenvalue distribution, which can be optimized for a certain computational problem thus providing a quantum model with capabilities beyond what was possible with just a fixed feature map and a parameterised variational ansatz as known from the prior art. It is noted that the general form of Eq. (5) may also include one or more feature maps in which the choice of the decomposition of the Hermitian generator matrix into Pauli matrices (which is always possible, but not univocous) as well as the tensor product space it acts on, are parameterised by an optimiser or learning routine. Here, one relies on the fact that a generator Hamiltonian can always be written as a sum of unitary operators, which – in case of qubits can be written in terms of pauli terms. For example, a feature map in which an external trainable process (e.g., a reinforcement learning agent) chooses a generator from the Pauli matrices {^^, ^^, ^^} and a qubit to apply to, would also be a trainable feature map according to an embodiment, when considering that ^^could contain an arbitrary number of binary parameters ^^^^that add or remove the ^-th operation. As an explicit example, a sub-feature-map acting on a single qubit could apply the parameterized generator ^^^^^, ^^^ = ^^ ^^^ ^^ ^^+ ^^^^ ^^^ ^^ ^^+ ^^^^^^. In this case, the optimiser is choosing the generator matrix from a possible 27 different compositions of Pauli operators. Further, it is observed that the number of parameters in ^^of equation (5) can be arbitrarily large. Applying this to the simple example of the 1-D Fourier feature map of Eq. (2) in which the encoding function ^(^) = ^, the trainable feature map is defined by the following expression: Following the same reasoning of eq. (3) above, the output of the quantum model may be a Fourier series where the frequencies of each mode depend explicitly on the parameterisation of the feature map: Thus, the embodiments allow for the changing of the eigenvalue distribution of the feature map over the course of training, which - in turn - allows the choice of spectral modes (i.e. the frequencies of the Fourier series) that may minimise the loss function faster or further when compared to an optimization scheme for a quantum model comprising non-trainable feature maps. Implementing a trainable quantum feature map at a quantum circuit level for a 1-D Fourier feature map as defined by equation (2) may start with an unparameterized version of the feature map. A generator Hamiltoninan ^^= ∑ ^ ^^^^^^may be selected, which includes Pauli matrix ^^applied to each of the ^ qubits of the feature map. Here, superscript ^ refers to the tensor product space the operator is applied to (and is not an exponent). This generator may be referred to as a product feature map. Starting with the known unparameterized case, the feature map may then be expressed as follows: Note that the input ^ may be multiplied by a factor of 1 / 2 for simplicity, such that the feature map can be implemented in a quantum circuit by a set of parallel gates ^^(^)acting across each qubit as explained with reference to Fig.2B. Parameterization of the feature map requies a parameterized version of the generator. An example whould be ^^= ∑^^^^^^^^^, whereby the generator acting on qubit ^ is multiplied by a trainable parameter ^^from the overall set of newly introduced parameters ^^as explained with reference to Fig.3B. Although the parameterization of the feature map illustrated in Fig.3B is very simple, it still allows quantum models to represent functions that are otherwise inaccessible to those with non-trainable feature maps. This is true independently from the number of qubits, ansatz layers or training resources. This is due to the unique correspondence between the feature map eigenvalues and the frequencies of the quantum model’s Fourier decomposition as described above with reference to equation 3. The use of trainable feature maps as disclosed in this application has particular advantages in quantum models for solving complex complex computational problems such as (non)linear differential equations using differentiable quantum circuits (DQC) as described in WO2022 / 101483, which is hereby incorporated by reference, or using differential quantum kernels which as described in PCT application PCT / EP2023 / 055620 with title “Quantum kernel based regression”, which is hereby incorporated by reference into this application. Here, the output of a quantum model may be treated as a surrogate solution to a differential equation (DE) and the parameters are optimized with respect to minimizing the residual of the DE. The core of the DQC algorithm lies in how the DE residual is obtained, which requires computing derivatives of the quantum model’s output with respect to its input features. This is achieved through differentiating the quantum feature map directly, obtaining gradients through quantum sub-routines such as the parameter shift rule. An overview of the DQC workflow in which trainable feature maps are used is given by the algorithm in table 1 below: One key point to note in algorithm 1 is the calculation of partial derivatives with respect to the input features and trainable parameters in steps 5 and 8 respectively. This is in contrast to known DQC algorithms, in which the complete derivative ^^ (e.g.,^^^(^)) is computed since no single quantum circuit operation contains both trainable parameters ^ and non-trainable feature parameters ^. Based on the algorithmic workflow, it is evident that assessing the quality of the DQC solution can only occur after the training procedure has been completed. As such, it is not known whether the chosen feature map will have a set of eigen frequencies to represent the true solution to the differential equation. Hence, a quantum engineer may need to run a conventional DQC algorithm repeatedly, trying different types of feature maps. By contrast, when executing the DQC scheme based on trainable feature maps as described with reference to the embodiments in this application, the quantum model may be capable of computing a solution to the differential equation to a much higher accuracy, with only one run of DQC. In contrast, when using a conventional non-trainable feature map, different DQC runs may be executed with different feature maps, and possibly none of them could be optimal. Below numerical evidence of this provided in the solving of real- world differential equations. Laplace’s equation is a partial differential equation that appears in many areas of physics and engineering including electrostatics, fluid mechanics, heat transfer.It describes the behavior of a scalar field in free space and has the form: where ^(^, ^) is the scalar field. In this problem we will be solving this equation for a field in a rectangular box of length and height 1, with boundary conditions defined as In this experiment the DQC algorithm may be used to solve Laplace’s equation using a trainable feature map and and using a non-trainable (fixed) feature map so that both approaches can be compared. For the trainable feature map, a simple parameterization as shown in Fig.3B was selected. Specifically, the quantum model was based on a quantum neural network comprising four qubits (^ = 4), four ansatz layers (^ = 4) of the hardware-efficient ansatz and a cost function, for example, a total magnetization cost function. Since the problem is a two-dimensional problem, both input featues ^ and ^ may be encoded in parallel across the feature map. This is different to the 1-D Fourier encoding function ^(^) = ^ described above, and instead would be defined where here the sub-feature-map index ^ corresponds to the qubit index of the circuit. Fig.4A shows the structure of the quantum circuit used in this experiment. In particular, this figure depicts a quantum circuit of a fourth qubit (^ = 4) quantum neural network trained on the basis of the DQC scheme to solve Laplace’s equation. The qubits are initialized in the |0^ state, after which they are acted upon by the feature map, which encodes both ^ and ^ dimensions in parallel and comprises optional trainable parameters ^^. The feature map may be followed by one or more layers of a hardware-efficient variational ansatz as shown by the operations in contained in the dashed box. This layer is subsequently repeated (in this particular example three times) to give a QNN with a total of four ansatz layers (^ = 4). The total magnetization cost operator ^^may be used to repeatedly measure the qubits of the quantum register in the ^^basis to obtain an expectation value and summing the outcome. For the DQC algorithm itself, the loss may be defined as an equally weighted sum of the individual loss terms, namely Eq. (11) and each of the boundary conditions. For optimization, an Adam optimizer with learning rate 0.01 trained for 4000 iterations was selected, each of which evaluates a batch size of 200 randomly sampled points for the PDE term and 10 points for each of the boundary terms. Fig.4B shows a graph of the loss as a function of training iterations for the QNN with a fixed non-trainable featuremap (data trace 402) or a QNN with a trainable feature map (data trace 404). The loss defined in Eq. (13) may be defined as a sum of the interior and boundary losses. Both models start at the same loss at training iteration zero. This is indicative of the fact that the trainable FM parameters ^^are all initialised as “1”, at which point the models are equivalent. After the start of the training, the loss of both models decreases at the same rate, moving along a common path away from the randomly initialised poor solution. After 1000 training iterations however a separation starts to show, in which the utility of the TFM allows convergence to lower losses as training continues. By contrast, the QNN with a non-trainable FM appears to have already reached convergence, unable to improve upon the solution reached in the first 1000 iterations. After 4000 training iterations, the TFM QNN achieves a loss that is 61.5% lower than the FFM QNN, a significant improvement. Fig.5A-5C depict solutions to Laplace equations computed on the basis of different computation schemes. Specifically, the figures depict a solution to Laplace’s equation which is analytically computed (Fig.5A), computed based on a DQC trained quantum model comprising trainable feature maps (TFM) (Fig.5B) and computed based on a DQC trained quantum model compirsing non-trainable feature maps (Fig.5C). The first graph plots the analytic solution, which for this system is given as Comparison between the computed solutions of Fig.5A, 5B and 5C shows that the inclusion of the trainable feature map significantly improves the accuracy of the DQC solution. Qualitatively, the solution of Fig.5B correctly identifies the magnitude of the scalar field at the source on the left boundary, which is not present in Fig.5C. Furthermore, when using trainable feature maps, the solution clearly shows that the positive field emanating from the left does not reach all the way to the top and bottom boundaries. This is in contrast to the solution with regular DQC of Fig.5C, in which there is no clear zero field boundary at the top left and bottom left corners. The improvement provided by the use of a trainable feature map as shown in Fig.5 can also be quantified. Firstly, the value of the loss function at the final training batch, as given by Eq. (13), is 0.11 for regular DQC compared to 0.048 for DQC in which a TFM is used, thus providing a reduction of the loss value of over double. Secondly, the improvement carries over when comparing the actual predictions seen in Fig.5). In the region of interest ^ ≤ 0.5, the mean absolute error between the predicted and true solutions is 0.083 for regular DQC and 0.048 for DQC with TFM thus providing a reduction in the error of over 40%. Training a variational quantum circuit typically involves performing gradient- based optimization against the trainable parameters defined in step 8 of the algorithm as described above in table 1. Such gradient-based optimization may also used for optimizing the trainable feature map. If such an optimization is adopted, one thus needs to compute ^^, for a suitably defined loss function ℒ which captures the adherence of the (tentative) solution ^(^) to the conditions set by the known equation(s), and eventually the related boundary conditions, or where available, a set of data {^^}. This is explained hereunder in more detail. The quantum state produced by the quantum model comprising a trainable feature map may be defined as: where the parameters in the TFM have been relabeld as ^^and the parameters in the ansatz as ^^for clarity. The measured output of the quantum model implementing the quantum circuit may be defined as the expectation value of a cost operator ^^: can then act as a surrogate quantum model for the target function ^. A supervised learning (SVL) loss contribution (i.e. known a dataset) may be defined as: with ^ a suitable distance function. Otherwise, in a DQC setting, embedded each (partial, differential) equation in a functional ^ [^^^(^), ^(^), ^] to be estimated on a set of ^ collocation points {^^}, one can define a physics-informed loss function in terms of the elements ^^^(^), ^(^), ^ of the differential equation: When optimizing the loss against a certain variational parameter ^, one needs to compute ^, which can be done following Kyriienko et al describe in Solving nonlinear differential equations with differentiable quantum circuits, if ^ ∈ ^^, as the feature ^ is not in the differentiation. If instread ^ ∈ ^^, then using the linearity of differentiation the following expression can be obtained: Note that in Eq.20 the RHS is left implicit, as its exact form depends not only upon the actual choice of the ^ distance as in Eq.19, but also upon the terms involved in the functional ^. In order to give further guidance on the explicit treatment of this latter case, the discussion can be split according to the various terms involved in the functional ^, under the fairly general assumption that the problem variable(s) ^ are independent from the variational parameter ^: ^ ∙ ^ terms that depend solely on ^^so hat the derivative ^^ is null and can be neglected; ^ terms containing the function ^ itself can be addressed via the chain rule already discussed with reference to Eq.19; and, ^ terms depending on ^^^(^^) can be similarly decomposed as wherein the latter descends from the independence highlighted above, and the first term on the RHS can be simply attained from the (known) analytical form of the loss function ^ and the functional ^. Hence, following the chain rule, a dependency upon ∂^(^^)⁄ ∂θ may be obtained. This highlights how in many algorithms using quantum models, including DQC, it is important to be able to compute the gradient of the quantum model with respect to the trainable parameter ^^associated with the ansatz or, in this case, ^^associated with the trainable feature map so that it can be trained by a gradient-based optimizer. For the specific case of ^ ∈ ^^instead, after combining the unitary ansatz and the cost operatoras ^^^ ^(^^)^^^^^^^^^ ≡ ^^^^^^^ for brevity, Eq. (16) may be rewritten using the generic TFM form provided in Eq.5, and isolate the only term dependent on the ^^^of interest: and further simplify the formalism using ^^^^|0^≡|^^^^and ^^ ^ ^^^^^^^^^≡ ^^^^such that: Elicited the dependency on the single FM parameter, now the computing ∂^⁄∂^^^based on the product rule be addressed in the following way: For simplicity, the parameter dependencies of the ^^^)generator have been omitted, and the commutator notation [·, ·] has been introduced. In order to adopt the standard parameter shift rule (PSR) for Pauli operators, Eq. (24) can be further processed by decomposing the generator ^^^^(^, ^^^)=(^^^)into commuting Pauli operators ^^^, and then adopting recursively the product rule to split Eq. (24) into the estimation of the various components ∂^^^ ^,^⁄∂^^^. As described above, computing gradients with respect to the trainable parameters of the quantum model can be achieved using the PSR. At a high level, this routine allows calculation of the derivative of a specific parameter ∂^⁄∂θ^by evaluating the difference between sets of quantum circuits where that parameter is shifted by excess or defect. In the case where the parameterized operations are all single qubit Pauli Hamiltonians, as is true for the examples shown in this document, then two circuit evaluations are required to obtain the first order derivative ∂^⁄ ∂θ^. For the experiments conducted, in which an Adam optimizer is used, only first order derivatives are required. For each input point ^^, training both models requires computing ∂^⁄∂θ^for all trainable parameters. Thus, the additional number of quantum circuits for each input is simply two times the number of FM parameters since both contain the same ansatz parameters ^^. Hence, an additional factor of ^^ more circuit evaluations are required to train the trainable feature map model versus the non-trainable model. For the models used in the examples, ^^^^ = 4 and ^^^^ = 48, such that ^^= 1.08. In terms of the total number of circuits required to train the models over the entire training routine, for the non-trainable FM model this can be calculated as ^^= 2^^^^^^^^^^^^, where ^^^is the batch size and ^^^^^is the total number of training iterations. For the experiments, this leads to a total of 2 × 48 × 240 × 4,000 = 92,160,000 circuit evaluations. The TFM model then requires ^^^^= 99,840,000 circuit evaluations, i.e. an additional 7,680,000 compared to the non trainable feature map. Overall, the additional number of circuits required to train TFM models scales only linearly with the number of additional trainable parameters introduced into the FM. Furthermore, for TFMs as shown in Fig.3B, where ^^^^ scales linearly with the number of qubits and constant with the ansatz depth, the cost factor ^^of large quantum models is modest. For example, the models used to solve the Navier-Stokes equations referenced elsewhere in the patent document, ^^= (24+804) / 804 = 1.03, corresponding to only a 3% increase in the number of quantum circuits evaluated. When using DQC, one needs to compute the derivative with respect to an input feature ^, as explained in step 5 of the DQC workflow of table 1. This differentiation is subtly different to computing the derivative with respect to a certain ∂^^^, since ^ appears in more than one unitary operation in the feature map. To resolve this, the derivative with respect to the whole feature map can be constructed as^^^^^ = ∑^^^^,^, which allows the differential to be represented as a sum of modified circuits ^^^,^. This way, function derivatives may be represented using a product derivative rule. Thus, this can be combined with the parameter shift rule such that the function derivative is wherein ^ ± ^^,^ is defined through the parameter shifting, and the index ^ runs through individual quantum operations used in the feature map encoding. Applying the parameter shift rule once again, a second-order derivative may be obtained with four shifted terms for each generator. It is noted that when operating on mixed terms as the ones analysed in Eq. (21), the same PSR construct of Eq. (25) can be invoked, but replacing the expectation value for ^, Eq. (23), with the expectation value for ^^⁄ ^^ , Eq. (24). The above expressions show that differentiation against any feature ^ is not directly affected by the introduction of the additional trainable parameters ^^as described with reference to the embodiments in this applicaiton. If due to the latter, the corresponding ^^^^, ^ ^ is not anymore involutory and idempotent, it is still possible to resort to a generalised parameter shift rule, as explained e.g. in Kyriienko et al, Generalized quantum circuit differentiation rules, Physical Review A 104.5 (2021), p.052417, which is hereby incorporated by reference into this application. Fig.6A and 6B depict a general scheme for solving general (non-)linear DEs using a quantum computer according to an embodiment. In particular, the figure may depicts a scheme including quantum circuits for modelling a surrogate solution ^(^) of the DE. The quantum circuits may include one or more variational feature maps ^^^, ^^^^ 605 with a parameterized generator Hamiltonian ^^^(^), ^, ^^^^ and one or more parameterized ansatze 608 for computing function values ^(^^) for different values of ^^. In some embodiments, such as in the DQC schme, the quantum circuits may also include derivative quantum circuits 607 which may be determined using auto- differentation and the parameter-shift rule as described in WO2022101483. The derivative quantum circuits 607 and associated variational quantum circuits 609 may be used to determine a value of a function derivative ^ for different values of ^^^. As shown in Fig.6B, the quantum circuits may be executed on a quantum computer comprising a quantum register 618 comprising quantum elements, such as qubits or qudits. The quantum circuits including one or more variational features maps 620 and variational ansatze 623 may comprise a sequence of single and / or multiple operations 621,622,625 that are applied to the quantum elements, followed by a read-out operation 624 to read-out the state of the qubit register. When executing the quantum circuits, the operations are translated into a sequences of pulses tho control the quantum elements and readout the quantum elements. The quantum circuits may be executed based on an optimization schedule, wherein the execution may include execution of the quantum circuits and measuring the state of the quantum regiter 604. A set of points {^} (a regular or a randomly-drawn grid) may be specified for each equation variable ^ 606. Variational parameters ^^, ^^may be set to initial values (e.g. as random angles or a predetermined set of intial anges) and the operations may be executed by the quantum register as shown in Fig.6B and the state of the quantum register may be measured. Using a cost function ^^, expectation values respect to the variational quantum state be determined 610-611, for the chosen point ^^to represent the surrogate solution at that point ^(^^). In another embodiment, using a cost quantum wavefunction ^^^^^^^ the overlaps (^^)^^ and ^^ can be determined 610-611, for the chosen point ^^to represent the surrogate solution. The cost wave function can be parameterized by the encoding of a second point ^^and additional action of other trainable parameters, or a fixed reference state (e.g.,|^(^^)^=|000 …^, the wavefunction where all qubits are in the computational state|0^). In both embodiments, a potential solution at this point may be constructed taking into account the boundary conditions. Further, the expectation values ^^^(^, ^^, ^^)^ / ^^ associated with the derivative quantum circuits may be estimated 611 for a predetermined cost function at point ^^. Repeating the procedure 606 for all points ^^in {^}, function values and derivative values may be computed. Further a loss function and other quantities required by the optimizer 612 based on the differential equation and the boundary conditions may be determined (forming required polynomials and cross-terms by classical post-processing). In some embodiments, regularization points may be added, forcing the solution to take specific values at these points. The loss function may be used to determine a loss value, which may be used to determine a score ^ (a metric) which is indicative to how well the potential solution (parametrized by variational angles ^^, ^^) satisfies the differential equation, matching derivative terms and the function polynomial to minimize the loss. With the aim to increase the score (and decrease the loss function), the gradient of the loss function 612 with respect to variational parameters ^^, ^^may be computed. Using classical optimization procedure 614, such as the gradient descent procedure, the variational parameters may be updated from iteration ^^= 1 into the next one ^^+ 1 in step 616: ^^^^^← ^^^^^^^− ^∇^ℒ (with ^ being here a `learning' rate). The above-described steps may be repeated until one or more exit conditions are reached. Suitable exit condition may include: 1) the maximal number of iterations ^iterreached; 2) loss function value is smaller than pre-specified value; and 3) loss gradient is smaller than a certain value. Once the classical loop is exited, the solution may be chosen as a circuit with angles that minimize the loss. Finally, the full solution may be extracted by sampling the cost function for optimal angles Notably, this can be done for any point ^, as DQC constructs the solution valid also beyond (and between) the points at which loss is evaluated originally. In DQC the conventional quantum model that is used is a QNN. However, in DQC the computational problem may also be evaluated by evaluating quantum kernels and derivatives thereof. In that case, kernel values and a kernel derivative values ∇^^^^^^^may be computed for different input values ^^. These quantum kernel feature maps can comprise unitary operations that are similar to unitary operations of the trainable features map described with reference to the embodiments in this application. Application of operations on the quantum register will results in a variational quantum state ^^^^ Subsequently, kernel values may be determined as a wavefunction overlap of the a variational quantum state and another reference state Note that in other parts of this document and figures, the reference state|^^^is also referred to as a cost state|^^, which may arbitrarily depend on another input point or parameterization such that it is written as ^^^^^^^. A kernel value ^ may be measured using a well-known Hademard test configured to measure the real and imagingar part of the overlap: Similarly, derivatives of the kernel function may be be computed on the quantum computer using similar operation sequences resulting in a measurement of a kernel derivative value. The measurement of a kernel value typically involves repeated measurements on the same circuit, the quantity of interest being an average of the repeated measurements. Thus, from the above, it follows that a broad class of feature maps can be described as the tensor product of an arbitrary number of sub-feature-maps, each represented by the time evolution of a generator Hamiltonian applied on an arbitrary sub- dimension of the qubits where for the sub-feature-map ^, ^^^(^)is the generator Hamiltonian that depends on non-trainable parameters ^ and is an encoding function that depends on the input features ^. Note that ^^^(^)can be applied several times across the quantum circuit, interleaved with layers, for example in data re-uploading or serial feature maps. In data re-uploading, ^^^(^) is applied more than once in non-parallel blocks separated by other quantum operations which could be so that the data is “re-uploaded” into a different qubit basis. This is understood to increase the number of unique frequencies of the model. In serial feature maps, multi-dimensional data may be encoded by non-parallel blocks that are separated by other quantum operations which each encode one dimension Introducing trainable parameters in the generator Hamiltonian of the quantum model, produces a measured output which can be expressed as a Fourier series, where the frequencies of each mode depend explicitly on the parameterization of the FM. For example, for a QNN with a cost ^^, the output of the model can be written as: Where ^ contains the spectral gaps of all generators and ^^are the corresponding coefficients. Thus, introducing trainable parameters into the generator, which allows the eigenvalue spectrum to change over the course of training, leads to a quantum model with trainable eigenfrequencies ^^(^^). This - in turn - allows the quantum model to “discover” a choice of spectral modes not known a priori that may minimize the loss function more efficiently than non-trainable FMs. Since the number of frequencies accessible to the model|Ω|scales with the Hilbert space dimension, parameterization of each frequency individually would require exponentially many parameters. The effectiveness of a simple parameterization that grows only linearly with the number of qubits is described with reference the example below. The advantage of trainable feature maps (TFMs) stems from two important technical effects. Firstly, TFMs are able to be trained such that their frequency spectra contain non-uniform gaps, producing non-orthogonal basis functions. This is demonstrated using an example that includes a FM containing a single generator Hamiltonian ^^(^)=∑^ ^^^^^^^^ / 2, where ^^= 1, and a 1-D Fourier encoding function ^(^)= ^. This feature map may be used to train a quantum neural networ QNN to fit data produced by a cosine series ^(^)= ^^^(^^^). The QNN architecture may be similar to the architecture illustrated in Fig.4, wherein in this example three qubits ^ = 3 are used. The QNN further includes four (^ = 4) layers of the hardware-efficient ansatz (HEA) and a cost ^^= ∑ ^ ^ ^^, which is trained to minimise the mean-squared error (MSE) to the data using an Adam optimiser and learning rate ^^= 10^^. A QNN comprising a fixed feature map (FFM) and a QNN comprising a trainable feature map (TMF) may be used to compare the performance of the models. Fig.7A-7C depict experimental results of training the QNN based on a conventional feature map and based on a trainable feature map. In particular, these figures illustrate fitting cosine series of different frequencies using FFM and TFM QNNs. Fig.7A illustrates a model prediction on data with ^^= {1, 1.2, 3}. Fig.7B illustrates spectra of trained models as illuatatd in Fig.7A as obtained using a discrete Fourier transform. Fig.7C illustrates prediction mean square error (MSE) of simple, tower and exponential FFMs compared to a TFM when training on multiple data sets with equally spaced frequencies ^^^∈ [1, 3]. A FFM QNN may be trained to learn data sets consisting of frequencies ^^={1, 2, 3}and ^^={1.5, 3,4.5}, which both fit perfectly because the frequencies correspond to the unique positive gaps of the generator eigen-spectrum up to a multiplicative factor of 1 and 1.5 respectively. The model is able to fit the second data set because all QNNs in this section are provided with the trivial resource of a classical trainable parameter which can globally scale the data. Fig.7A demonstrates how a FFM QNN fails to fit data with frequencies ^^={1, 1.2, 3}. Here, no amount of global data scaling can create spectral gaps with unequal spacing and consequently non-orthogonal basis functions. Meanwhile, a TFM QNN with parameterization ^^^=∑^ ^^^^^^^^ / 2does much better in fitting the data. It does so by learning a generator with values ^ = {0.89,1.05,1.04}, leading to an eigenvalue spectrum which contains gaps at 0.9000, 1.050, 1.200, 3.0007041-4as shown in Fig.7B, whereas for the fixed feature map only one dominant frequency at 1.0007021 is visible and a smaller frequency mode at 3.0507022. Interestingly, it is then the variational ansatz which learns to suppress the coefficients of the other unwanted frequencies the model has access to. The second potential advantage of TFMs is their flexible spectral richness. For FFMs, one can pick values to produce QNNs where ∣Ω∣ scales as ^(^), ^(^^)and ^(2^) respectively. Typically, a practitioner may need to try all of these so-called simple, tower and exponential FMs, which are detailed in the article Solving nonlinear differential equations with differentiable quantum circuits, Phys. Rev. A 103, 052416 (2021) and Protocols for trainable and differentiable quantum generative modelling, arXiv preprint arXiv:2202.08253 (2022).,yet a TFM can be trained to effectively represent any of these. The performance of each of these FMs is examined when fitting data sets with ^ = 1 through ^ = 7 equally spaced frequencies. Fig.7C shows the MSE achieved by each QNN across these data sets. Despite the data having orthogonal basis functions, the FFM QNNs have either too few frequencies (e.g., simple FM for ^ > 3 data) or would require exponentially many parameters to suppress the unwanted model frequencies (e.g., exponential FM for ^ < 7 data). It is found that a TFM outperforms FFMs in the average and worst-case scenarios, demonstrating them to be a sensible default choice when solving problems without knowledge of the number of spectral modes of the solution. TFMs may be used for solving computational problems of practical interest. For example, the differentiable quantum circuits (DQC) algorithm may be used to efficiently train a model to solve the incompressible 2D time-dependent Navier-Stokes (N- S) equations at Reynolds number R^= 100 and subsequently predict the downstream wake flow of fluid passing a circular cylinder. This is one of the canonical systems of study in physics-informed neural networks (PINNs), due to the vortex shedding patterns and other complex dynamics exhibited even in the laminar regime. The quantum model may include two quantum neural networks (QNNs) representing the stream function ^ and pressure ^ respectively, from which horizontal and vertical velocities ^ = can be derived whilst automatically satisfying the mass continuity equation. The model is trained by minimizing the predicted right-hand side of the N-S equation, whilst 1% of the reference data (shown by the dots in Fig.8A-8C) is given as data-driven boundary conditions. Here, more advanced models may be used compared to those used for generating the results described above with reference to Fig.7. The architecture of each QNN is shown in Fig.8D. First, a single ansatz layer is applied, followed by a serial TFM. The feature map is serial in that each dimension (^, ^, ^) is encoded serially in separate blocks, separated by an ansatz layer which acts to change the encoding basis to avoid loss of information. This is preferential to the alternative parallel encoding strategy, where all dimensions are encoded in a single depth-1 block, since it produces a quantum model with more unique frequencies. The encoding unitary of the TFM once again uses the simple parameterisation ^^^, whilst the FFM models use the same generator without trainable parameters ^^. After the FM, a sequence of ^ = 32 ansatz layers are then applied. Subsequently, beyond the width of the figure, a second data-reuploading feature map is applied, which is a copy of the TFM block including sharing the parameters. Finally, the QNN architecture ends with another ^ = 32 ansatz layers. In total, each QNN has 804 trainable parameters outside the FMs. The results of the experiment are visualized in Fig.8A-8C, where the pressure field at a specific time is compared. The TFM QNNs predictions shows excellent agreement with the reference solution, obtaining the correct distribution of pressure bubbles. By contrast, the FFM QNNs solution is only approximately correct, unable to resolve the distinct different regions of pressure that form as fluid passes to the right. Fig.8A shows the pressure field at ^ = 4.0 obtained from a physics informed deep neural network as described by Raissi et al, in their article Physics informed deep learning (part ii): Datadriven discovery of nonlinear partial differential equations,” arXiv:1711.10566 (2017). Fig.8B shows the predicted pressure field computed based on TFM QNNs using ^^^. Fig.8C shows the predicted pressure field computed based on FFM QNNs using Table I: MAERM error predicting ^, ^ and ^ averaged over 5 runs. The minimum, maximum and mean over the 11 time points between ^ = 0 to ^ = 5.5 is given. To quantify the error, the mean absolute error relative to the median (MAERM) calculated for each time step and observable. The results, presented in Table I, numerically demonstrate the improved performance of the TFM model across all observables and time steps. Fig.9A-9C schematically depicts examples of differentiable trainable quantum feature maps. In particular, Fig.9A illustrates an example of a quantum feature map, which is here shown as an example of a `product’ type feature map, where single qubit rotations (here chosen as ^^) act on each qubit individually and are parametrized by ^ and a function of variable ^. Reading from left to right going forward in time, the rest of the circuit is schematically summarized, with thin blocks 903,904 depicting variational ansatz and cost function measurement respectively. For the feature nonlinear encoding the nonlinear function ^(^)is used as an angle of rotation. The product feature map can be further generalized to several product layers, and different functions {^}. For example, several feature maps may be concatenated to represent a multivariable function. Fig.9B illustrates an example of a derivative quantum circuit for a product feature map. Differentiation over variable ^ follows the chain rule of differentiation, with the expectation value of the derivative written as a sum of separate expectations with shifted phases ^^(^(^^, ^)± ^ / 2)912 repeated for each ^-dependent rotation 9141-4. Fig.9C illustrates an example of a product feature map, where the trainable feature map is followed by the unitary evolution generated by Hamiltonian ^ 920. For complicated multiqubit Hamiltonians the encoded state comprises of exponentially many unique x-dependent amplitudes. The time interval ^ can be set variationally, or annealed from zero to a finite value during the optimization procedure. Preferably, the feature map has a non-linear dependence on the encoded variable ^. In the simplest case, this may correspond to a single layer of rotations as shown in Fig.9A. A trainable product feature map comprising parameterized Hamiltonian and a non-linear encoding function ^(^)may be described by the following expression: where ^^≤ ^ is a number of qubits that is used by the quantum computer for the encoding, the symbol denotes the tensor product and ^^^refers to the jthelement of the set of parameters ^^. Further, a Pauli rotation operator for Pauli matrices ^^^,^= ^^^, ^^^^^ ^^^, (^^^ ^ = ^, ^, ^, respectively) acting at qubit ^ for phase ^. This type of feature map circuit may be used in Quantum Circuit Learning schemes. The next step is to assign a non-linear function for rotation. In an embodiment, the non-linear function may be selected as ^(^)= arcsin(^) and ^ = ^, such that only real amplitudes are generated. The unitary operator of Eq. (5) may then be rewritten as (for ^^= ^): (^) ^^^^^^^ , leading to amplitudes that depend on the encoded variables as sin(arcsin(^) / 2)and cos(arcsin(^) / 2). Acting on the initial state |0^, this feature map may encode the variable as an ^-th degree polynomial formed by {1, ^, √1 − ^^} and products thereof. The redundancy from many qubits thus forms a basis set for function fitting. It is noted that while basis set can be continuously improved adding more rotations, this choice of basis is well-suitable for linear and quadratic functions, but often lacks the expressive power. The product feature map can be generalized to several layers of rotations ℓ = 1, 2, … , ^, various non-linear functions ^ℓand specific subsets of qubits ^ written as: Below, an example of how the quantum feature map can be differentiated is provided, e.g., the example in Eq. (4) wherein ^ = ^ rotations and full layer are considered. The derivative for the unitary operator generated by any involutory matrix (length-1 Pauli string in this case) can be written as: where Euler's formula can be used to rewrite the derivative into the form of a sum of unitary operators, where ^-dependent rotations are shifted one-by-one. Next, the formula may be generalized to the expectation value of any observable ^C^^ for the encoded state, following the step of standard parameter shift rule. This reads, up to a scaling factor depending on ^^, and the specific functional dependency of ^^^upon ^^that is omitted for simplicity: The corresponding derivative quantum circuits (DQC) are shown in Fig. 9B, where differentiation of the cost function for feature map is performed using the chain rule (highlighted rotations 9141–4). A similar strategy can be applied for generic multilayer feature maps and a different choice of nonlinear map ^(^). Finally, in the cases where the generator of the feature map (encoding Hamiltonian ℋ 920) is not an involutory matrix, they may be rewritten as a sum of unitary operators, and measure the derivative as a sum of overlap using the SWAP test. In another embodiment, a non-linear quantum feature map may be used which may be referred to as the Chebyshev feature map. Belonging to the product feature map family, this feature map drastically changes the basis set for function representation. As a building block, a single qubit rotation may be used, but with nonlinearity introduced as ^(^)= 2 ^ arccos(^), ^ = 0,1,2, .., such that the encoding circuit reads: arccos(^)^^^^. Here it is considered that the coefficient ^[^] may in general depend on the qubit position. The seemingly small change of factor two multiplication goes a surprisingly long way. Namely, let us expand the rotation using Euler's formula, getting: The resulting decomposition of equation (11) corresponds to the unitary operation with matrix elements defined through degree−^^^^ Chebyshev polynomials of first and second kind, denoted as , for the embodiment where the trainable feature map parameters ^^take on values such that the product ^^^^ are integers. For other embodiments in which the product ^^^^ is not an integer, the resulting decomposition of equation (11) corresponds to matrix elements from the space of general polynomials. Formally, Chebyshev polynomials represent a solution of Chebyshev differential equation: (1 − ^^d^^ d^ ) − ^ + ^^^ = 0, ^ = 0, 1, 2, 6, … d^^d^ wherein ^(^) = ^ cos(^ arccos(^)) + ^ sin(^ arccos(^)) ≡ ^ ^^(^) + ^ ^^(^), |^| < 1, and wherein ^, ^ are some constants. Chebyshev polynomial of the first kind for low degrees can be written explicitly as ^^(^)= 1, ^^(^)= ^, ^^(^)= 2^^− 1, ^^(^)= 4^^− 6^, and higher degrees can be deduced using the recursion relation ^^^^(^) = 2 ^ ^^(^) − ^^^^(^). Similarly, second-kind Chebyshev polynomials can be written as ^^(^)= 1, ^^(^)= 2^, and ^^^^(^)= 2 ^ ^^(^)− ^^^^(^). The crucial properties of Chebyshev polynomials are their chaining properties, nesting properties, and simple differentiation rules. The chaining properties for polynomials of the first and second kind read as respectively. Derivatives can be obtained as d^^(^) / d^ = ^ ^^^^(^). Nesting corresponds to the relation ^^^^^(^)^ ≡ ^^^(^). Finally, polynomials of different kinds can be converted as ^^(^) = 2 ∑ ^ ^ ^^(^) when ^ is even, and ^^(^) = 2 ∑ ^ ^ ^^^(^) − 1^ when ^ is odd. Finally, it is noted that Chebyshev polynomials may represent oscillating functions when defined in the ^ =(−1,1)region, and their derivatives diverge at the boundaries of this interval. The power of the representation described can be inferred from approximation theory. This theory states that any smooth function can be approximatedas ^(^)=∑^ ^^^ ^^^^(^),|^|≤ 1. Chebyshev polynomials form an optimal set of basis functions in the sense of the uniform norm. This is why they are at the foundation spectral algorithms for solving ODEs, and also give an edge in quantum simulation. As examples of encodings for quantum kernels, two types of Chebyshev quantum feature maps are presented. The first version corresponds to a sparse Chebyshev feature map defined as: arccos(^)) where the encoded degree is homogeneous and is equal to one. Here the chaining properties ^^(^)and ^^(^)should be remembered, noting that once states with Chebyshev polynomials as pre-factors are created, the basis set will grow further by concatenating elements. In the following, the sparse distinction is dropped and reference will be made to the Chebyshev feature map. The second version corresponds to a Chebyshev tower feature map, which may be defined as: arccos(^)), where the encoded degree grows with the number of qubits, creating a tower-like structure of polynomials with increasing ^ = ^. Again, as polynomials chain together and morph between two kinds and their degrees, the basis set is largely enriched. This is the choice that is exploited when large expressibility is needed without increasing system size and number of rotations. Eq.(16) allows the representation of generic functions, and can be improved further by using layers of rotations. Product feature maps may induce non-linear mappings between variable(s) ^ and quantum states described by tensor products of separate single-qubit wavefunctions. These states are limited to the subspace of product states. To utilize the power of the entire Hilbert space of the system, approaching the amplitude encoding case, independently distinct amplitudes need to be populated, including the subspace of entangled states. To make the described feature maps even more expressive, it is suggested to enhance the product feature maps (and specifically the layered Chebyshev map) with additional entangling layers represented by Hamiltonian evolution. Namely, after the set of single qubit rotations another unitary operator 920 exp(−i ℋ τ)may be considered which acts for time τ and is generated by the Hamiltonian The sketch of the circuit is shown in Fig.9C. By choosing as a complex many-body Hamiltonian, it is ensured that exponentially many amplitudes are generated. It is known that the quantum simulation of dynamics leads to a volume-like increase of entanglement.In this embodiment, one could choose to have a controllable Hamiltonian, where additional control parameters can encode additional trainable parameters ^^^. Fig.10 is a hardware-level schematic of the actions effectuating the logical operations as defined in a quantum circuit, e.g. DQC quantum circuit. Unitary operators, e.g. those to encode the feature map and derivatives thereof, can be decomposed into a sequence of logical operations. These logical operations are transformations in a quantum Hilbert space over the qubits encoding an input parameter. In order to transform the internal states of these qubits, a classical control stack is used to send pulse information to a pulse controller that affects one or more qubits. The controller may send a sequence of such pulses in time and for each qubit independently. An initialization pulse is used to initialize the qubits into the|0^state 1002. Then, for example a series of single-qubit pulses is sent to the qubit array in 1004, which may apply a single-layer feature map. Additionally, two-qubit or multi-qubit pulse sequences can be used to effectively entangle multiple qubits with a feature map 1006. The duration, type, strength and shape of these pulses determine the effectuated quantum logical operations.1008 indicates a ‘break’ in the depicted timeline, which means the sequence of operations may be repeated in a similar fashion in the direction of the time axis 1012. At the end of the pulse sequences, one or more of the qubits are measured 1010. Fig.11A is a schematic of a a photonic / optical quantum processor which can be used for implementing quantum models comprising trainable feature maps as described with reference to the embodiments in this application. As known from Gan et al, Fock state-enhanced expressivity of quantum machine learning models, EPJ Quantum Technology 2022, https: / / doi.org / 10.1140 / epjqt / s40507-022-00135-0, feature maps for encoding classical features or data may also be implemented based on photonic circuitry. Unitary operators, e.g. those used to encode the quantum feature map and derivatives thereof, can be decomposed into a sequence of optical operations. These optical operations are transformations in the quantum Hilbert space over the optical modes. In order to transform the internal states of these modes, a classical control stack is used to send pulse information to a pulse controller that affects one or more modes. The controller may formulate the programmable unitary transformations in a parametrised way. Initially the modes 1114 are all in the vacuum state 1116, which are then squeezed to produce single-mode squeezed vacuum states 1118. The duration, type, strength and shape of controlled-optical transformations determine the effectuated quantum logical operations 1120 which may define one or more feature maps associated with a first parameterized generator Hamiltonian ^^^^(^), ^^^^ and, optionally, one or more variational quantum circuits (parameterized ansatze) associated with a second parameterized Hamiltoning^^^^^^^. At the end of the optical paths, one or more modes may be measured using a known optical measurement technique 1122, including but not limited to photon-number resolving, a Fock basis measurement , tomography or threshold detectors. Fig.11B is a hardware-level schematic of the actions effectuating the logical operations shown in circuit diagrams specified for a Gaussian boson sampling device. Unitary operators, e.g. those used to encode the quantum feature map and derivatives thereof, can be decomposed into a sequence of optical operations. These optical operations are transformations in the quantum Hilbert space over the optical modes. In order to transform the internal states of these modes, a classical control stack may be used to send information to optical switches and delay lines. The controller may formulate the programmable unitary transformations in a parametrised way. Initially the modes 1126 are all in a weak coherent state, which is mostly a vacuum state with a chance of one or two photons and negligibly so for higher counts. Subsequently, the photons travel through optical waveguides 1128 through delay lines 1130 and two-mode couplers 1132 which can be tuned with a classical control stack, and which determines the effectuated quantum logical operations, which may which may define one or more feature maps associated with a first parameterized generator Hamiltonian and, optionally, one or more variational quantum circuits (parameterized ansatze) associated with a second parameterized Hamiltoning. At the end of the optical paths, one or more modes are measured with photon-number resolving 1134, or threshold detectors. Fig.11C is a hardware-level schematic of the actions effectuating the logical operations specified for a photonic / optical quantum processor. The quantum model can be decomposed into a sequence of optical operations. These optical operations are transformations in the quantum Hilbert space of the photons. In order to transform the internal states of these photons, a classical control stack is used to send information to a universal multiport interferometer. The controller may formulate the programmable unitary transformations in a parameterized way. Initially the photons 1155 are in Fock states, weak coherent states or coherent states. The duration, type, strength and shape of controlled-optical transformations determine the effectuated quantum logical operations 1156 , which may which may define one or more feature maps associated with a first parameterized generator Hamiltonian and, optionally, one or more variational quantum circuits (parameterized ansatze) associated with a second parameterized Hamiltoning. At the end of the optical paths, the modes are measured with photon-number resolving, Fock basis measurement 1157, tomography or threshold detectors. Fig.12 is a hardware-level schematic of the actions effectuating the logical operations shown in circuit diagrams which may be executed on a neutral-atom-based quantum computer. On this type of hardware, unitary operators, e.g. those used to encode the quantum feature map and derivatives thereof, can be decomposed in two different kinds of operations: digital or analog. Both of these operations are transformations in the quantum Hilbert space over atomic states. Schematic (a) of Fig.12 depicts a digital quantum circuit 1238, wherein local laser pulses may be used to individually address neutral atoms to effectuate transitions between atomic states which effectively implement sets of standardized or ‘digital’ rotations on computational states. These digital gates may include any single-qubit rotations, and a controlled-pauli-Z operation with arbitrary number of control qubits. Additionally, such digital gate operations may also include 2-qubit or even multi-qubit operations. Schematic (b) of Fig.12 depicts an analog mode 1246 of operation of a neutral-atom-based quantum computer, wherein a global laser light pulse may be applied to groups of, or all, atoms at the same time, with certain properties like detuning, Rabi frequencies and Rydberg interactions to cause multi-qubit entanglement thereby effectively driving the evolution of a Hamiltonian 1244 of the atomic array in an analog way. The combined quantum wavefunction evolves according to Schrödinger’s equation, and particular, unitary operators ^^=^, where ℋ^denotes the Hamiltonian and ^ the time, can be designed by pulse-shaping the parametrised coefficients of the Hamiltonian in time. This way, a parametric analog unitary block can be applied, which entangles the atoms and can act as a variational ansatz, or a feature map, or other entanglement operation. The digital and analog modes can be combined or alternated, to yield a combination of the effects of each. Schematic (c) of Fig.12 depicts an example of such digital-analog quantum circuit, including digital blocks 12461-3of digital qubit operations (single or multi- qubit) and analog blocks 12481-3, wherein the operations of the digital and / or analog blocks may be used to implement one or more trainable feature maps as described with reference to the embodimebts in this application. It can been proven that any computation can be decomposed into a finite set of digital gates, including always at least one multi-qubit digital gate (universality of digital gate sets). This includes being able to simulate general analog Hamiltonian evolutions, by using Trotterization or other simulation methods. However, the cost of Trotterization is expensive, and decomposing multi-qubit Hamiltonian evolution into digital gates is costly in terms of number of operations needed. Digital-analog circuits define circuits which are decomposed into both explicitly-digital and explicitly-analog operations. While under the hood, both are implemented as evolutions over controlled system Hamiltonians, the digital ones form a small set of pre-compiled operations, typically but not exclusively on single-qubits, while analog ones are used to evolve the system over its natural Hamiltonian, for example in order to achieve complex entangling dynamics. It can be shown that complex multi-qubit analog operations can be reproduced / simulated only with a relatively large number of digital gates, thus posing an advantage for devices that achieve good control of both digital and analog operations, such as neutral atom quantum computer. Entanglement can spread more quickly in terms of wall-clock runtime of a single analog block compared to a sequence of digital gates, especially when considering also the finite connectivity of purely digital devices. Further, digital-analog quantum circuits for a neutral quantum processor that are based on Rydberg type of Hamiltonians can be differentiated analytically so that they can be used in variational and / or quantum machine learning schemes, including the differential quantum circuit (DQC) schemes and the kernel methods as described in this application. In order to transform the internal states of these modes, a classical control stack is used to send information to optical components and lasers. The controller may formulate the programmable unitary transformations in a parametrised way. At the end of the unitary transformations, the states of one or more atoms may be read out by applying measurement laser pulses, and then observing the brightness using a camera to spot which atomic qubit is turned ‘on’ or ‘off’, 1 or 0. This bit information across the array is then processed further according to the embodiments. Fig.13A depicts a system describing a digital-analog implementation of a quantum algorithm. In particular, Fig.13A represents a digital-analog implementation where the qubit interactions can be switched on and off and there exists single-qubit addressability for the application of single-qubit operations. In order to transform the internal states of these qubits, a classical control stack may be used to send information to a controller that affects one or more qubits. The controller may send multiple information carriers (e.g., pulses) in time and for each qubit independently. An initialization protocol may be used to initialize the qubits, in this example into the|0^state 1302. The current example shows only four qubits, but the same principles may be extended in a straightforward manner to systems with more (or less) than four qubits. Then, a trainable quantum feature map may be applied 1304 to encode quantum information, e.g., an input variable, into a Hilbert space associated with the quantum processor. Following application of the trainable feature map, a variational Ansatz may be applied, implemented as a variational quantum circuit 1306. In the current example, the variational Ansatz comprises three single-qubit operations ^^– ^^– ^^with different rotational angles ^^. These single-qubit operations are typically sets of standardized or ‘digital’ rotations on computational states applied to different qubits with different rotation angles / parameters. These digital gates include any single-qubit rotations according to the ^^argument of the rotation. A single rotation / single-qubit gate is not sufficient to perform arbitrary rotation regardless of the parameter / angle since it can only rotate over a single axis. In order to accomplish a general rotation block, three gates in series with different rotation angles / parameters can be used, in this example represented by a block of single- qubit gates 1306. Then, entanglement in this digital-analog approach may be generated by a wavefunction evolution 1308, described by the block e^^ ℋ ^. During this evolution, the qubits are interacting amongst themselves, letting the system evolve for a specified amount of time. This process produces the necessary entanglement in the system. The combined quantum wavefunction evolves according to Schrödinger’s equation, and particular unitary operators ^^= e^^ ℋ ^in which ℋ is the Hamiltonian of the system (for example, for neutral atoms the Hamiltonian that governs the system ℋ =∑^^ ^with ^ being the state occupancy of the Rydberg atoms), and ^ is the evolution time. In this way, a parametric analog unitary block can be applied, which entangles the atoms and can act as a variational Ansatz. After the evolution of the wavefunction 1308, another set of single-qubit gates may be applied, similar to the process described in the block of gates ^^– ^^– ^^1306. Then, the wavefunction may be evolved once more, and finally a measurement in the computational basis occurs as described in 1310. Optionally, additional steps may be included, represented by the ellipses, e.g., before, after, or in between the blocks shown. For example, a different initial state than |0^ may be prepared prior to application of the feature map. Furthermore, the blocks can be executed in a different order, for instance, in some embodiments, block 1308 might precede block 1306. One or more of the blocks 1304–1308, or variations thereof, may be repeated one or more times prior to the measurement 1310. Fig.13B represents a trainable quantum feature map 1512 which applies single-qubit rotations to qubits 1302 with (typically) different rotation angles 1304. In this example, single qubit rotations 1504 (here chosen as ^^(^, ^^(^))) act on each qubit individually and are parametrized by a variable ^ which may be encoded according to one or more enconding functions ^^(^). For a non-linear feature map encoding, the variable ^ may be used as an angle of rotation. Various examples of feature maps have been described above, e.g., with reference to Fig.9A-9C. The application of one rotation operation to each qubit in a register may be referred to as a single layer of rotation operations. This type of encoding of classical information into quantum states wherein a data vector is represented by the angles of a quantum state. This type of encoding can be found in many Quantum Machine Learning algorithms, with the main advantage being that it only requires ^ = log ^^ qubits to encode a dataset of ^ inputs with ^ features each. Thus, considering an algorithm that is polynomial in ^, it has a logarithmic runtime dependency on the data size. Fig.13C illustrates different pulses (potentially differing in pulse duration and / or amplitude / height) that can be sent to the quantum circuit (different qubits) to encode the classical information. The angle of the rotation that is described by the ^^(^) informs the duration and geometry of the pulse. Fig.14A presents a quantum circuit based on a Digital-Analog implementation 1400 that has no single-qubit addressability and uses a wavefunction evolution that can be turned on and off for the entanglement generation. Fig.14A differs from Fig.14A in that it shows a technique known as data re-uploading that alters the trainable quantum feature maps 1404, 1410. Loading classical data into a quantum system is a non-trivial task, and uploading large amounts of data makes it an even more critical issue. However, when the case of big-data is not considered, techniques like data re-uploading can be utilized. As the name suggests, this entails uploading the classical data multiple times, and encode them via rotational angle / parameter encoding into single- qubit rotations throughout the quantum circuit. Such a data re-uploading technique may start by setting the quantum register to an initial state, e.g., the all-zero state 1402, followed by angle encoding that is based on a feature map 1404, in this case a tower feature map. Following that, as already explained above with reference to 1406, three single-qubit gates in series are used to perform a general rotation block that acts as the Ansatz 1406. In this example the encoding is done through the variable of the ^^– ^^– ^^rotations; however, any type of combined rotations of the type (^^, ^^, ^^) could be applied here. Since there is no single-qubit addressability in this example, each ^^and ^^gate is applied at all qubits simultaneously with the same rotation angle ^^. Subsequently, the wavefunction is allowed to evolve for a specified amount of time 1408. Then the classical data are re-uploaded through angle encoding into single- qubit rotations 1410. However, each time the (same) data are uploaded, the information is encoded using different angles than in the previous data uploading steps. For example, the amount of rotation may be doubled in each data (re-)uploading step 1404,1410 (i.e., the rotational angle of the might be increasing as 1–2–4, etc.). Once again, the rotations ^^– ^^– ^^are applied to all qubits simultaneously with the same rotation angle for each single qubit gate, but different than 1406. The classical information can be repeatedly encoded into the quantum feature map through the data re-uploading technique, while changing the angle of the single qubit rotational angle (1404, 1410, etc.) every time after the wavefunction evolution. The resulting quantum feature map can become more expressive as a tower feature map by doing this process of serial data re-uploading with different levels of rotational angles every time the re-uploading is done. Fig.14B illustrates a different (and at current technology levels more realistic) form of a digital-analog implementation. In this implementation, the system has single-qubit addressability, but the wavefunction evolution cannot be turned off, thus staying always on. This system requires less control over the qubit interactions (since they are always on) and only requires single-qubit addressability. The single-qubit gates are applied while the wavefunction evolution (qubit interaction) is also happening. In the shown example, the quantum circuit 1418 starts by encoding information in the |0^ quantum state 1602, followed by a trainable quantum feature map 1405. Then, a variational Ansatz is applied, comprising both wavefunction evolution e^^ ℋ ^1409 and simultaneous application of a block of single-qubit gates 1416. After multiple repetitions of block 1416, each time with different rotational angles at the single-qubit gates, the circuit ends with a measurement in the computational basis 1420. Fig.15A illustrates a quantum circuit 1500 that implements a digital-analog implementation with single-qubit addressability, wherein the wavefunction evolution (e.g., atom interactions) can be turned on and off. This quantum circuit is equivalent to the quantum circuit in Fig.14A, with the time of the wavefunction evolution 1408 being ^ = ^ (in dimensionless coordinates), while all other operations are the same as the ones described in 1300. The same technique of data re-uploading with a tower feature map 1504, 1510 and the same Ansatz comprising single-qubit gates 1506,1512 followed by wavefunction evolution 1508 are used. The reason that such a specific time period for the wavefunction evolution 1508 is selected, is due to the fact that such evolution results in the application of Controlled-Z (CZ) gates between pairs of qubits. The benefit of describing the wavefunction evolution as a set of CZ gates lies in the fact that this Digital-Analog implementation of a quantum circuit resembles the structure of the equivalent Digital quantum circuit, which instead of the operation 1508 performs a set of CNOT gates between pairs of qubits included in the quantum circuit. This allows more straightforward comparisons to be drawn between the Digital and Analog implementation of such feature maps, and to evaluate their relative performance. Fig.15B illustrates a quantum circuit that implements a digital-analog implementation with single-qubit addressability 1518, similar to 1500, but with the entanglement generated via CZ gates between the qubits, resembling the atom interaction / entanglement generation. Fig.16 presents a workflow for generalized circuit differentiation. In Quantum Machine Learning (QML) algorithms, various quantum feature maps and Parametric Quantum Circuits (PQCs) are typically utilised to express the circuit required to solve a particular problem. These quantum circuits contain tuneable parameters that use a classical optimizer to find the optimal values of the parameters that exist for that formulation. The differentiation required for most parameter optimization methods can be achieved in various ways, with the most common one being the Parameter Shift Rule (PSR). An example of such kind of differentiation for quantum feature maps is presented in Fig.10. One way to calculate analytic derivatives of quantum circuits is by measuring overlaps between quantum states. Analytic derivatives can be used for differentiating unitaries like the one presented in 1604, e.g., ^^= e^^ ^ ^^(^,^) / ^generated by arbitrary Hermitian generator ^^. However, in order to have a less resource-intensive method for differentiation, the parameter shift rule (PSR) was proposed. The PSR algorithm can provide analytic gradient estimations through measurement of the expectation values, with quantum circuit operation parameters being shifted to different values. The PSR algorithm is much used to perform differentiation for QML algorithms; however, it is only valid for a specific type of generators, viz., generators that are involutory or idempotent. This is because the full analytic derivative only requires 2 measurements of expectation values (2 unique eigenvalues). Although this simplifies the differentiation protocol, it also restricts it to only work for a certain type of generators. Therefore, as an improvements and generalizations of the PSR algorithm, in 1600 a scheme for a Generalized Parametric Shift Rule (GPSR) algorithm is shown. Such approach allows for differentiating generic quantum circuits with unitaries generated by operators with a rich spectrum (i.e., not limited to idempotent generators). The GPSR algorithm is based on spectral decomposition, and showcases the role of the eigenvalue differences (spectral gaps) during differentiation for the generator spectrum. Such approach works for multiple non-degenerate gaps, in contrast to the PSR that is only valid for involutory and idempotent operators with a single unique spectral gap. A workflow for generalized circuit differentiation can be described as follows: create a quantum circuit that encodes the function ^ similar to 1600 including single- and multi-qubit operations 1602. Pick a unitary operator such as ^^(^) = exp^−i ^ ^^ / 2^1604 that is parametrized by some tuneable parameter ^, and study the spectrum of its generator ^. Then, using unique and positive spectral gaps, a system of equations that includes the spectral information can be created, alongside the calculated parameter shifts, and the measured function expectation values as shifted parameters. The solution of such system can provide the analytical derivative for any general generator G and thus perform GPSR. GPSR is described in more detail in Kyriienko et al., ‘Generalized quantum circuit differentiation rules’, Phys. Rev. A 104 (052417), which is hereby incorporated by reference. The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, various units may be combined in a hardware unit or provided by a collection of interoperative hardware units, including one or more processors as described above, in conjunction with suitable software and / or firmware. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and / or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims

CLAIMS 1. Method for solving a computational problem using a hybrid data processor comprising a classical computer and quantum computer the method comprising: receiving or determining information on one or more quantum circuits defining operations of a parameterized quantum model of a target function, the target function representing an approximate solution to the computational problem, preferably one or more differential equations and one or more associated boundary conditions, the one or more quantum circuits comprising one or more quantum feature maps for encoding one or more classical input features associated with the target function into the Hilbert space of the quantum register, wherein the one or more feature maps include one or more unitary operators defining a time evolution over a Hamiltonian, preferably a generator Hamiltonian, applied to quantum elements of the quantum register, the Hamiltonian evolution being parameterized by a first set of variational parameters and the one or more classical input features, wherein the first set of variational parameters directly act on terms of the Hamiltonian of the one or more unitary operators; and, determining the target function based on the parameterized quantum model and a loss function associated with the computational problem, the determining including varying the first set of variational parameters to determine a set of eigenfrequencies of the Hamiltonian which is optimized for the computational problem, the set of eigenfrequencies defining quantum modes, which the parameterized quantum model can use to determine the target function.

2. Method according to claim 1 wherein varying of the first set of variational parameters includes: translating the operations of the one or more quantum circuits into control signals for controlling and reading out of the quantum elements; applying the operations to the quantum elements based on the control signals; determining classical measurement data by measuring the state of the quantum elements of the quantum register; determining a target function based on the classical measurement data; using the loss function to compute a loss value based on the target function and adjusting the first set of variational parameters based on the loss value.

3. Method according to claims 2 further comprising:repeating the varying of the first set of variational parameters and the determining of a target function based on the classical measurement data until the computed loss value indicates that the target function matches or approximates a solution to the computational problem or until one or more other exit conditions are met.

4. Method according to any fo claims 1-3 wherein the one or more quantum circuit further comprises one or more variational quantum circuits, for example one or more ansatze, wherein the one or more variational quantum circuits are parameterized by a second set of variational parameters but not parameteterized with the one or more classical input features and wherein determining the target function further includes varying the the second variational parameters to determine the contribution of each of the quantum modes to the target solution.

5. Method according to any of claims 1-4 wherein at least part of the first and second variational parameters are adjusted using the same classical optimizer, preferably using a gradient-based optimizer; or, wherein at least part of the first and second variational parameters are adjusted using different classical optimizers 6. Method according to any of claims 1-5 wherein determining the target function further includes: initializing the first set of variational parameters based on the index of the quantum elements the feature map applies to, to create a predetermined initial set of eigenvalues of the Hamiltonian.

7. Method according to any of claims 1-6 wherein the Hamiltonian evolution is parameterized using a function of at least part of the one or more classical input features, preferably a non-linear encoding function, more preferably the non-linear encoding function including one or more Chebyshev polynomials.

8. Method according to any of claims 1-7 wherein the computational problem includes one or more differential equations and wherein one or more derivatives of the target function are determined based on automatic differentiation of the quantum model, preferably using quantum circuit differentiation, preferably based on the generalized parameter shift rules.

9. Method according to any of claims 1-8 wherein the parameterized quantum model comprises one or more differentiable quantum circuits (DQCs), the one or more differentiable quantum circuits including one or more derivative features maps forencoding the one or more derivatives of the target function, wherein the one or more derivative feature maps include one or more unitary operations defining a time evolution over a Hamiltonian applied to quantum elements of the quantum register, the Hamiltonian being parameterized by the first set of variational parameters and the one or more classical input features.

10. Method according to any of claims 1-9 wherein the one or more quantum circuits further comprise one or more further quantum circuits configured to evaluate one or more quantum kernels and one or more derivatives of the one or more quantum kernels, preferalby the one or more further quantum circuits being configured to determine an overlap between a first quantum state associated with a one of the one or more classical input features and the first set of variational parameters and a second reference quantum state, more preferably the overlap being determined based on a Hadamard test or a SWAP test.

11. Method according to any of claims 1-10 wherein the one or more quantum feature maps are configured as operations for analog, analog-digital or digital quantum computers and / or, wherein the quantum computer is implemented based on neutral atom quantum devices, ion-based quantum devices, optical and photonic quantum devices, superconducting quantum devices, silicon based quantum devices, diamond N-V centre quantum devices and / or gaussian boson sampling devices.

12. A system for solving a computational problem, the system comprising a hybrid data processor comprising a classical computer and quantum computer, the system being configured to: receiving or determining information on one or more quantum circuits defining operations of a parameterized quantum model of a target function, the target function representing an approximate solution to the computational problem, preferably one or more differential equations and one or more associated boundary conditions, the one or more quantum circuits comprising one or more quantum feature maps for encoding one or more classical input features associated with the target function into the Hilbert space of the quantum register, wherein the one or more feature maps include one or more unitary operators defining a time evolution over a Hamiltonian, preferably a generator Hamiltonian, applied to quantum elements of the quantum register, the Hamiltonian evolution being parameterized by a first set of variational parameters and the one or more classical input features, wherein the first set of variational parameters directly act on terms of the Hamiltonian of the one or more unitary operators; and,determining the target function based on the parameterized quantum model and a loss function associated with the computational problem, the determining including varying the first set of variational parameters to determine a set of eigenfrequencies of the Hamiltonian which is optimized for the computational problem, the set of eigenfrequencies defining quantum modes, which the parameterized quantum model can use to determine the target function.

13. System according to claim 12 wherein the varying of the first set of variational parameters includes: translating the operations of the quantum circuit into control signals for controlling and readout of the quantum elements; applying the operations to the quantum elements based on the control signals; determining classical measurement data by measuring the state of the quantum register; determining an target function based on the classical measurement data; using the loss function to compute a loss value based on the target function and adjusting the first set of variational parameters based on the loss value.

14. System according to claim 12 or 13 wherein the system is further configured according to any of claims 2-11.

15. A computer program or suite of computer programs comprising at least one software code portion or a computer program product storing at least one software code portion, the software code portion, when run on a hybrid data processing system comprising a classical computer and a quantum computer comprising a hardware quantum register, being configured for executing the method steps according any of claims 1–11.

Citation Information

Patent Citations

  • Solving a set of (NON)linear differential equations using a hybrid data processing system comprising a classical computer system and a quantum computer system

    WO2022101483A1

  • Quantum-kernel-based regression

    WO2023170003A1

Cited By

  • Comprehensive energy system optimal scheduling method based on frequency domain modeling and terminal

    CN120525143A

  • Solving method and system of ferromagnetic-like quantum multi-body model based on score matching

    CN121052399A

  • Coding method and device for quantum optimization solution, program and storage medium

    CN121457653A