Boson sampler parameter configuration

By configuring a boson sampler to determine partial derivatives from a single batch of samples, the method addresses the inefficiencies of conventional gradient determination methods, enhancing the performance of hybrid quantum-classical systems in tasks such as gradient descent and neural network training.

GB2626823BActive Publication Date: 2025-08-20ORCA COMPUTING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
GB2023009657
Authority / Receiving Office
GB · GB
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2025-08-20
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

Conventional methods for determining gradients in quantum subsystems are resource and time intensive, particularly when the number of parameters is large, and often result in inaccurate gradients due to the probabilistic nature of quantum outputs.

Method used

A method for configuring a boson sampler to produce a batch of samples, allowing for the determination of partial derivatives of an objective function with respect to configurable parameters using a single batch of samples, enabling efficient parameter updates in hybrid quantum-classical systems.

Benefits of technology

The method enables efficient and accurate parameter updates in hybrid quantum-classical systems, reducing resource and time requirements for tasks like gradient descent, and facilitating faster training of hybrid neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000001_0000
    Figure 00000001_0000
  • Figure 00000002_0000
    Figure 00000002_0000
  • Figure 00000003_0000
    Figure 00000003_0000
Patent Text Reader

Abstract

A method is provided for configuring a boson sampler. The method comprises operating the boson sampler to produce a batch of samples. The method further comprises determining, from the batch of sample
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to hybrid quantum-classical systems that include a boson sampler, and associated methods for use with such systems. Background

[0002] A boson sampler is a non-universal quantum computer that relies on the interference of photons to generate its output. More particularly, a boson sampler comprises a network of optical components or elements (an interferometer) in which photons interfere with one another. As photons are quantum objects, the output of this network is described by a quantum superposition of all the possible outcomes. When a measurement is performed at the output of this network using one or more photodetectors, a single measurement outcome is realised from this superposition. For example, if photon number resolving (PNR) detectors are used, then each sample or measurement outcome may be described by an array or string or sequence of integers indicating how many photons were found in each output mode of the output state; if threshold detectors are used, then each measurement outcome may be described by an array or string or sequence of integers, for example a binary sequence, indicating whether photons were present or absent in each output mode of the output state. By repeatedly sampling measurement outcomes, one can build up a picture of the probability distribution governing the quantum superposition.

[0003] The photonic superposition states output from an interferometer of a boson sampler can be highly entangled. Accordingly, the output probability distributions generated by a boson sampler may have a complex structure and simulating this sampling task is understood to be intractable classically. Modem supercomputers fail to simulate boson sampler distributions generated from more than a few tens of modes.

[0004] Boson sampling has been shown to be useful in some optimization and machine learning tasks. Accordingly, improved boson sampling systems and methods are of interest. Summary

[0005] According to an aspect of the present disclosure, a method for configuring a boson sampler is provided. The method comprises operating the boson sampler to produce a batch of samples. The method further comprises determining, from the batch of samples, an estimate of a partial derivative of an objective function with respect to a parameter value of a configurable parameter of the boson sampler. Determining the estimate comprises determining from the batch of samples, for each observable of a set of observables, a corresponding first value representative of a partial derivative of the objective function with respect to the expectation value of the observable. Determining the estimate further comprises determining, for each observable of the set of observables, a corresponding second value representative of a partial derivative of the expectation value of the observable with respect to a parameter value of the configurable parameter. Detennining the estimate further comprises determining the estimate from the first values and the second values. The method further comprises configuring the parameter of the boson sampler based on the determined estimate.

[0006] Advantageously, the methods described herein enable parameters of a boson sampler to be updated based on a single batch of samples produced by the boson sampler. This means that some computational tasks, particularly those involving the determination of gradients such as gradient descent, can be performed far more efficiently than other known methods, scaling well with the number of parameters of the boson sampler while still remaining considerably accurate compared to e.g. finite difference methods. Conventional methods typically require multiple, often overlapping, distributions to be sampled in order to determine a single gradient or update a single parameter, which can be slow and inaccurate (due to the difficulty in distinguishing between the multiple distributions unless extremely large numbers of samples are collected).

[0007] The method may further comprise determining, from the batch of samples, a second estimate of a partial derivative of the objective function with respect to a second parameter value of a second configurable parameter of the boson sampler. The method may further comprise configuring the parameter of the boson sampler based on the determined second estimate.

[0008] An observable of the set of observables may comprise a number of photons in an output mode of the boson sampler. In some examples, every observable of the set of observables may comprise a number of photons in a corresponding output mode of the boson sampler.

[0009] An observable of the set of observables may comprise a product of a number of photons in a first output mode of the boson sampler and a number of photons in a second output mode of the boson sampler. In some examples, every observable of the set of observables may comprise either a number of photons in an output mode of the boson sampler or comprise a product of a number of photons in a first output mode and a second output mode of the boson sampler.

[0010] An observable of the set of observables may comprise a parity (e.g. odd or even) of the number of photons in an output mode of the boson sampler.

[0011] In some examples, determining the corresponding first value may comprise determining, from the batch of samples, an expected value of the observable. Determining the corresponding first value may further comprise separating the batch of samples into two groups. For example, a median value for the objective function may be determined from the batch of samples, tire first group may comprise samples that produce an objective function value that is greater than the median value, and the second group may comprise samples that produce an objective function value that is less than the median value. Determining the corresponding first value may further comprise determining, for each group, an average value for the objective function. Determining the corresponding first value may further comprise determining a difference between the average values of the two groups, and determining, from the difference and the expected value of the observable, the corresponding first value.

[0012] In some examples, determining the corresponding first value may comprise generating, from the batch of samples, an affine fit of the objective function with respect to the observables.

[0013] In some examples, determining the corresponding first value may comprise generating, from the batch of samples, a non-linear fit of the objective function with respect to the observables. For example, the non-linear fit may comprise a polynomial fit.

[0014] In some examples, determining the second value may comprise determining the second value from an analytic function of a relationship between the expectation value of the observable and the configurable parameter. In some examples, the analytic function may describe a dependency of the derivative of the expectation value of the observable and the configurable parameter. In some examples, the analytic function may describe a dependency of the expectation value on the parameter and a further numerical method, such as a finite difference method, may be used to determine the second value using the analytic function.

[0015] In some examples, determining the second value may comprise determining the second value from the batch of samples.

[0016] The configurable parameter may comprise an effective transmission coefficient of a reconfigurable beamsplitter of the boson sampler. The configurable parameter may comprise a phase imparted by a phase shifter of the boson sampler.

[0017] According to an aspect of the present disclosure, a (non-transitory) computer-readable medium is provided, the computer-readable medium having instructions stored thereon which, when executed by a processor unit or controller or combination of processor unit and controller communicatively coupled to a boson sample, cause the processor unit and / or controller to perform a method as described herein.

[0018] According to an aspect of the present disclosure, a system is provided. The system comprises a boson sampler and control logic. The control logic is configured to operate the boson sampler to produce a batch of samples. The control logic is further configured to determine, from the batch of samples, an estimate of a partial derivative of an objective function with respect to a parameter value of a configurable parameter of the boson sampler. In particular, the control logic is configured to determine from the batch of samples, for each observable of a set of observables, a corresponding first value representative of a partial derivative of the objective function with respect to the expectation value of the observable; determine, for each observable of the set of observables, a corresponding second value representative of a partial derivative of tire expectation value of the observable with respect to a parameter value of the configurable parameter; and determine the estimate from the first values and the second values. The control logic is further configured to configure the parameter of the boson sampler based on the determined estimate.

[0019] Advantageously, the system is able to update boson sampler parameters in a memory and time efficient manner.

[0020] The boson sampler may comprise a light source, an interferometer and one or more photodetectors. The boson sampler may be a single-photon boson sampler, a Gaussian boson sampler, or a hybrid boson sampler in which some input modes to the interferometer comprise single photons and some input modes comprise Gaussian inputs.

[0021] The system may further comprise processing circuitry coupled to the boson sampler and control logic and configured to provide an artificial neural network (ANN). The control logic may be further configured to train a hybrid neural network (HNN) comprising the boson sampler and the ANN. For example, the HNN may be trained as part of a hybrid GAN. Advantageously, the system is able to train a HNN faster than other hybrid systems and with fewer resources.

[0022] In some examples, the ANN may be configured to receive the observables of a sample as input. For example, the boson sampler may be operated to produce a batch of samples, and the observables of each sample (for example, the number of photons measured in each output mode) may be provided as input to the ANN.

[0023] In some examples, the ANN may be configured to receive as input values derived from the batch of samples. For example, the boson sampler may be operated to produce a batch of samples, the expectation values of each observable may be determined from the batch of samples, and the expectation values may be provided as input to the ANN.

[0024] Many modifications and other embodiments set out herein will come to mind to a person skilled in the art in light of the teachings presented herein. Therefore, it will be understood that the disclosure herein is not to be limited to the specific embodiments disclosed herein. Moreover, although the description provided herein provides example embodiments in the context of certain example combinations of elements, steps and / or functions, it will be appreciated that different combinations of elements, steps and / or functions may be provided by alternative embodiments without departing from the spirit or scope of the disclosure. Brief Description of the Figures

[0025] Illustrative embodiments of the present disclosure will now be described by way of example only, with reference to the accompanying figures.

[0026] Fig. 1 shows a block diagram of a system according to an example.

[0027] Fig. 2 shows a diagram of a spatial boson sampler according to an example.

[0028] Fig. 3 shows a diagram of a temporal boson sampler according to an example.

[0029] Fig. 4 shows a flowchart of a method for updating parameters of a boson sampler.

[0030] Fig. 5 shows a flowchart of a method for determining the first value according to an example.

[0031] Fig. 6 shows a flowchart for a method of solving a QUBO problem.

[0032] Fig. 7 shows a graph of objective function against number of iterations for an example QUBO problem solved using the method of Fig. 6.

[0033] Fig. 8 shows an illustration of a hybrid neural network according to an example.

[0034] Fig. 9 shows a graph of FID against parameter update iterations during training of a hybrid neural network according to an example.

[0035] Throughout the description and the drawings, like reference numerals refer to like parts. Detailed Description

[0036] Embodiments of the disclosure are described with reference to the accompanying drawings. However, it should be appreciated that the disclosure is not limited to the embodiments, and all changes and / or equivalents or replacements thereto also belong to the scope of the disclosure. The same or similar reference denotations may be used to refer to the same or similar elements throughout the specification and the drawings.

[0037] As used herein, the terms “have”, “may have”, “include”, or “may include” a feature (e.g. a number, function, operation, or a component such as a part) indicate the existence of the feature and do not exclude the existence of other features. Throughout the description and claims of this specification, the words “comprise” and “contain” and variations of them mean “including but not limited to”, and they are not intended to (and do not) exclude other components, integers or steps. Throughout the description and claims of this specification, the singular encompasses the plural unless the context otherwise requires. In particular, where the indefinite article is used, the specification is to be understood as contemplating plurality as well as singularity, unless the context requires otherwise.

[0038] As used herein, the terms “A or B”, “at least one of A and / or B”, or “one or more of A and / or B” may include all possible combinations of A and B. For example, “A or B”, “at least one of A or B”, “at least one of A and B” may indicate all of (1) including at least one A, (2) including at least one B, or (3) including at least one A and at least one B.

[0039] As used herein, the terms “first” and “second” may modify various components regardless of importance and do not limit the components. These terms are only used to distinguish one component from another. For example, reference to a first component and a second component may indicate different components from each other regardless of the order or importance of the components.

[0040] It will be understood that when an element (e.g. a first element) is referred to as being (physically, operatively or communicatively) “coupled with / to”, or “connected with / to” another element (e.g. a second element), it can be coupled with / to the other element directly or via a third element. In contrast, it will be understood that when an element (e.g. a first element) is referred to as being “directly coupled with / to” or “directly connected with / to” another element (e.g. a second element), no element (e.g. a third element) intervenes between the element and the other element.

[0041] The terms as used herein are provided merely to describe some embodiments thereof, but not to limit the scope of other embodiments of the disclosure. It is to be understood that the singular forms “a”, “an”, and “the” include plural references unless the context clearly dictates otherwise. All terms including technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the disclosure belong. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealised or overly formal sense unless expressly so defined herein.

[0042] Hybrid quantum-classical systems can provide performance advantages over classical computational systems when performing some types of computational tasks including solving some optimization problems and performing some machine learning based tasks. Many of the tasks with which such systems show an advantage over classical processing systems require the determination of gradients. A key consideration in such computational tasks is how to update the parameters of the quantum subsystem, and this may require determining a gradient with respect to a parameter of the quantum subsystem. However, conventional approaches to deciding how to update the parameters are resource (e.g. memoiy) intensive or time intensive or both, sometimes to the detriment of being able to perform the computational task at all. This problem is particularly acute when the number of parameters of the quantum subsystem are large.

[0043] One conventional approach to determining a gradient of a function with respect to a particular quantum subsystem parameter is to use a finite difference method. For example, the quantum subsystem may be configured with a first set of parameter values and its output evaluated, then the quantum subsystem may be configured with a second group of parameters (in which the particular parameter value of interest is changed by some, ideally infinitesimal, amount) and its output evaluated, and then the gradient may be determined from looking at the two outputs. Accordingly, for eveiy gradient computed, the quantum subsystem needs to be operated for two sets of parameter values. However, for many gradient methods such as gradient descent, the number of gradients that need to be calculated in every iteration is large, and so using a finite difference method scales terribly in both time and memory with the number of tuneable parameters of the quantum subsystem. Furthermore, due to the probabilistic nature of the output of a quantum subsystem, if the difference in two parameter configurations is small, then the quantum subsystem configured with the first group of parameters is likely to produce an output that strongly overlaps the output produced by the quantum subsystem configured with the second group of parameter values, making the gradient veiy difficult to compute. Accordingly, to use a finite difference method may normally only be performed using large differences in parameter values, which in turn means that the computed gradients are less accurate.

[0044] A second conventional approach to determining a gradient of a function with respect to a particular quantum subsystem parameter is to use the parameter-shift rule or the generalised parameter shift rule. Unlike finite difference methods, parameter shift rules can give exact values for each gradient. However, parameter shift rules still require the quantum subsystem to be operated for multiple parameter sets to determine a single gradient, and so scale badly with the size and complexity of the quantum subsystem.

[0045] Advantageously, the methods and systems described herein require the quantum subsystem to be configured and operated with only a single set of parameters to determine a gradient. Further advantageously, the same output from the configured quantum subsystem can be used to determine multiple gradients, making tasks such as gradient descent far more efficient. Accordingly, the methods and systems described herein enable operations to be performed in a less resource and time intensive manner than other methods and hybrid quantum-classical systems.

[0046] Fig. 1 depicts a block diagram of a heterogeneous system 100 in which illustrative embodiments may be implemented. The heterogeneous system 100 comprises both classical processing apparatus and quantum processing apparatus. Other architectures to that shown in Fig. 1 may be used as will be appreciated by the skilled person. For example, system 100 may be distributed across multiple interconnected devices.

[0047] System 100 is an example of a specialised computing apparatus, in which computer usable program code or instructions implementing the processes may be located. In this example, system 100 includes communications fabric 102, which provides communications between a processor unit 104, memory unit 106, input / output unit 108, communications module 110, display 112, and boson sampler 114, the boson sampler comprising a state generation unit 116, an interferometer 118, a state detection unit 120 and a dedicated controller unit 122.

[0048] The system 100 may be implemented in any of a number of ways. For example, the system 100 may be provided as a number of hardware modules suitable for installation in a server / computer rack (for example a conventional 19-inch server rack). For example, the processor unit 104, memory unit 106, input / output unit 108, and communications module 110 may be provided in a first rack-mounted hardware module, tire controller 122 may be implemented in a second rack-mounted hardware module and electronically coupled to the first hardware module, the state generation unit 116 may be implemented in a third rack-mounted hardware module electronically coupled to the controller 122, the interferometer 116 may be implemented in a fourth rack-mounted hardware module electronically coupled to the controller 122 and optical fibre-connected to the state generation unit 116, and the photodetectors of the state detection unit 120 may be provided in another hardware module electronically coupled to the controller 122 and optical fibre-connected to the interferometer module and, optionally, to the state generation unit 116. In other examples, the system 100 may be implemented using one or more separate devices communicatively coupled (at least in part) over a network such as the internet.

[0049] The processor unit 104 is configured to execute instructions for software that may be loaded into the memory unit 106. Processor unit 104 may be a set of one or more processors or may be a multi-processor core, depending on the particular implementation. Furthermore, processor unit 104 may be implemented using one or more heterogeneous processor systems in which a main processor is present with secondary processors on a single chip. The processor unit 104 may comprise one or more central processing units (CPUs), one or more graphics processing units (GPUs) or any combination thereof.

[0050] The memory unit 106 may comprise any piece of hardware that is capable of storing information, such as, for example, data, program code in functional form, and / or other suitable information on a temporary basis and / or a permanent basis. The memory unit 106 may include, for example, a random-access memory or any other suitable volatile or non-volatile storage device. The memory unit 106 may include a form of persistent storage, for example a hard drive, a flash memory, a rewritable optical disk, a rewritable magnetic tape, or some combination thereof. The media used for persistent storage may also be removable. For example, the memory unit 106 may include a removable hard drive.

[0051] Input / Output unit 108 enables the input and output of data with other devices that may be in communication with the system 100. For example, input / output unit 108 may provide a connection for user input through a keyboard, a mouse, and / or other suitable devices. The input / output unit 108 may provide outputs to, for example, a printer.

[0052] Communications module 110 enables communications with other data processing systems or devices. The communications module 110 may provide communications through the use of either or both physical and wireless communications links. For example, the communications module 110 may be configured to communicate with other data processing systems or devices via a wired local area network connection, via WiFi or over a wide area network such as the internet.

[0053] Instructions for the applications and / or programs may be located in the memory unit 106, which is in communication with the processor unit 104 through communications fabric 102. Computer-implementable instructions may be in a functional form on persistent storage in the memory unit 106 and may be performed by processor unit 104. These instructions may sometimes be referred to as program code, computer usable program code, or computer-readable program code that may be read and executed by a processor in processor unit 104. The program code in the different embodiments may be embodied on different physical or tangible computer-readable media.

[0054] The program code may contain instructions which, when processed by the processor unit 104, cause the processor unit 104 to communicate with the boson sampler to sample a bosonic probability distribution.

[0055] In Fig. 1, computer-readable instructions 126 are located in a functional form on computer-readable storage medium 124 that is selectively removable and may be loaded onto or transferred to system 100 for execution by processor unit 104. Alternatively, computer-readable instructions 126 may be transferred to system 100 from computer-readable storage medium 124 through a communications link to communications module 110 and / or through a connection to input / output unit 108. The communications link and / or the connection may be physical or wireless.

[0056] A computer-readable storage medium may be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or any suitable combination thereof. More specific examples of the computer-readable medium include the following: 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’), a portable compact disc read-only memory (CDROM), 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.

[0057] In some illustrative embodiments, computer-implementable instructions 126 may be downloaded over a network to the memory' unit 106 from a remote device for use with system 100. For instance, computer- implementable instructions stored in a remote server may be downloaded over a network from the server to the system 100.

[0058] The boson sampler 114 comprises a state generation unit 116, a linear interferometer 118, a state detection unit 120 and a dedicated (classical) control unit 122. Example boson sampler architectures are described further below in relation to F'g- 2 and Fig. 3.

[0059] The state generation unit 116 is configured to generate an input multimodal photonic state [WIN) comprising a plurality of input modes. The input multimodal photonic state is a product state (in other words, there is no quantum entanglement between input modes) comprising a plurality of N non-vacuum optical inputs distributed across a plurality of M input modes.

[0060] In some examples, the state generation unit 116 may be configured to generate an input multimodal photonic state N} comprising N photons distributed across the plurality of M modes. When the number of photons N is less than or equal to the number of input modes M, and one photon is provided in each of the populated input modes (in which case the boson sampler may be referred to as a single-photon boson sampler), the input state can without loss of generality be expressed as \WIN)Sp — Ili»I2- - 1jv> Ojv+i> ■" >0«) — aj ••• aJjOr, , 0M) (EQ. 1) where aj is the bosonic creation operator in the A'th mode. The skilled person will appreciate that the methods and systems described herein are also applicable when one or more input modes comprise more than one photon.

[0061] In other examples, the state generation unit 116 may be configured to generate an input multimodal photonic state \ WIN) comprising a Gaussian photonic input in each of the N input modes (in which case the boson sampler may be referred to as a Gaussian boson sampler). For example, a single mode squeezed state (SMSS), also referred to as a squeezed coherent state, may be input into each input mode.

[0062] In some examples, the state generation unit 116 may be configured to generate an input multimodal photonic state N) that comprises single photons in some modes and squeezed coherent states in other modes.

[0063] The state generation module 116 may comprise one or more light sources. For example, in a singlephoton boson sampler, the state generation module 116 may comprise a non-linear photonic material (such as periodically-poled lithium niobate (PPLN) or potassium titanyl phosphate (KTP)) configured to receive a pump beam from a pump laser and to probabilistically generate pairs of entangled photons, and may further comprise a photodetector configured to detect a photon of the entangled pair, thereby heralding the presence of the other photon of the pair. For example, in a Gaussian boson sampler, the state generation module 116 may comprise PPLN waveguides configured to generate two entangled modes of light, and a 50:50 beamsplitter for interfering the two modes of light, thereby generating two independent single mode squeezed Gaussian states.

[0064] The interferometer 118 comprises a plurality of optical elements arranged to interfere the modes of the input multimodal photonic state, thereby transforming the input multimodal photonic state to produce an output multimodal photonic state. The interferometer 118 is configured to receive the input multimodal photonic state, to transform the input multimodal photonic state to an output multimodal state, and to output the output multimodal photonic state to the state detection unit 120. The transformation is dependent on tire values {0} of a set of parameters 0 One or more of the parameters G may characterise a single mode operation. For example, a parameter may characterise the phase shift imparted by a phase shifter of a passive linear interferometer. One or more of the parameters Q may characterise a multimodal operation. For example, a parameter may characterise a transmission (or equivalently, a reflection) coefficient of a reconfigurable beam splitter in a passive linear interferometer. If the values {0} of one or more of the parameters 0 may be reconfigured, then the boson sampler is said to be a reconfigurable boson sampler.

[0065] The interferometer 118 may be designed and manufactured in any suitable and desired way e.g. depending on the modes of electromagnetic radiation to be transformed by the interferometer 118. Thus, for example, when the electromagnetic radiation has an optical or infrared wavelength (e.g. between 400nm and 700nm or between 700nm and 1600nm), the optical paths through the interferometer 118 may be implemented at least partially using optical fibres. In some examples, the interferometer 118 may be implemented in bulk optics. However, in other examples, the interferometer 118 may comprise (i.e. is designed and manufactured using) an integrated circuit. In the integrated circuit, the optical paths may be implemented with, for example, a plurality of etched waveguides and plurality of coupling locations arranged in the integrated circuit. At each coupling location, tuneable elements may be arranged (e.g. EOM phase shifters) that are configured to control the coupling interaction between the waveguides. The integrated circuit may be implemented in silicon nitride (Si3N4) or any other suitable material.

[0066] Due to interference between photons in different temporal modes, in operation the boson sampler 114 transforms the input multimodal photonic state (photon sequence) into an output multimodal photonic state that may be expressed as a superposition of the different possible configurations of the photons in the output modes as \<POUT(0)) = (EQ. 2) (o where C is a configuration, nj is the number of bosons in the j th output mode in configuration C, and ac is the probability amplitude associated with configuration C. The skilled person would appreciate that while the state of (EQ. 2) is expressed as a pure state, this is for illustrative purposes only - photon loss may, for example, mean that the output state can be expressed only as a mixed state. By tuning the parameter values {0}, the probability amplitudes associated with each configuration may be changed. Accordingly, a measurement of the number of photons in each output mode can yield a measurement outcome representable as a string of integers corresponding to a configuration C. By operating the boson sampler 114 a number of times to produce a batch of samples S, it is possible to establish an empirical probability distribution of the bosonic configurations of the output state. One can expect that with many samples, the probability pc of obtaining a measurement outcome corresponding to configuration C is approximately given by pc = |ac|2.

[0067] The state detection unit 120 comprises an arrangement of one or more photodetectors configured to detect photons output from the interferometer 118 and produce corresponding detection event signals. In some examples, the photodetectors may comprise photon number resolving (PNR) detectors, capable of determining how many photons are received. For example, the detectors may comprise superconducting nanowire detectors that generate an output signal intensity proportional to the (discrete) number of photons that strike a detector. The PNR detectors may comprise transition edge sensors (TESs). In other examples, tire photodetectors may comprise threshold detectors, also known as on / off detectors. Threshold detectors are not capable of determining how many photons are received but are capable of determining the presence / absence of photons in an output mode.

[0068] The controller 122 is communicatively coupled to the processor unit 104, the state generation unit 116, the interferometer 118 and the state detection unit 120. The controller 122 may be any suitable classical computing resource for controlling the operation of the boson sampler 114. In some examples, the controller 122 is implemented in a dedicated, application-specific processing unit. For example, the controller 122 may comprise an application-specific integrated circuit (ASIC) or an application-specific standard product (ASSP) or another domain-specific architecture (DSA). Alternatively, the controller 122 may be implemented in adaptive computing hardware (in other words, hardware comprising configurable hardware blocks / configurable logic blocks) that has been configured to perform the required functions, for example in a configured field programmable gate array (FPGA). The controller may have a dedicated random-access memory or other memory element for temporarily logging data. In some examples, the functionality of the controller 122 may be incorporated into the functionality of the processor unit 104.

[0069] The controller 122 is configured to receive instructions from the processor unit 104. More particularly, the controller is configured to, if so directed by the processor unit 104, configure the interferometer 118 according to a set of parameter values [0} and thereby control the transformation of the input multimodal photonic state that is implemented by the interferometer 118. For example, the controller 122 may directly send control signals that tune the reflectivity / transmittance of a reconfigurable beam splitter or the phase imparted by a phase shifter. The controller 122 is further configured to, if so directed by the processor unit 104, generate one or more control signals to cause the state generation unit 116 to produce an input multimodal photonic state. The controller 122 may optionally be able to control which input multimodal photonic state is input into the boson sampler, for example by generating one or more control signals to control a number of photons in each input mode. For example, in a photonic boson sampler in which the state generation module comprises a plurality of single photon sources, the controller 122 may be able to generate one or more control signals to cause a selected number of photons to be emitted at a particular time point.

[0070] The controller 122 is further configured to receive a response from the state detection unit 120. More particularly, the controller 122 is configured to receive measurement outcomes from the photodetectors of the state detection unit 120. In other words, the controller is configured to sample from the output distribution of the configured boson sampler. For example, the measurement outcomes may comprise an electrical signal from each photodetector at which a detection event occurs. In examples wherein the photodetectors are PNR detectors, the electrical signals may further be indicative of the number of photons received.

[0071] The controller 122 is further configured to communicate the response from the state detection unit 120 to the processor unit 104.

[0072] In operation, the boson sampler 114 is configured to receive parameter values from the processor unit 104; to produce a batch (in other words, a plurality7) of samples by configuring the interferometer 118 according to the received parameter values, generating an input photonic state and measuring an output photonic state; and to communicate the batch of samples to the processor unit 104.

[0073] The skilled person would appreciate that the architecture described above in relation to Fig. 1 is not intended to provide limitations on the computing devices with which the methods described herein may be implemented. Instead, the skilled person would appreciate that other architectures may be applicable. For example, the computing device may include more or fewer components.

[0074] The boson sampler 114 of Fig. 1 may comprise a spatial mode interferometer, such as the single-photon boson sampler 114a illustrated in Fig. 2. In the boson sampler 114a of Fig. 2, the modes of the input multimodal photonic state are spatial modes - that is, the state is defined by the number of photons in each of a plurality of spatially distinct paths. The boson sampler 114a may be implemented, at least in part, in a photonic integrated circuit.

[0075] The state generation unit 116a of Fig. 2 comprises a plurality of single-photon sources 210 configured to produce single photons. One suitable photon source technology is spontaneous parametric down-conversion (SPDC). In SPDC, a non-linear crystal is pumped with a laser and, probabilistically, entangled photons are emitted (the “signal” and the “idler”). A photodetector (not shown in Fig. 2) is arranged to detect the presence of the idler photon which, due to the entanglement, heralds the presence of a photon in the signal mode. Other photon sources may also be used, for example solid state photon sources and quantum dots.

[0076] The number of single photon sources 210 may be greater than the number M of input modes of the input multimodal photonic state ^IN) in order to account for the fact that single photons may be generated only probabilistically. The state generation unit 116a of Fig. 2 comprises a multiplexer 220 to route successfully generated single photons to N input ports of the M input ports of the interferometer 118a. In the example shown in Fig- 2, the number of single photons N is equal to the number of input ports M of the interferometer 118a.

[0077] The interferometer 118a comprises M input ports, M output ports, and a plurality of waveguides arranged to pass through the interferometer 118a to connect the M input ports to the M output ports. The plurality of waveguides are arranged to provide a plurality of coupling locations between pairs of the plurality of waveguides. The interferometer 118a may be designed and manufactured in any suitable and desired way e.g. depending on the modes of electromagnetic radiation to be transformed by the interferometer. Thus, for example, when the electromagnetic radiation has an optical or infrared wavelength (e.g. between 400nm and 700nm or between 700nm and 1600nm), the waveguides may comprise optical fibres. In some examples, the interferometer may be implemented in bulk optics. However, in other examples the interferometer comprises (i.e. is designed and manufactured using) an integrated circuit, with the plurality of waveguides and plurality of coupling locations arranged in the integrated circuit. The integrated circuit may be implemented in silicon nitride (Si3N4) or any other suitable material, for example thin-film lithium niobate.

[0078] A reconfigurable beam splitter 230 is arranged at each of the coupling locations such that at each coupling location the two modes of electromagnetic radiation carried by the two respective waveguides are capable of coupling with each other with a reconfigurable reflection coefficient (transmission coefficient). The reflection (transmission) coefficient of each reconfigurable beam splitter is denoted with a theta in the figure.

[0079] A parametrised / reconfigurable beam splitter is understood to mean any tuneable element or device or tuneable collection of elements / devices capable of coupling two modes of electromagnetic radiation with each other with a reconfigurable reflection / transmission coefficient and optionally a reconfigurable phase shift coefficient (not indicated in Fig. 2). The parametrised beam splitters may be implemented in any suitable way -for example a parametrised beam splitter may comprise a Mach-Zehnder type interferometer containing a variable phase shifter in one internal path for controlling the effective beam splitter reflection coefficient of the Mach-Zehnder interferometer. The Mach-Zehnder interferometer may further comprise an external phase shifter on one external path of the Mach-Zehnder interferometer to control the relative phases of the two mode acted upon. For example, when the interferometer 118a is implemented in an integrated circuit, a reconfigurable beamsplitter may comprise a first waveguide coupling region for coupling the electromagnetic radiation modes in each waveguide, an electro-optical phase shifting element for adjusting the phase in one of the outgoing waveguides from that coupling region, and a second waveguide coupling region for recoupling the two electromagnetic modes output from the first waveguide coupler. For example, when implemented in bulk or fibre optics, a reconfigurable beamsplitter may comprise two 50 / 50 beamsplitters and a phase shifter element arranged therebetween.

[0080] The interferometer 118a may further comprise reflective elements (e.g. mirrors) and other passive photonic elements (not shown). Accordingly, the interferometer 118a couples the single photons received at the M input ports to the plurality of M output ports based on operations defined by a set of parameter values.

[0081] The interferometer 118a of Fig- 2 is suitable for transforming an input multimodal photonic state comprising M input spatial modes to an output multimodal photonic state comprising M output spatial modes. The skilled person will appreciate that other architectures for the interferometer 118a may be utilised. Of course, while in the illustration the number of input and output modes is M = 4, an interferometer 118a may be provided to operate on a greater number of spatial modes. Of course, the interferometer 118a may comprise any number of reconfigurable / parametrised elements and in any configuration that leads to interference between spatial modes.

[0082] The state detection unit 120a comprises a plurality of photon number resolving (PNR) photodetectors 240, each arranged to receive any photons output from a corresponding output port of the interferometer 118a. The state detection unit 120a comprises one PNR detector for each of the M output modes and accordingly the measurement outcomes are representative of the number of photons measured in all output modes of the output multimodal photonic state. The PNR detectors may comprise nanowire photodetectors.

[0083] The controller 122a is coupled to each of the state generation unit 116a, the interferometer 118a and the state detection unit 120a. The controller 122a is further communicatively coupled to the processor units 104. The controller 122a may receive a set of parameter values from the processor unit 104, and may generate control signals to configure the tuneable elements 230 of the interferometer 118a in accordance with those parameter values. For example, each reconfigurable beam splitter 230 may comprise a Mach-Zehnder interferometer comprising two 50 / 50 beam splitters and a phase shifter located in each of one or both of its internal optical paths. The phase shifter may be implemented using an electro-optical modulator. The control signals may comprise an electric field for controlling the phase shift imparted by the internal phase shifters and therefor the coupling strength of the reconfigurable beam splitter. The controller 122a may further generate a control signal to cause the single photon sources 210 to begin generating single photons, for example the control signal may cause a pump laser to pump light into the non-linear material of the single-photon sources 210. The controller 122a may further receive signals from each of the PNR detectors 240 indicative of the number of photons detected at each of the PNR detectors 240, which may be interpreted as a sample of the output probability distribution produced by the boson sampler 114a. The controller 122a may then communicate the sample information to the processor unit 104.

[0084] The boson sampler 114 of Fig. 1 may comprise a temporal mode interferometer, such as the singlephoton boson sampler 114b illustrated in Fig. 3. In the boson sampler 114b of Fig. 3, the modes of the input multimodal photonic state are temporal modes, which means that the state is defined by the number of photons in each of a plurality of temporal modes or time bins.

[0085] The state generation unit 116b of Fig. 3 comprises a single-photon source 310 operable to produce a single photon in each of a plurality of time bins, so that each photon enters the time-bin interferometer 118b separated from the next by a duration t. As in the boson sampler 114a of Fig. 2, the state generation unit 116a may comprise further single photon sources and a multiplexer in order to reliably ensure that a single photon is generated in each time period t.

[0086] The interferometer 116b comprises a temporal mode coupling device. In particular, in Fig. 3, a temporal mode coupling device comprises a reconfigurable beam splitter 320 and a delay line 330. The delay line 330 is arranged to connect one input port of the reconfigurable beam splitter 320 with one output port of the reconfigurable beam splitter 320. The delay line may comprise, for example, optical fibre. The delay line 330 has a length ct where c is the speed of light in the fibre. In this way, the field of the photon in one temporal mode may be coupled, at least partially, into the delay line 330 so as to interfere with photons in the next temporal mode on the parametrised beam splitter 320. The time-bin interferometer may comprise further optical components including further optical switches.

[0087] The controller 122b is configured to tune the parameter value (e.g. transmittance) of the parametrised beam splitter 320 for each time interval. For example, for four input modes, the temporal mode coupling device can be used to implement the equivalent operations of the three beam splitters defined by parameters 62 and 03 shown in Fig. 2. For example, the controller 122b may, as a first photon is emitted from the photon source 310, configure the reconfigurable beamsplitter 320 to loop the first photon into the delay line 330. The controller 122b may then, as a second photon is emitted from the photon source 310, configure the reconfigurable beamsplitter 320 using parameter value to cause interference between the first temporal mode and second temporal mode (e.g. the first and second photon) of the input state ^IN). The controller 122b may then, as a third photon is emitted from the photon source 310, configure the reconfigurable beamsplitter 320 using parameter value 02 to cause interference between the second temporal mode and third temporal mode. The controller 122b may then, as a fourth photon is emitted from the photon source 310, configure the reconfigurable beamsplitter 320 using parameter value 03 to cause interference between the third temporal mode and fourth temporal mode. This may continue until a predetermined transformation has been performed on the input photon sequence of M time bins.

[0088] The state detection unit 120b comprises a photon number resolving (PNR) photodetector 340 configured to detect the number of photons in each temporal mode. By measuring the number of photons in each of M time bins output from the interferometer 118b, the boson sampler 114b takes a sample of the output distribution.

[0089] The skilled person would appreciate that the architecture of the temporal mode boson sampler 114b of Fig. 3 may be varied in several ways. For example, the boson sampler 114b may comprise further reconfigurable beamsplitters 320 and further delay lines 330 in order to generate more complicated interference between temporal modes. The skilled person would further appreciate that delay lines of different lengths may be used to vary which temporal modes are interfered with one another. In other temporal mode boson samplers, the temporal mode coupling device may comprise a quantum memory that may be controlled to selectively interfere photons in different temporal modes.

[0090] The skilled person would appreciate that the spatial mode boson sampler of Fig. 2 and the temporal mode boson sampler of Fig. 3 may further be operable as Gaussian boson samplers with a suitable substitution of the state generation unit 116a / 1 16b. Furthermore, the PNR detector(s) of the state detection modules 120a / 120b may be replaced with threshold detectors, in which case the measurement outcomes output from the state detection unit are indicative of the presence or absence of photons in each output mode but not the number of photons in output modes. The PNR detector(s) may be replaced with pseudo-threshold detectors.

[0091] The hybrid quantum-classical system 100 of Fig. 1 is configured to perform the method 400 depicted in the flowchart of Fig. 4. The skilled person will appreciate that while the method 400 is discussed with reference to the system 100 specifically, other hybrid quantum-classical architectures comprising a (classical) processor unit and a configurable boson sampler may also be configured to perform the method 400.

[0092] At 410, the method comprises operating the boson sampler 114 to produce a batch of samples S. With reference to Fig- 1, processor unit 104 may , during the course of executing instructions loaded from the memory unit 106 or elsewhere, require a bosonic probability distribution to be sampled. The processor unit 104 may define a first set of parameter values {0} for assigning to parameters of the boson sampler 114 and may instruct the controller 122 to operate the boson sampler in accordance with that first set of parameter values. The controller 122 may accordingly configure the interferometer 118 according to the received parameter values, generate control signals to cause the state generation unit 116 to produce an input multimodal photonic state, and receive detection event signals from the state detection unit 120 which can be inteipreted as integer strings representative of samples or measurement outcomes. The controller 122 may communicate the samples to the processor unit 104.

[0093] At 420, the method comprises determining, from the batch of samples S, an estimate (denoted herein as E) of a partial derivative of an objective function (denoted herein as / ) with respect to a parameter value (denoted herein as 0k) of a configurable parameter of the boson sampler 114. The choice of objective function f may be selected based on the task to be processed by the system 100, and some examples are provided further below. The choice of objective function f may be encoded into executable instructions to be processed by the system 100, for example a software program executed by the system 100 may define the objective function f.

[0094] Determining the estimate E comprises determining from the batch of samples S, for each observable Oj of a set of observables {0}, a corresponding first value V± (Oj) representative of a partial derivative of the objective function with respect to the expectation value of the observable {Oj). In other words, the first value V^Oj) for the observable Oj is approximately: MOj) df d{Oj) (EQ. 3)

[0095] Determining the estimate E further comprises determining, for each observable Oj of the set of observables {0}, a corresponding second value V2(Oj) representative of a partial derivative of the expectation value of the observable {Oj) with respect to a parameter value 0k of the configurable parameter of the boson sampler 114. In other words, the second value V2{Oj) for the observable Oj is approximately: d(0,)

[0096] Determining the estimate E further comprises determining the estimate from the first values V, and the second values V2. For example, the estimate of the partial derivative of the objective function f with respect to the parameter value 0k may be determined as a weighted or unweighted sum over the product of the first values and second values, for example: E ^CjVAOj^Oj^^ j j df d{Oj) d{Oj) dek (EQ. 5) where Cj is a coefficient. In some examples, the coefficients Cj may be equal and the sum may be unweighted.

[0097] The term “observable” as used herein is understood to mean a quantity determinable directly or indirectly (for example using a deterministic function) from a sample of the output of a boson sampler. The choice of the set of observables {0} may, however, depend on the objective function used, for example, how well the function f can be decomposed into or represented by the set of observables {0}. The choice of the set of observables may depend on the configurable parameter to be optimised, for example on how quickly the second values K2 may be calculated.

[0098] As an example used herein, the set of observables {0} may comprise marginal output distributions of the boson sampler 114, determined from the photon number in each output mode of the output distribution of the boson sampler. More precisely, in some examples at least one observable Oj of the set of observables {0} may comprise a number of photons in an output mode g of the output multimodal photonic state ({Oj) = {ng) ) as determined from the batch of samples S collected at 410. If every observable of the set of observables corresponds to a number of photons in a corresponding output mode of the output multimodal photonic state, then this may be considered as a first order approximation of the output probability distribution produced by the boson sampler 114. In some examples, at least one observable Oj of the set of observables {0} may comprise a product of a number of photons in an output mode g and an output mode h of the output multimodal photonic state ({Oj) = {ngnh)) as determined from the batch of samples S collected at 410. In some examples, every observable of the set of observables may comprise either a first order value (a number of photons ng in an output mode g) or a second order value (a product of a number of photons ngnh in two output modes g and h). For example, the estimate E (EQ. 5) may be given by: M df 0{ng) y df d{ngnh) d{na) d6k d{nanh) d9k 1 g,h a (EQ. 6) where M is the number of modes in the output multimodal photonic state. Of course, in some examples, the estimate may include higher order terms. In some examples, at least one observable Oj of the set of observables {0} may comprise a product of a number of photons in an output mode g and an output mode h and an output mode i of the output multimodal photonic state ({Of) = {11^^1)) as determined from the batch of samples S collected at 410. Other examples of observables include, for example, the parity (odd or even) of the number of photons in output modes.

[0099] Examples of determining the estimate of the partial derivative of the objective function with respect to a parameter value of a configurable parameter of the boson sampler will be described further below.

[0100] With reference again the Fig- 1, the processor unit 104 may receive the batch of samples S from the controller 122 of the boson sampler 114 and execute instructions loaded from the memory unit 106 or elsewhere to perform the task of determining the estimate of the partial derivative of the objective function f with respect to a parameter value of a configurable parameter of the boson sampler 114.

[0101] At 430, the method comprises configuring the parameter of the boson sampler 114 based on the determined estimate. With reference to Fig-1, processor unit 104 may, during the course of executing instructions loaded from the memory unit 106 or elsewhere, define a second set of parameter values {0'} for assigning to parameters of the boson sampler 114, the second set being similar to the first set but with a new parameter value 0k assigned to the configurable parameter for which the estimate was determined at 420. For example, the updated parameter value may be given by: 0'k = 0k- (EQ. 7) where rj is a coefficient known as the learning rale. The processor unit 104 may instruct the controller 122 to configure the boson sampler 114 according to the second set of parameter values.

[0102] The skilled person will appreciate that while only a single parameter value 0k is updated in the description of the method 400 described above, further parameter values may be updated at the same time. A single batch of samples may be collated at 410. Multiple estimates (corresponding to different configurable parameters of the boson sampler 114) may be computed at 420. At 430 multiple parameters of the boson sampler 114 may be configured based on the multiple determined estimates, for example the second set of parameter values {0'} for assigning to parameters of the boson sampler 114 may comprise several updated parameter values. The method 400 may accordingly be used to advantageously perform gradient descent methods based at each step on one batch of samples from the boson sampler.

[0103] The first values may be determined from the batch of samples S in a number of ways.

[0104] A first method for determining the first values from the batch of samples S is described in relation to Fig. 5 Fig. 5 shows a flowchart of a method 500 for determining a first value (OQ for a particular observable Oj. The method may be performed by, for example, the processor unit 104 of system 100.

[0105] At 510, the method comprises determining, from the batch of samples S, an expectation value for the observable {Oj). For example, the observable value Oj{s) may be determined for each individual sample s of the batch of samples 5, and the expectation value may be determined from those observable values.

[0106] At 520, the method comprises determining, from the batch of samples S, an average value for the objective function f. In some examples, the average may be a median. For example, each sample s may be provided as an argument to the obj ective function f to produce a function value f (s), and an average value fave (S) may be determined from those function values. The skilled person will appreciate that steps 510 and 520 may alternatively be performed in reverse or at substantially the same time.

[0107] At 530, the method comprises separating the samples into two groups. The first group 5 Comprises those samples (denoted s+) that produce a function value f(s+) that is greater than or equal to the average value determined at 520. The second group S comprises those samples (denoted s-) that produce a function value f{s—) that is less than the average value determined at 520. In other examples, the first group S+ comprises those samples that produce a function value f{s+) that is greater than the average value determined at 520 and the second group S’- comprises those samples that produce a function value f(s—) that is less than or equal to the average value determined at 520.

[0108] At 540, the method comprises determining a difference between the average values of the objective function for the first group fave^+} and the second group fave(S~)-

[0109] At 550, the method comprises determining the first value V^Oj) from the difference determined at 540 and the expectation value for the observable {Oj}. In particular, the first value may be determined as: (EQ. 8)

[0110] A second method for determining the values Vx may comprise determining, from the batch of samples S, an affine fit of the observables to the objective function. For example, the processor unit 104 may perform a linear regression. More particularly, the function value f(sk) and observable value O;(sk) may be determined for each sample sk of the batch of samples and the assumption is made that F(S)=XB+A, (EQ. 9) where F(S) = ... (EQ. 10) K is the number of samples in the batch of samples S, the superscript T represents matrix transposition, / 1 O / sJ _ Or(si)\ ^ = (1 01 . ^^)^ (EQ. 11) \1 0,(¾) Or(sK) / r is the number of observables in the set of observables, and B and A represent vectors of coefficients having length K (corresponding to the number of samples in the batch of samples). The vectors B and A may be determined using, for example, a least squares method. The first values 14 (Oj) may be determined directly from coefficients of the resolved B vector as: V^Oj^Bj^. (EQ. 12)

[0111] The second values F2 may be determined in a number of ways. In particular, the choice of observables may be made to make determination of the second values a computationally easy task. In some examples, the second values may be determined fully analytically or from an analytic function of the relationship between the expectation value of the observable (Oj) and the configurable parameter.

[0112] For example, if every expected value of an observable (Oj) of the set of observables comprises either a first order value (an expected number of photons (ng) in an output mode g) or a second order value (an expected product {ngnh) of a number of photons in two modes g and h, then the expected value of every observable may be determined analytically for a given set of parameter values {0}. Accordingly, determining the second value 14 (Oj) representative of a partial derivative of the expectation value of the observable with respect to a parameter value 9k of the configurable parameter may be determined analytically or may be determined using, for example, a finite difference model in which the outputs of the analytic function for two different arguments are compared, for example: .. (0)(¾+ / 0)-(0 / ¾)) (EQ. 13) V2(Uj) - h ’

[0113] In another example, an analytic function describing between the partial derivative of the expectation value with respect to the parameter as a function of the parameter value may be used to determine the second value. In other examples, the second values may be determined from the batch of samples.

[0114] The methods described above for updating parameters of a boson sampler can advantageously used to speed up computational tasks that require the calculations of gradients, for example gradient descent methods, because a single batch of samples is used to determine estimates of the gradients of an objective function with respect to multiple parameters of the boson sampler. It is demonstrated below that a system 100 (configured to perform the method 400) may advantageously converge on accurate solutions in a fast and resource-efficient manner.

[0115] As a first example, the system 100 (configured to perform the method 400) may be further adapted to find a solution to a Quadratic Unconstrained Binary Optimization (QUBO) problem. The task is to find a binary sequence bopt of length M that minimises the target function: bTQb (EQ. 14) where Q is an M x M symmetric matrix and b is a binary sequence determined from samples from a configured boson sampler. In this example, each observable comprises a number of photons nk measured in a corresponding output mode k of the boson sampler. Fig. 6 shows a flowchart of a method 600 to find a solution to the QUBO problem using the system 100.

[0116] At 610, the method 600 comprises initialising a plurality of parameter values {0} of the boson sampler 114. For example, processor unit 104 may utilise a random number generator to produce a random selection of parameter values.

[0117] At 620, the method 600 comprises operating the boson sampler 114 to produce a batch of samples S. The processor unit 104 may instruct the controller 122 to operate the boson sampler 114 in accordance with the set of parameter values {0} to produce a batch of samples S representative of the output distribution of tire boson sampler 114. Each sample s may comprise, for example, a string of integers indicative of the number of photons received in each output mode of the output multimodal photonic state (EQ. 2). The processor unit 104 may then map each sample to a binary sequence. For example, if an integer of the string of integers is odd, then a corresponding element of the binary sequence may be determined to be 1, while if an integer of the string of integers is even, then a corresponding element of the binary sequence may be determined to be 0 (or vice versa). Multiple integer sequences may map to the same binary string, for example (3,0,1,0) and (1,2,1,0) may both map to a binary sequence (1,0,1,0) when a parity mapping is used. Other mappings may be used (for example, based on the presence or absence of photons in each output mode) as would be appreciated by the skilled person.

[0118] After mapping each sample of the batch of samples S to a binary sequence, the resulting binary sequences can be used to determine a weighting / empirical probability wb for each binary sequence b of length M that was represented by the batch of samples S'. One can then define an objective function: (EQ-15) b

[0119] At 630, the method 600 comprises, for at least one parameter value 0k of the set of parameter values, determining, from the batch of samples S, an estimate (denoted herein as E) of a partial derivative of the objective function (EQ. 15) with respect to the parameter value. As described above in relation to Fig. 4 determining the estimate E comprises determining from the batch of samples, for each observable (in this example the number of photons in each mode ng) of a set of observables {na}, a corresponding first value ^(ng) representative of a partial derivative of the objective function with respect to the expectation value of the observable. Determining the estimate E further comprises detennining, for each observable ng of the set of observables a corresponding second value V2 (ng) representative of a partial derivative of the expectation value of the observable with respect to the parameter value 9k of the configurable parameter. Determining the estimate E further comprises determining the estimate from the first values Vj and the second values V2.

[0120] At 640, the method 600 comprises updating the set of parameter values {0} based on the determined estimated gradients. In particular, the processor unit 104, may establish an updated set of parameter values {6'} using for example (EQ. 7).

[0121] At 650, the method 600 comprises determining whether a stopping condition has been satisfied. Any suitable stopping condition may be utilised. For example, determining that a stopping condition has been satisfied may comprise determining that the set of parameter values have been updated a threshold number of times, for example that a threshold number of epochs or iterations has been reached. The threshold number of iterations may be selected in advance by a user of system 100. As another example, a stopping condition may comprise a convergence criterion. Determining that a convergence criterion has been met may comprise determining that the objective function (EQ. 14) has not changed more than a threshold amount between updates of the parameter values. As another example, determining that a convergence criterion has been met may comprise evaluating a function of the weightings of the binaiy sequences, such as an entropic measure of the weightings, and determining that the function is less than or greater than a predetermined threshold value. If the stopping condition has not been satisfied, the method returns to step 620. If the stopping condition has been satisfied then the method proceeds to step 660.

[0122] At 660, the method 600 comprises operating the boson sampler 114 with the converged set of parameter values to produce a new batch of samples.

[0123] At 670, the method 600 comprises evaluating the target function (EQ. 14) for each distinct binary sequence represented in the batch of samples. In particular, the processor unit 104 may map each distinct sample to a binary sequence, and subsequently evaluate the target function for each distinct binary sequence.

[0124] At 680, the method 600 comprises identifying, from the evaluations performed at 670, a solution to the optimisation problem.

[0125] Fig. 7 shows a graph illustrating how the objective function (EQ. 15) varies with the number of updates (iterations) for a specific QUBO problem that was tested by the inventors. As can be seen in the figure, the method 600 successfully converges on a solution. This demonstrates that the system 100 is able to efficiently performing gradient descent over the parameters of the boson sampler 114 to solve a QUBO problem.

[0126] As a second example, the system 100 (configured to perform the method 400) may be further adapted to train a hybrid neural network (HNN). For example, the processing unit 104 may include or be coupled with processing circuitry configured to provide an artificial neural network (ANN). The memory unit 106 may be configured to store data files for use by processor unit 104 or processing circuitry such as trained weights and biases for an artificial neural network, and information concerning the configuration of the ANN. The processor unit 104 may comprise control logic configured to train the boson sampler parameters and the ANN together as a hybrid neural network.

[0127] Referring to Fig. 8, a hybrid neural network 800 comprises a boson sampling layer 810 and a classical artificial neural network (ANN) 820.

[0128] Generally speaking, an artificial neural network (ANN) is a method of function approximation loosely modelled on an animal brain, and comprising a plurality' of nodes known as neurons, a plurality of connections between the nodes, and a plurality of weights and biases associated with the neurons and neuron-to-neuron connections therebetween. Each neuron is configured to receive one or more inputs and to provide those one or more inputs as weighted argument(s) to a non-linear transfer function that provides the neuron’s output. The transfer function is sometimes known as an activation function. The weightings of the inputs of the activation function are defined by the weights and biases associated with that neuron and its connections. The activation function may be, for example, the sigmoid activation function, the tanh activation function, or the rectified linear (ReLu) activation function.

[0129] The neurons are typically arranged in layers, such as visible layers including input and output layers, and hidden layers. The outputs of neurons in the input layer and each hidden layer are provided as inputs to a subsequent layer or layers, and the output layer produces the output of the network. Accordingly, the ANN receives a plurality of input values and converts them to a plurality of output values / results.

[0130] The boson sampling layer 810 is provided by the boson sampler 114, and in place of artificial neurons the boson sampler 114 has configurable parameters. For example, the processing unit 104 and controller 122 may configure the interferometer 118 according to a set of parameter values {0}. and operating the boson sampler to produce a batch of samples. The processor unit 102 may further determine, from each sample s of the batch of samples S, a value for each observable O^s), O2(s) to 0r(s) of the set of observables {0}.

[0131] The ANN 820 comprises an input layer 830, a hidden layer 840, and an output layer 850. The input layer 830 comprises a first plurality of neurons 830-1 to 830-r, the hidden layer 840 comprises a second plurality of neurons 840-1 to 840-v, and the output layer 850 comprises a third plurality of neurons 850-1 to 850-w. While only a single hidden layer is shown in Fig. 8, the skilled person would appreciate that an ANN may have several hidden layers between the input layer 830 and output layer 850. The number of neurons in each layer may be the same or different. Furthermore, while every neuron in a layer is connected to every neuron in the next layer in the ANN 820, the skilled person will appreciate that each neuron may be connected to fewer neurons of the next layer, or may be connected to a neuron in the same layer or a preceding layer. The activation function implemented by each neuron may be, for example, the sigmoid activation function, the tanh activation function, or the rectified linear (ReLu) activation function.

[0132] The ANN 820 is configured to receive as input a sample output from the boson sampling layer 810. More particularly, the determined observables O^s), O2(s) to 0r(s) for the sample are provided to the neurons of the input layer 830. The neurons 830-1 to 830-r of the input layer 830 are each configured to take a corresponding observable value as input, to provide that value as an argument to the neuron’s activation function, and to output the result to neurons of the hidden layer 840. The neurons 840-1 to 840-v of the hidden layer 840 are each configured to receive inputs from the preceding layer (in this example the input layer 830), to provide those inputs as weighted arguments to the neuron’s activation function, and to output the result to neurons of the output layer 850. The neurons 850-1 to 850-w of the output layer are each configured to receive inputs from the preceding layer (in this example the hidden layer 840), to provide those inputs as weighted arguments to the neuron’s activation function, and to output the result.

[0133] The output values y^ to yw of the neurons of the output layer 850 provide the output of the HNN 800 and may be used to represent any dataset of interest. For example, the HNN 800 may be configured to generate synthetic or artificial data, and as such may be referred to as a generator network. In some examples, the output values may be collectively interpretable as an image, for example, the output values yr to yw of the neurons of the output layer 850 may comprise pixel values and accordingly, the HNN 800 may be configured to generate an artificial / synthetic image.

[0134] The skilled person will appreciate that the neural network architecture of an ANN compatible with the disclosures herein may be different to that shown in Fig. 8. For example the ANN may comprise one or more convolution layers, one or more max-pool layers, and / or a soft-max layer, and may include skip connections.

[0135] A hybrid neural network needs to be trained in order to perform a task correctly, and may be trained in many different ways. During a training process a HNN learns (or is “trained”) by processing data of a collection of representative examples according to a prescribed training routine, tuning the parameters of the boson sampling layer 810 and forming a probability-weighted distribution between the input values (observable values) and output values of the ANN 820. For example, the boson sampler 114 may be operated to produce a batch of samples S. Each sample of the batch of samples may be provided as input to the ANN 820 which produces synthetic data output values yr to yw. The output values produced for all of the samples of the batch of samples may be compared in some way with representative examples from the training data, typically by use of a cost function. The parameters of the boson sampling layer 810 and the weights and biases of the ANN 820 may be iteratively updated according to a learning rale. Successive adjustments will cause the HNN 800 to produce synthetic data that is increasingly similar to the target output data. After a sufficient number of these adjustments the training can be terminated based upon certain criteria. Once trained, the trained model (for example, the trained weights and biases of the ANN and the trained boson sampler parameter values) can be stored for future use.

[0136] The HNN 800 may be trained by attempting to optimise a cost function indicative of the error between synthetic data generated by the HNN and a training set of genuine data. For example, training may comprise minimising a cost function such as a quadratic cost function, a cross-entropy cross function, a log-likelihood cost function. The minimisation may be performed for example by gradient descent, stochastic gradient descent or variations thereof, using backpropagation to adjust the parameters of the boson sampling layer 810 and the weights and biases within the ANN 820 accordingly. Training may involve the use of further techniques known to the skilled person, such as regularization. Mini-batch sizes, learning rates, numbers of epochs and other hyperparameters may be selected and fine-tuned during training.

[0137] The HNN 800 may be trained as part of a hybrid generative adversarial network (GAN) for example. In a hybrid GAN, a HNN 800 and a supplementary ANN are trained simultaneously, with the HNN focused on data generation (the generator) and the supplementary ANN focused on data discrimination (known as the discriminator or critic). The HNN 800 and the discriminator network ‘compete’ against each other in training. More particularly, the HNN 800 produces artificial or synthetic datasets (output values y± to yw) for example artificial images. The discriminator receives either a genuine dataset (e.g. a genuine image) from a training set of genuine datasets, or an artificial dataset generated by the HNN 800, and must distinguish between the two. The HNN 800 is trained to fool the discriminator. Feedback from the discriminator is used to train the discriminator until it achieves acceptable accuracy. Feedback from the discriminator is also used to train the HNN 800 based on whether it fools the discriminator. Formally, training the HNN 800 and the discriminator is performed by defining an objective function that depends on parameters from both networks and performing gradient based methods to train both networks.

[0138] Fig. 9 demonstrates that the methods described herein can be used to effectively and efficiently train a HNN and particularly as part of a GAN. In particular, a hybrid generator network comprising a boson sampling layer and an artificial neural network was trained as part of a generative adversarial network (GAN) to generate synthetic images of human faces. The quality of the output of the hybrid neural network was measured using tire Frechet Inception Distance (FID) which is plotted (solid curve in Fig. 9) against the number of training iterations. At each iteration of training the GAN, a boson sampler was operated to produce a batch of samples and the samples were separately provided as input to an artificial neural network. More particular, the number of photons in an output mode (e,g, ng) was provided as input to a corresponding neuron of the input layer. The outputs of the artificial neural network were compared with genuine data using a GAN cost function. The weights and biases of the artificial neural network were trained using backpropagation. Gradients of the GAN cost function (acting as the objective function) with respect to the parameters of the boson sampling layer were also determined and the parameters updated accordingly as part of a backpropagation method. The first values (^) were determined by generating, from the batch of samples, an affine fit of the GAN cost function with respect to the observables (measured photon number values), and the second values (F2) were determined from an analytic model. The dashed curve in Fig. 9 shows the FID of the same GAN architecture, but with the parameters of the boson sampler not trained as each iteration. The training data used in both cases was the Flickr-Faces-HQ (FFHQ) dataset. As can be seen from the figure, training the boson sampler parameters using the methods as described herein enabled synthetic images to be generated after fewer iterations than when the boson sampler parameters were not trained.

[0139] The skilled person will appreciate that, while in relation to Fig. 8 and Fig. 9 the inputs to the ANN 820 were taken to be the observable values Oj (s) of a single sample s, in other examples the inputs to the ANN may be derived from the batch of samples S. For example, the processor unit 104 may determine expectation values (Oj) from tire batch of samples, and tire expectation values may be provided as input to the artificial neural network.

[0140] Variations of the described embodiments are envisaged.

[0141] As will be appreciated by one skilled in the art, the present disclosure 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, microcode, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in any one or more computer-readable medium / media having computer usable program code embodied thereon.

[0142] 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 disclosure. 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 block 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 illustration, and combinations of blocks in the block diagrams and / or flowchart illustration, 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. 5

[0143] Each feature disclosed in this specification (including any accompanying claims, abstract or drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features. The invention is not restricted to the details of any foregoing embodiments. The invention extends to any novel one, or any novel combination, of the features disclosed in this specification 10 (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed. The claims should not be construed to cover merely the foregoing embodiments, but also any embodiments which fall within the scope of the claims.

Claims

1. A method for configuring a boson sampler, the method comprising:operating the boson sampler to produce a batch of samples;determining, from the batch of samples, an estimate of a partial derivative of an objective function with respect to a parameter value of a configurable parameter of the boson sampler; andconfiguring the parameter of the boson sampler based on the determined estimate;wherein determining the estimate comprises:determining from the batch of samples, for each observable of a set of observables, a corresponding first value representative of a partial derivative of the objective function with respect to the expectation value of the observable;determining, for each observable of the set of observables, a corresponding second value representative of a partial derivative of the expectation value of the observable with respect to a parameter value of the configurable parameter; anddetermining the estimate from the first values and the second values.

2. The method of claim 1, wherein an observable of the set of observables comprises a number of photons in an output mode of the boson sampler.

3. The method of claim 2, wherein every observable of the set of observables comprises a number of photons in a corresponding output mode of the boson sampler.

4. The method of claim 1 or claim 2, wherein an observable of the set of observables comprises a product of a number of photons in a first output mode of the boson sampler and a number of photons in a second output mode of the boson sampler.

5. The method of claim 4, wherein every observable of the set of observables comprises either a number of photons in an output mode of the boson sampler or comprises a product of a number of photons in a first output mode and a second output mode of the boson sampler.

6. The method of claim 1 or claim 2, wherein determining the corresponding first value comprises: determining, from the batch of samples, an expected value of the observable;separating the batch of samples into two groups;determining, for each group, an average value for the objective function;determining a difference between the average values of the two groups; anddetermining, from the difference and the expected value of the observable, the corresponding first value.

7. The method of claim 6, further comprising:determining, from the batch of samples, a median value for the objective function;wherein the first group comprises samples that produce an objective function value that is greater than the median value; andwherein the second group comprises samples that produce an objective function value that is less than the median value.

8. The method of any of claims 1 to 5, wherein determining the corresponding first value comprises: generating, from the batch of samples, an affine fit of the objective function with respect to the observables.

9. The method of any of claims 1 to 5, wherein determining the corresponding first value comprises: generating, from the batch of samples, a non-linear fit of the objective function with respect to the observables.

10. The method according to any preceding claim, wherein determining the second value comprises determining the second value from an analytic function of a relationship between the expectation value of the observable and the configurable parameter.

11. The method according to any preceding claim, wherein determining the second value comprises determining the second value from the batch of samples.

12. The method of any preceding claim, wherein the configurable parameter comprises an effective transmission coefficient of a reconfigurable beamsplitter of the boson sampler.

13. The method of any preceding claim, wherein the configurable parameter comprises a phase imparted by a phase shifter of the boson sampler.

14. The method of any preceding claim, further comprising:determining, from the batch of samples, a second estimate of a partial derivative of the objective function with respect to a second parameter value of a second configurable parameter of the boson sampler; andconfiguring the parameter of the boson sampler based on the determined second estimate.

15. A non-transitory computer-readable medium comprising stored instructions that, when executed by a computing device, cause the computing device to perform operations including:operating a boson sampler to produce a batch of samples;determining, from the batch of samples, an estimate of a partial derivative of an objective function with respect to a parameter value of a configurable parameter of the boson sampler; andconfiguring the parameter of the boson sampler based on the determined estimate;wherein determining the estimate comprises:determining from the batch of samples, for each observable of a set of observables, a corresponding first value representative of a partial derivative of the objective function with respect to the expectation value of the observable;determining, for each observable of the set of observables, a corresponding second value representative of a partial derivative of the expectation value of the observable with respect to a parameter value of the configurable parameter; anddetermining the estimate from the first values and the second values.

16. A sy stem comprising:a boson sampler; andcontrol logic configured to:operate the boson sampler to produce a batch of samples;determine, from the batch of samples, an estimate of a partial derivative of an objective function with respect to a parameter value of a configurable parameter of the boson sampler; andconfigure the parameter of the boson sampler based on the determined estimate;wherein determining the estimate comprises:determining from the batch of samples, for each observable of a set of observables, a corresponding first value representative of a partial derivative of the objective function with respect to the expectation value of the observable;determining, for each observable of the set of observables, a corresponding second value representative of a partial derivative of the expectation value of the observable with respect to a parameter value of the configurable parameter; anddetermining the estimate from the first values and the second values.

17. The system of claim 16, wherein the boson sampler comprises a light source, an interferometer, and one or more photodetectors.

18. The system of any of claims 16 to 17, wherein the boson sampler is a single-photon boson sampler.

19. The system of any of claims 16 to 18, wherein the boson sampler is a Gaussian boson sampler.

20. The system of any of claims 16 to 19, further comprising processing circuitry coupled to the bosonsampler and control logic and configured to provide an artificial neural network (ANN).

21. The system of claim 20, wherein the control logic is further configured to train a hybrid neural network (HNN) comprising the boson sampler and the ANN.

22. The system of any of claims 16 to 21, wherein the configurable parameter comprises an effective transmission coefficient of a reconfigurable beamsplitter of the interferometer.

23. The system of any of claims 16 to 22, wherein the configurable parameter comprises a phase imparted by a phase shifter of the interferometer.