Exponential spin embedding for quantum computers
Through the exponential spin embedding method, the configuration of representing 2n spins is solved by using n qubits to represent more than n spins in the prior art, and efficient calculation of exponential spin systems is achieved.
Patent Information
- Application Number
- CN202180100695.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-06-03
- Filing Date
- 2021-11-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2041-11-30
AI Technical Summary
Existing quantum computers have difficulty effectively representing a single spin configuration with more than n spins, limiting their application potential in spin models.
Using the exponential spin embedding method, the quantum states of n qubits are used to represent the classical spin configuration of 2n spins. The exponential spin model is realized by directly mapping the classical spin value and amplitude αi into the quantum state. embedding.
The efficient representation of exponential spin systems is achieved, improving the computing power of quantum computers in spin models, and able to store and operate much more spin configurations than traditional methods.
Smart Images

Figure CN117651955B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority under 35 U.S.C. §119(e) to U.S. Provisional Patent Application Serial No. 63 / 196,597, filed on June 3, 2021, and entitled “Exponential Spin Embedding for Quantum Computers,” the entire contents of which are incorporated herein by reference. Background Art 1. Technical Field
[0004] The present disclosure relates to the technical field of circuit model quantum computing, and more particularly, to using a quantum computer to perform computations for a classical spin model.
[0005] 2. Description of Related Art
[0006] In a quantum algorithm for performing quantum computations on a classical spin model, a quantum computer with n qubits can be used to store and manipulate a classical spin model with n spins, where each classical spin is mapped to a single qubit. This scheme has the property that a quantum state can represent a superposition of multiple spin configurations simultaneously. However, a significant disadvantage of this scheme is that a quantum computer with n qubits cannot represent a single spin configuration with more than n spins. Summary of the invention
[0007] The present disclosure is in the technical field of circuit model quantum computing. Generally, it relates to methods of using a quantum computer to perform calculations on a classical spin model, wherein the classical spin model involves the number of spins, which is exponentially related to the number of qubits comprising the quantum computer. (In the present disclosure, the terms quantum computer, quantum processor, and quantum processing unit are used interchangeably.) Examples of such calculations include optimization and calculation of thermal properties, but extend to a wide variety of calculations that can be performed using configurations of spin models with an exponential number of spins. Spin models include optimization problems, physical simulations, and neural networks (there is a correspondence between a single spin and a single neuron). The present disclosure has applications in these three fields and in any other field in which spin models can be used.
[0008] Some embodiments are directed to a method. A classical spin model for I spins is received, wherein the Hamiltonian specifies an energy of a configuration of I spins. A quantum circuit is determined. The quantum circuit, when executed by a quantum computer, prepares a quantum state |ψ> of n qubits in the quantum computer, wherein n is less than I. The quantum state |ψ> is a superposition of the configurations of I spins representing the classical spin model, where |i> is the spin index of spin i in the spin configuration, and α iis the amplitude representing the spin value of spin i in the spin configuration.
[0009] In some embodiments, the number of spins I is equal to 2 n .
[0010] In some embodiments, α i Can be real or complex.
[0011] In some embodiments, sign(α i ) represents the spin value of spin i.
[0012] In some embodiments, α i The magnitude of represents the spin value of spin i.
[0013] In some embodiments, the spin model is the Ising model, α i is a real number, and sign(α i ) represents the spin value of spin i.
[0014] In some embodiments, the spin model is the Ising model, α i is a real or complex number, and α i The magnitude of represents the spin value of spin i.
[0015] In some embodiments, the spin model is an XY model, α i is a complex number, and angle(α i ) represents the spin value of spin i.
[0016] In some embodiments, the spin model is an XY model, α i is a real or complex number, and α i The magnitude of represents the spin value of spin i.
[0017] In some embodiments, the quantum circuit is executed by a quantum computer. The readout quantum circuit is executed by a quantum computer, wherein the execution of the readout quantum circuit modifies the quantum state |ψ> to form an output quantum state. The output quantum state of the quantum computer is measured. The characteristics of the spin configuration (e.g., macroscopic characteristics or microscopic characteristics) are determined based on the measured output state. The characteristics are the spin value of the spin in the spin configuration, the magnetization of the spin configuration, the spin-spin correlation between two spins in the spin configuration, the sum of the spin-spin correlations, the energy of the spin configuration, or the spin structure factor of the spin configuration. In some embodiments, the readout quantum circuit includes a quantum gate that performs a Hadamard test or an exchange test with the quantum state |ψ>. In some embodiments, the readout quantum circuit includes a quantum gate that applies a quantum Fourier transform to the quantum state |ψ>.
[0018] In some embodiments, a quantum circuit is repeatedly executed by a quantum computer. For each execution of the quantum circuit: (1) a measurement reference is selected from a set of measurement references and (2) a quantum state |ψ> of the quantum computer is measured using the selected measurement reference. A neural network model is applied to the measurements, wherein the neural network model is trained to determine a property of the spin configuration based on the measurements.
[0019] In some embodiments, determining a quantum circuit includes the following steps: determining a quantum gate of n qubits to be applied to a quantum computer. determining an arrangement of quantum gates in the circuit. determining one or more gate parameters for one or more of the quantum gates. Examples of quantum gate parameters include at least one of the following: a single qubit rotation gate angle, a controlled phase gate phase, or a general multi-qubit gate matrix entry.
[0020] In some embodiments, the quantum circuit is executed by a quantum computer. Executing the quantum circuit may include the following steps: (1) initializing each of the n qubits in state 0, (2) applying a Hadamard gate to each of the n qubits, and (3) after applying the Hadamard gate to each qubit, applying only a combination of a Z gate and a controlled Z gate to the n qubits.
[0021] In some embodiments, the quantum circuit is executed by a quantum computer. Executing the quantum circuit may include the following steps: (1) initializing each of the n qubits in state 0, (2) applying a Hadamard gate to each of the n qubits, and (3) after applying the Hadamard gate to each qubit, applying only a combination of multi-control qubit controlled U gates to the n qubits. U may be a Z gate or a set of XZX gates.
[0022] In some embodiments, the quantum circuit is executed by a quantum computer. The readout quantum circuit is executed by the quantum computer to form an output quantum state. The output quantum state of the quantum computer is measured. The non-quantum computer determines a characteristic (e.g., macroscopic or microscopic) of the spin configuration based on the measured output quantum state. The non-quantum computer determines a set of second quantum circuit parameters based on the determined characteristic. The quantum circuit can be a variational quantum circuit. The second set of quantum circuit parameters can be determined using a Markov chain Monte Carlo process.
[0023] Some embodiments relate to a non-transitory computer-readable storage medium including instructions for determining storage of a quantum circuit. The quantum circuit, when executed by a quantum computer, prepares a quantum state |ψ> of n qubits in the quantum computer. The quantum state |ψ> is a superposition of configurations of I spins representing a classical spin model, where |i> is the spin index of spin i in the spin configuration, and α i is the amplitude representing the spin value of spin i in the spin configuration, where n is less than I.
[0024] Some embodiments relate to a quantum circuit that, when executed by a quantum computer, prepares a quantum state |ψ> of n qubits in the quantum computer, the quantum state |ψ> being a superposition of configurations of I spins representing a classical spin model, where |i> is the spin index of spin i in the spin configuration, and α i is the amplitude representing the spin value of spin i in the spin configuration, where n is less than I.
[0025] Other aspects include components, devices, systems, improvements, methods, processes, applications, computer-readable media, and other techniques related to any of the above. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Embodiments of the present disclosure have other advantages and features which will become more apparent from the following detailed description and the appended claims when used in conjunction with the examples in the accompanying drawings, in which:
[0027] Figure 1 : A flowchart of a method for simulating a classical spin model on a quantum computer using a hybrid method according to an embodiment, wherein the hybrid method uses a quantum processor (QPU) 201 and a classical processor 200.
[0028] Figure 2 : A flow chart of a method for simulating a classical spin model on a quantum computer using a hybrid method according to an embodiment, wherein the hybrid method uses a quantum processor (QPU) 201 and a classical processor 200. Figure 1 In contrast, this method is dedicated to finding the energy of the output spin model, with the method being designed to find energies that can be lower or higher depending on the choice of acceptance probability p.
[0029] Figure 3 : A flow chart of a method for heuristically finding the minimum of an optimization problem with constraints according to an embodiment. The constrained problem is mapped to a spin model that is unconstrained, and the spin model is optimized in a hybrid approach using a quantum processor (QPU) 201 and a classical processor 200. After enough optimization iterations have occurred, the quantum processor is used again to reveal the spin value for the lowest energy configuration. In this example, only the spin values corresponding to the solution variables in the original optimization problem are requested.
[0030] exist Figure 1-Figure 3In the embodiment, steps 100, 101 and 102 describe the input and output of the classical processor 200. These inputs / outputs may be sent / received by another classical processor. Steps 104 and 105 may be performed on a classical processor, such as the classical processor 200 or another classical processor.
[0031] Figure 4 is an example spin configuration preparation circuit for preparing an Ising model spin configuration using symbolic encoding for the spins.
[0032] Figure 5 is an example spin configuration preparation circuit for preparing an Ising model spin configuration using symbolic encoding for the spins. DETAILED DESCRIPTION
[0033] The drawings and the following description relate to the embodiments by way of illustration only.It should be noted that from the following discussion, alternative embodiments of the structures and methods disclosed herein will readily be identified as viable alternatives that may be employed without departing from the principles disclosed.
[0034] Some embodiments relate to methods of embedding a classical spin model with an exponential number of spins in a quantum computer. Related aspects of the disclosure are methods for initializing and manipulating spin configurations in a quantum computer; a hybrid quantum-classical algorithm for evolving spin configurations in time in a method that simulates coupling of a spin system to a hot water bath at a specific temperature T; methods for reading out properties of a spin configuration (e.g., energy, magnetization, and correlation functions) from a quantum computer; and methods for implementing neural networks with an exponential number of neurons that vary according to the number of qubits in the quantum computer using quantum embedding of the disclosed classical spin model.
[0035] Two examples of classical spin models we mention in this disclosure are the Ising model and the XY model. The Ising model consists of a set of N spins {si} and a Hamiltonian (energy function) H = -∑ 1≤i<j≤N J ij s i s j -∑ 1≤i≤N h i s i , where s i represents the value of the i-th spin and takes the value of -1 or +1, J ij represents the coupling between the ith spin and the jth spin, and h i represents the external field applied to the ith spin. The XY model consists of a collection of N spins Definition, and its Hamiltonian in represents the value of the ith spin and is a 2D vector with unit length.
[0036] In quantum algorithms for performing quantum computations using the classical Ising model, such as the quantum approximate optimization algorithm (QAOA) and quantum annealing (QA), a quantum computer with n qubits is used to store and manipulate a classical spin model with n spins, where each classical spin is mapped to (or embedded in) a single qubit. The state of the quantum computer in QAOA represents the spin as follows:
[0037]
[0038] where n is the number of qubits, and |i> represents a specific spin configuration of the Ising model, and α i represents the weight of the spin configuration |i>. For example, |i> = |0010> represents the 4-spin configuration "spin down" (s0 = -1), "spin down" (s1 = -1), "spin up" (s2 = +1), "spin down" (s3 = -1), that is, ↓↓↑↓. This embedding scheme has the remarkable property that the quantum state can represent a coherent superposition of multiple physical configurations simultaneously, for example, represents a superposition of |0010>=↓↓↑↓ and |0001>=↓↓↓↑, both of which have equal weight and the same phase. In some cases, simultaneous encoding of multiple physical configurations may be beneficial, but a significant disadvantage is that encoding a single physical configuration uses only a small fraction of the 1 / 2n elements of the quantum state.
[0039] In this disclosure, we propose a new embedding, which we call exponential embedding, because it allows embedding into quantum computers with spin models with an exponential number of spins. The embedding is as follows:
[0040]
[0041] where n is the number of qubits, |i> represents the index of a single spin in the spin model, and α i denotes the value of the i-th spin. In particular, we use the value of the classical spin s in the n-qubit quantum state i (or ) and amplitude α i There is a direct mapping between n elements, and thus stored in the 2 embedded quantum state |ψ> n Different α i Values can be stored including 2 nspins. More generally, this embedding is able to store spin configurations consisting of a number of spins that is exponential in the number of qubits n. Note that in contrast to the embedding schemes previously used in QAOA and QA, exponential embedding uses quantum states to store a single physical configuration of the system—without additional qubits, coherent superpositions across multiple physical configurations are not possible. However, the gain is that an n-qubit quantum system can be represented within an exponential embedding with 2 n Thus, for example, 10 qubits can be used to embed a spin configuration with 1024 spins, 20 qubits can be embedded in a configuration with over a million spins, and 50 qubits can be embedded in a configuration with 2 50 A spin configuration.
[0042] There are several possible ways to i The spin value s is encoded in i (or ). If the classical spin model is the Ising model, then two general strategies are:
[0043] 1.) Symbol encoding, where α i is set to a real number, and sign(α i ) determines the spin value: if sign(α i )=-1, then the i-th spin has value s i = -1, and if sign(α i )=+1, then the i-th spin has value s i = +1. An example of symbolic encoding is to constrain the system so that α i Not any real number, but a number that takes only one of two values: or This particular variant of symbolic encoding has the convenient feature that α i Dividing the sum by i gives the number of spin values s i If α is proportional to i is any real number, this is not the case. However, by allowing α i Using any practical value of , more complex spin dynamics can be achieved (which can support mean-field annealing in the optimized case).
[0044] 2.) Amplitude encoding, where α i can be real or complex, and we use α i The magnitude of α is used to encode the spin value. For example, a real number between 0 and 1 can be selected as the threshold t, and if |α i |<t, then the i-th spin has value s i = -1, and if |αi |>t, then the i-th spin has value s i =+1.
[0045] For the Ising spin model, the preferred encoding method may be symbolic encoding.
[0046] If the classical spin model is the XY model, then the classical spin value are unit vectors, each of which can be equivalently represented by a single real number, (e.g., the angle θ i ). Two strategies for encoding XY spins are:
[0047] 1.) Phase encoding, where α i is set to a complex number, and angle(α i ) determines the spin value. For example, we can set θ i =angle(α i ).
[0048] 2.) Amplitude coding, where α i is set to a real or complex number, and we use α i The magnitude of θ encodes the spin value. For example, we can set θ i =2π|α i | / |α max |, where |α max |Yes|α i |The maximum value that can be used.
[0049] For the XY spin model, the preferred encoding method may be phase encoding.
[0050] Spins in the Potts model (a generalization of the Ising model in which the spin can have one of q possible discrete values, where for q=2 the Potts model reduces to the Ising model) can be encoded in the same way as XY spins, but with the coefficients α i Has discrete values instead of continuous values.
[0051] For spin models where each spin is described by (eg, requires) two real numbers, such as the classical Heisenberg model (where spins are unit vectors in 3-space), in a single complex amplitude α i A single spin in can be encoded by taking advantage of the fact that a complex amplitude has a real part and an imaginary part, or equivalently a magnitude and a phase. For example, a single spin in the classical Heisenberg model can be described by two angles, and these two angles can be expressed in the complex number α i Encoding is performed in .
[0052] For spin models where each spin is described using (e.g., requires) more than two real numbers, such as the extension of the classical Heisenberg model of spin as a unit vector in 4 dimensions, the spin can be encoded in more than one complex amplitude α i Because each amplitude α i At most two real numbers can be encoded in .
[0053] It is also possible to encode spin models that contain multiple types of spins, for example, a spin model that includes a set of Ising spins (with binary values from {-1, +1}) and a set of XY spins (with real values). This can be done by using the above-described spin model for α i The encoding for the Ising spin is selected by using the encoding for α (where index i contains the index of the Ising spin in the model), and using the encoding for α described above i This is done by selecting the encoding for the XY spin by where index i contains the index of the XY spin in the model.
[0054] The choice of encoding affects how the state is initialized, manipulated, and read out, with different encodings being more or less efficient and / or convenient for different purposes.
[0055] Given a choice of spin model (Ising, XY, or other classical spin model types, including hybrid models) and the quantum state amplitude α for that model i To encode the spins in a quantum computer, it is ideal to design quantum circuits that can efficiently create quantum states representing the spin configuration of interest.
[0056] One way to design such a circuit is to create a circuit with variational parameters that allow it to create states in many different regions of Hilbert space (e.g., as in the development of variational quantum algorithms for quantum chemistry (and more broadly quantum simulation of quantum systems)). This same approach is possible for the method proposed in this patent, and in some cases it may be desirable. In general, however, arbitrary variational circuits make quantum states conform to encoding rules. For example, suppose a circuit operates using the Ising model and a symbol encoding has been chosen where or Any variational quantum circuit will prepare an amplitude α i Has not The value status.
[0057] Exploiting symbol encoding The family of circuits that preserve quantum states in a subspace that does not violate the encoding rule is as follows: Starting with all qubits in state 0 in the computational basis, apply a Hadamard gate to each qubit, and then only apply Z (single-qubit) gates and controlled Z (two-qubit) gates (see, for example, Figure 4 ). A similar but larger family of circuits is one that also starts with each qubit initialized to state 0 and applies a Hadamard gate to it. After that, the circuit can apply a multi-control qubit control u-gate, up to n-1 control qubits (e.g., controlled U-gate; controlled-controlled U-gate; controlled-controlled-controlled U-gate, ..., up to controlled (n-1) U gate), where the target operation unitary U is U=Z or U=XZX, and the control of the control qubit can be standard control (if the control qubit has state 1, then the control is active) or inverse control (if the control qubit has state 0, then the control is active) (see, for example, Figure 5 ). Each controlled (n-1) A U-gate can flip a single spin in an encoded spin configuration, depending on the choice of control (which qubit is controlling the gate, and whether the qubit is standard-controlled or inverse-controlled), the choice of U, and the spin configuration currently being encoded. If a circuit from this family has O(N) multi-qubit controlled U-gates, it can create quantum states representing any possible configuration of N classical Ising spins. Circuits used in exponential spin embedding algorithms may not wish to have O(N) gates, since this corresponds to a circuit depth exponential in the number of qubits n, and thus may require an exponential amount of time to execute each circuit. (The depth here refers to the standard definition in quantum computing of the depth of a circuit when compiled to use only one-qubit and two-qubit primitive gates.) A circuit with a depth linear or polynomial in the number of qubits n may not be able to create all possible spin configurations, but may be able to create a subset of interest for solving a given problem.
[0058] If a given spin model has constraints on the values that the spins can take (such as might arise when considering a binary variable optimization problem with constraints on a binary variable, and where the objective function of the optimization problem is given as the Ising Hamiltonian), it is possible that, when a quantum circuit is designed in such a way that creates quantum states that identify a spin configuration, any created spin configuration can be guaranteed to satisfy the constraints associated with the Hamiltonian. In the language of the optimization community, circuits can be designed to preserve spin configurations in a "feasible subspace."
[0059] After the family of circuits for creating the spin configuration quantum state is determined, there are many different possible choices for how to initialize the spin configuration quantum state and how to manipulate the spin configuration quantum state. For initialization, an example choice is to create a state where all spins take the same value (e.g., spin up). Using the Ising model and symbolic encoding, start with all qubits in state 0 and apply the Hadamard gate to each qubit to create an all-spin-up configuration.
[0060] =After the spin configuration is initialized, it can be operated on by applying circuits other than the family of circuits that retain the encoding rules. The choice of circuit to control the state is determined by what the ultimate purpose of the calculation is. Two purposes considered in the present disclosure are sampling of the thermal state of the spin model, and heuristic optimization of the spin model (trying to find spin configurations with low (e.g., lowest) energy). Possible updates to the circuits for preparing spin configurations that may be suggested for a classical processor (e.g., classical processor 200) include changes to the structure of the circuit itself (such as inserting or deleting gates) and to modifying the parameters of one or more of the gates (such as changing the spin angle of a single-qubit spin gate). In general, for spin models in which spins have discrete values (such as the Ising model or the Potts model), circuit updates will involve changes to circuit values that are also discrete (such as adding or deleting gates from a discrete set of possible gates), while for spin models in which spins have continuous values (such as the XY model), circuit updates will involve changes to the circuit that are continuous (e.g., modifying the continuous parameters of a spin gate) and discrete changes (such as adding or removing gates, where the gates can be from a continuous set).
[0061] After a circuit has been used to create a quantum state representing a particular classical spin configuration (in a particular choice of encoding), it is desirable to be able to read out the properties of the spin configuration. The readout circuit is typically specific to the spin model, the encoding, and the property to be read out.
[0062] An example readout to be performed is to read out the value of one particular spin, the ith spin. This particular readout operation is generic across spin models and encodings. To read out the value of the ith spin, simply read<i|ψ> is sufficient, it is equal to α i An example circuit to perform this readout is to compute the inner product between |ψ> and |i> using either the Hadamard test or the commutative test.
[0063] In spin models, the property of interest is often the magnetization of the spin configuration. In the Ising model, the magnetization is defined as This can be read out by By applying the Hadamard gate to each qubit in the state |ψ>, a full-zero amplitude is created equal to This can be done, for example, by using and |0> to read out the Hadamard test or the exchange test, where denotes applying the Hadamard gate to each of the n qubits, and |0> denotes all qubits in state 0.
[0064] A typical property of a spin configuration of interest is the energy of the spin configuration. The energy depends on the Hamiltonian H of the spin model, so the energy readout circuit may require knowledge of the Hamiltonian. In some embodiments, a general strategy to perform the readout is to use a Hadamard test or an exchange test, where one of the states under test is a spin configuration state |ψ〉 and the other is a carefully constructed state |φ〉 that depends on the Hamiltonian.
[0065] If the Hamiltonian is that of the one-dimensional Ising model with nearest interactions, H = -∑ 1≤i≤ N J i s i s i+1 , then for The choice of |φ> causes the permission The calculation of the Hadamard or exchange test is done by . This is exactly the Ising energy, up to a known normalization constant C. The normalization constant C can be determined completely by the value J in the Hamiltonian i What determines such a choice of |φ> is the normalized state.
[0066] If there are poly(n) J i For different values of |φ>, the circuit to create |φ> can be polynomial in the number of qubits n, making the circuit efficient. As an example, consider where the Hamiltonian is H = -∑ 1≤i≤N Js i s i+1 In the case of (only for all adjacent spins in a D chain are the same J i In this case, the circuit to create |φ> does the following: first, use the spin configuration preparation circuit to create the spin configuration state |ψ>; second, apply an adder circuit that performs the mapping |i> → |i+1>. This creates the desired state. This modification allows the addition of the circuit corresponding to the neighbor interaction H = -∑ 1≤i≤N Js i s i+2 Readout of the energy of the Hamiltonian term: when creating |φ〉, an adder that adds 2 instead of 1 is used (in other words, it performs the mapping |i〉→|i+2〉).
[0067] If the Hamiltonian is that of a 2D Ising model with nearest neighbor interactions, then the test state |φ〉 can be created using a slight modification of the circuit for the 1D Ising model. For a square lattice, each spin has four neighbors, and an example representation of the Hamiltonian is If the state |φ> is used to add The adder is prepared, that is Then the Hadamard or exchange test between |φ〉 and |ψ〉 contributes to the Ising energy from the interaction between spins one row away. But with two Hadamard or exchange tests, one corresponding to ∑ 1≤i≤N Js i s i+1 and the other time corresponds to The Ising energy of this 2D Ising model can be read out. The given method for reading out the energy from a square lattice can be easily extended to 2D triangular, Kagome or other lattices, as well as 3D or higher dimensional lattices by those familiar with the art. Similarly, the method for performing energy readout can be easily extended to the case of XY or other spin models.
[0068] More generally, this method of performing a readout of the energy of a spin configuration can be used for any Ising or XY Hamiltonian. For both the Ising and XY models, there is a matrix J that defines the energy due to spin-spin interactions. Since the Hadamard or exchange test is used to compute the dot product between the spin state |ψ〉 and the state |φ〉 in dimension N, the test can compute the energy for up to N spin-spin interaction terms. However, the J matrix usually encodes N 2 There are spin-spin interactions, so to perform energy readout for a generic J matrix, one may need to perform N different Hadamard or exchange tests using N different states |φ〉.
[0069] For a J matrix with some elements equal to zero (in principle some spin-spin interactions that may exist have strength zero), the number of Hadamard or exchange tests to read out the energy is nnz(J) / N, where "nnz(J)" denotes the number of elements of J whose value is not zero.
[0070] From this we can see that the energy readout process is very efficient in terms of the number of Hadamard or exchange tests to be performed. For the 1D Ising model with nearest neighbor interactions, nnz(J)≈N, so the number of tests used is N / N=1. For the 2D Ising model on a square lattice, nnz(J)≈2N, so the number of tests used is 2N / N=2. For the Ising model whose spin-spin interactions are on a graph with maximum degree d, then nnz(J)≈dN(at most), so the number of tests used is d. Therefore, for any spin model with sparse connectivity, energy readout will be efficient in the number of tests used.
[0071] As a specific example of energy readout for an XY model, if phase encoding is used, then in |ψ> and The dot product <φ|ψ> is the real part of This quantity, Re[〈φ|ψ>], can be read out using the Hadamard test. This is exactly the energy of the nearest neighbor interaction in the XY model. As explained for the Ising model, by appropriate choice and construction of |φ>, the different sum of energy terms from the XY model can be read out.
[0072] The readout of the energy from the Ising or XY model is closely related to the problem of reading out the correlation function. The above method for reading out the energy can be easily adapted to read out a single spin-spin correlation coefficient (e.g. s for any choice of spin index j). i=1 s j ) or the sum of the spin-spin correlation coefficients (e.g. ∑ 1≤j≤N s i=1 s j , or even the sum of all two-point correlation coefficients for all choices of “starting spins”, ∑ 1≤i<j≤N s i s j ). A method of reading out individual correlation coefficients or sums of correlation coefficients is to perform one or more Hadamard or exchange tests using a state |φ> that has been prepared as a superposition with one or more basis states corresponding to the amplitude of the spin with which one wants to calculate the correlation coefficient, e.g., (where C is a normalization constant) to calculate the sum of the correlation coefficients of the nearest neighbor spins in the 1D chain.
[0073] The ability to read out the sum of the spin-spin correlation coefficients enables the thermodynamic properties of the spin model to be read out. For example, the susceptibility λ of the 2D Ising model is given by the sum of the spin-spin correlation coefficients: Where M is the magnetization and C(m,n) is the spin-spin correlation function C(m,n): = 0,0 s m,n >.
[0074] Another readout mechanism that can provide insight into the correlations between spins is to use a quantum Fourier transform and then measure the output state directly in the computational basis, or perform a Hadamard or commutation test to extract specific fragments of the spectral information. As an example, if the state encodes the spin configuration, |ψ〉, using the symbol encoding It is transformed by application of the quantum Fourier transform to:
[0075]
[0076] This state encodes information about the periodicity in the spin configuration in |ψ〉.
[0077] If we set ω = e -i , then U QFT |ψ> can be written as:
[0078]
[0079] in Here S(q) is the spin structure factor for the 1D spin model. OFT |ψ> states, the distribution of the spin structure factor for different values of q is determined, and if the distribution of S(q) has a main peak, the value of q that gives the maximum S(q) in several repeated measurements can be determined with high probability, e.g., with a probability greater than 90% (the exact number may depend on what "few" means and what the distribution S(q) looks like, which is problem-dependent). When modeling neutron scattering experiments, the spin structure factor is the relevant quantity to extract. In addition to the one-dimensional case, there is a natural extension to calculate the more general spin structure factor for high-dimensional lattices:
[0080] In addition to the two general types of readout we have proposed (Hadamard or exchange tests to extract information with carefully designed states |φ〉, and periodic / spectral information from quantum Fourier transforms), there is another general type of readout method that can be effectively used to efficiently extract useful information from configuration states |ψ〉: methods in which a measurement of |ψ〉 is performed and its result is then classically post-processed to extract the relevant quantity.
[0081] Two examples of readout methods that fall into this general category are shadow tomography (as described in arXiv:2002.08953) and neural network quantum state tomography (as described in arXiv:1703.05334). Both of these readout methods enable readout of quantities of interest that might be difficult to access via Hadamard / commutation tests or quantum Fourier transforms without classical post-processing. The network-of-networks approach is particularly flexible: a classical neural network can be used to extract properties of the spin configuration stored in |ψ>, where we have no explicit structure to extract, where the classical neural network is trained to be able to output the quantity of interest, given an input of the results of measurements of the state performed in a (e.g., random) basis. A "basis" here typically refers to the Pauli X, Y, or Z basis for single qubit measurements.
[0082] By being able to efficiently prepare spin configurations using a moderate number of variational ansaetzes with parameters, and by being able to read out the energy of the prepared spin configurations, one has the ingredients to perform a hybrid algorithm that runs partly on a quantum computer and partly on a classical computer (also called a non-quantum computer or classical processor) to optimize (e.g., minimize) the energy of a given spin Hamiltonian, or to compute the thermal properties of the Hamiltonian at a particular temperature T. For the optimization use case, the updates to the spin configurations can be chosen in a variety of ways, including using a black-box classical optimizer. For the thermal property computation use case, Markov chain Monte Carlo-style algorithms (e.g., simulated annealing) can be applied, in which an artificial temperature T is introduced and used to control the probability of accepting changes to the parameters of the variational ansaetzes, which in turn changes the spin configurations (e.g., see Figure 2 ).
[0083] In addition to Markov Chain Monte Carlo methods, thermal properties can be extracted using the thermal field pair method. The thermal field pair is a pure state that consists of two copies of the system, and one copy, when tracked, causes the other copy to be in a thermal state at a chosen inverse temperature β. The thermal field pair can be written as the quantum state When the exponential spin embedding of the present disclosure is implemented, the state |n> is represented by an energy E n states of classical spin configurations of |TFD(β)>. By making two copies of the qubit and following an established procedure for variationally preparing the thermal field binary state |TFD(β)>, one can obtain a thermal mixture of classical spin configurations and read out the thermal properties directly without the need to run Markov chain Monte Carlo iterations. The tradeoff is that one can perform variational optimization to obtain |TFD(β)>, but this can be beneficial because once the parameters for creating |TFD(β)> are known, |TFD(β)> can be created repeatedly, whereas Markov chain-based methods suffer from correlations between samples and long burn-in times.
[0084] With respect to the use case where the methods in this disclosure are used to find the best spin configuration for a particular Hamiltonian or other objective function, we note that these methods are applicable to a wide variety of optimization problems, including binary optimization problems (where the optimization variables are binary, e.g., Ising spins); real-valued optimization problems (where the optimization variables are continuous, e.g., as in an optimization variable with XY spins); and discrete-valued optimization problems (where the optimization variables are discrete and can have more than two values, e.g., spins in the Potts model). For any optimization problem where one wants to know the value of the optimal objective function (e.g., the minimum spin configuration energy), the methods presented in this disclosure give an efficient procedure for reading out the desired answer (e.g., the energy), provided that the optimization procedure converges to the correct variational parameters. Furthermore, if one wants to read out the value of a subset of the total set of spins in a given problem, reading out the value of a subset of the spins will be efficient if a procedure is used to read out the value of an efficient individual spin. An example of a specific use case where one wants to read out only a subset of spins is in a constrained optimization problem (e.g., see Figure 3 ). A constrained binary optimization problem can be converted to an unconstrained binary optimization problem, which can be implemented as an Ising Hamiltonian. The Ising Hamiltonian can have many more spins than the original constrained problem has (e.g., the Ising Hamiltonian may have 1,000,000 spins, while the original problem only has 1,000 variables), because some constraints may require additional spins to be added to enforce the constraints. A method for dealing with constrained problems is to convert the constrained problem to an unconstrained form, possibly adding a large number of additional spin variables in the process (e.g., start with 1,000 variables and end up with 1,000,000 spins after the conversion), use a hybrid optimization algorithm to find a configuration that reduces the energy (e.g., the minimum energy), and then read out only the spins that correspond to the solution to the original constrained problem, because the spins of the constraint implementation may only be needed at intermediate stages of the variational optimization energy.
[0085] There is a correspondence between spin models and neural networks, where a single spin represents (or maps to) a single neuron. The methods in the present disclosure provide methods for representing classical neural networks in quantum computers, which have a number of neurons given by an exponential function of the number of qubits used. In view of the correspondence given by the Hopfield neural network and the Ising model, a simulated Hopfield neural network that allows associative memory can be implemented. More generally, beyond the Ising model, real-valued neurons in the XY spins can be encoded, and the methods in the present disclosure can be used to read out subsets of neurons, which can be defined as the outputs of the neural network. The topology of the neural network is encoded in the Hamiltonian, which can be updated arbitrarily because it is stored classically. This allows training to be performed, where, for example, the J matrix in the XY Hamiltonian can be modified in response to observed outputs from the network.
[0086] Figure 1 is a flow chart showing a method for simulating a classical spin model using a combination of a QPU (Quantum Processor Unit) 201 and a classical processor 200. The classical processor 200 and the QPU 201 are communicatively coupled together.
[0087] The spin model is the input to the classical processor 100. This model is usually specified by a Hamiltonian.
[0088] The classical processor 200 determines an initial spin configuration preparation circuit to be executed on the QPU 201 .
[0089] The QPU 201 executes 220 circuitry to prepare for the spin configuration.
[0090] The QPU 201 performs 221 a measurement of a macroscopic property of the spin configuration 221. The choice of macroscopic property is to be determined by the user based on their application. Two examples of macroscopic properties that the user may select are magnetization and energy.
[0091] The QPU 201 sends the measurement results to the classical processor 200. The classical processor 200 determines 210 how to update the spin configuration preparation circuit based on the measurement results.
[0092] The classic processor 200 updates 211 the circuit, and the updated circuit may be passed again to the QPU 201. This loop repeats until it stops (e.g., due to a stop condition being met). The stop condition may be, for example, that a threshold number of iterations have been performed, or that the recording of measurement results meets some condition (e.g., a macroscopic characteristic has not changed substantially for a certain number of iterations, e.g., it has converged).
[0093] The output of the method is a record 101 of the measured macroscopic properties for each iteration of the method.
[0094] Figure 2 2 is a flow chart showing a method for simulating a classical spin model using a combination of a QPU 201 and a classical processor 200. Figure 1 One difference compared to the method in is that the characteristic of the spin configuration calculated by the QPU 201 is energy, and the classical processor 200 uses the process in 212 to make a decision about the update to the spin configuration preparation circuit in 213, which takes into account whether the previous spin configuration update increased or decreased the spin configuration energy.
[0095] The spin model is the input to the classical processor 100. This model is usually specified by a Hamiltonian.
[0096] The classical processor 200 determines an initial spin configuration preparation circuit to be executed on the QPU 201 .
[0097] The QPU 201 executes 220 circuitry to prepare for the spin configuration.
[0098] QPU 201 performs 222 measurement of the energy of spin configuration 222 .
[0099] The QPU 201 sends the measurement results to the classical processor 200. The classical processor 200 determines 212 how to update the spin configuration preparation circuit based on the energy. For example, if the new energy is lower than the energy of the previous configuration, the new spin configuration preparation circuit is accepted - this means that the classical processor 200 updates the memory containing the spin configuration preparation circuit to store the new circuit. If the new energy is not lower, the new spin configuration preparation circuit is only accepted with a probability p that is typically chosen to be less than 1. This process can be similar to simulated annealing or related Markov chain Monte Carlo methods used in simulations of spin systems on classical computers, where the choice of probability p can control the effective temperature of the system simulation.
[0100] The classical processor 200 updates 213 the circuit by proposing (e.g., randomly) a modification (to the circuit structure or to one of the parameters of the gates in the circuit), and the updated circuit may be passed again to the QPU 201. This cycle repeats until it stops (e.g., due to a stop condition being met). The stop condition may be, for example, that a threshold number of iterations have been performed, or that the record of measured energies meets some condition (e.g., the energy has not changed substantially over a certain number of iterations, e.g., it has converged).
[0101] The output of the method is a record 102 of the energy for each iteration of the method.
[0102] Figure 3is a flow chart showing a method for simulating a classical spin model using a combination of a QPU 201 and a classical processor 200, with the goal of finding a low-energy (low-cost) heuristic solution to a constrained combinatorial optimization problem.
[0103] A constrained optimization problem 103 is determined.
[0104] The constrained problem is converted 104 to an unconstrained spin model. The resulting spin model may typically have more spins (variables) than the original problem, since standard methods for converting constrained problems to unconstrained problems often introduce auxiliary variables. The spin model is input 100 to a classical processor 200.
[0105] The classical processor 200 determines an initial spin configuration preparation circuit to be executed on the QPU 201 .
[0106] The QPU 201 executes 220 circuitry to prepare for the spin configuration.
[0107] The QPU 201 performs 220 measurement of the energy of the spin configuration.
[0108] The QPU 201 sends the measurement results to the classical processor 200. The classical processor 200 determines 212 how to update the spin configuration preparation circuit based on the energy. For example, if the new energy is lower than the energy of the previous configuration, the new spin configuration preparation circuit is accepted - this means that the classical processor 200 updates the memory containing the spin configuration preparation circuit to store the new circuit. If the new energy is not lower, the new spin configuration preparation circuit is only accepted with a probability p that is typically selected to be less than 1. This process can be analogous to simulated annealing or related Markov chain Monte Carlo methods used in simulations of spin systems on classical computers.
[0109] The classical processor 200 updates 213 the circuit by proposing a (e.g. random) modification (to the circuit structure or to one of the parameters of the gates in the circuit), and the updated circuit may be passed again to the QPU 201. This cycle repeats until it stops. The stop condition may be, for example, that a threshold number of iterations have been performed, or that the record of measured energies meets some condition (e.g. that the energy has not changed substantially for a certain number of iterations, e.g. that it has converged).
[0110] The record 102 of energies for each iteration of the method can be searched for the iteration with the lowest energy, and the QPU 201 can perform an additional (e.g., final) task (e.g., in response to request 105): again performing the spin configuration preparation for this iteration, but instead of measuring the energy, a measurement 223 of the spins corresponding to the variables in the original constrained problem can be performed.
[0111] The output 106 of the method is for a set of solution variable values that is the lowest observed energy configuration.
[0112] Figure 4 is an example spin configuration preparation circuit for preparing Ising model spin configurations using a sign encoding for the spins. The circuit includes a Hadamard gate H followed only by a Z gate and a controlled Z gate. Any sequence of Z and controlled Z gates can produce a state corresponding to the Ising spin configuration encoded with a sign.
[0113] Figure 5 is an example spin configuration preparation circuit for preparing Ising model spin configurations using symbolic encoding for the spins. This circuit is simpler than in Figure 4 The circuit in is more general because it allows multiple control qubits on the controlled gates, and allows Z or XZX as a choice of the operation to be applied to the target qubit. A circuit like this one, consisting of Hadamard gates on all qubits followed by multiple controlled Z or XZX gates, can achieve more than in Figure 4 The class of circuits shown in Fig. 1 is a subspace of the larger possible Ising configurations.
[0114] Some embodiments relate to a method for spin configuration of a classical spin model having N:=2n spins embedded in n qubits of a quantum computer. The method comprises representing the spin configuration in a superposition state of the n qubits, Each amplitude α i Representing the values of the classical spin. Multiple conventions for how to represent the values of the classical spin in these amplitudes are available and depend on the specific spin model being targeted. A single spin model can include multiple types of spins (e.g., Ising spins and XY spins). The method can be performed by a computing system (e.g., including a quantum processor (e.g., QPU 201) and a classical processor (e.g., 200)) executing instructions stored on a non-transitory computer-readable storage medium.
[0115] The spin model can be the Heisenberg model and α i The encoding is a combination of phase and amplitude encoding or a combination of real and imaginary encoding. The spin model can represent the Hopfield model and variational optimization leads to the generation of associative memory.
[0116] In some embodiments, a classical computer is used to update the variational parameters based on the readout characteristics of the current spin configuration. The classical computer can use an optimization program to modify the variational parameters so as to reduce the readout energy of the spin configuration (e.g., minimize). The classical computer can use a Markov chain Monte Carlo (simulated annealing) process for selecting updated variational parameters. For example, if the energy of the new spin configuration is lower than the artificial temperature T, the previous parameter update is accepted with probability 1, and if the energy of the new spin configuration is higher than the artificial temperature T, the parameter update based on the energy difference is accepted with probability less than 1. The readout circuit can be used to extract the thermal characteristics of the spin model at temperature T.
[0117] In some embodiments, the thermal field is dual state is created variationally. Without running a Markov Chain Monte Carlo method, a readout can be performed to determine the thermal properties of the spin model.
[0118] Constrained optimization problems can be transformed into unconstrained optimization problems with more variables (e.g., spins), and the method can be used to solve larger unconstrained problems. The readout of a single spin can efficiently extract the solution to the original problem by reading out only the spins corresponding to the variables in the original (constrained problem). Additional spins corresponding to the enforcers of the constraints may not be read out.
[0119] Spins can be interpreted as neurons, enabling the embedding of neural networks with, for example, N:=2n neurons in n qubits of a quantum computer.
[0120] Additional Notes
[0121] Quantum processing devices (also referred to as quantum computers, quantum processors or quantum processing units) utilize the laws of quantum mechanics to perform calculations. Quantum processing devices typically use so-called quantum bits, or qubits. While classical bits always have a value of 0 or 1, a qubit is a quantum mechanical system that may have a value of 0, 1, or a superposition of two values. Example physical implementations of qubits include superconducting qubits, spin qubits, trapped ions, neutral atom arrays, and photon systems (e.g., photons in a waveguide). For the purposes of this disclosure, a qubit may be implemented by a single physical qubit or as an error-protected logical qubit that itself includes multiple physical qubits. This disclosure is also not specific to qubits. This disclosure can be generalized to be applied to quantum processors whose building blocks are high-dimensional quantum states (d-level quantum systems, where d>2) or quantum continuous variables, rather than qubits.
[0122] A quantum circuit is an ordered collection of one or more gates. A subcircuit may refer to a circuit that is part of a larger circuit. A gate represents a unitary operation performed on one or more qubits. A quantum gate may be described using a unitary matrix. The depth of a quantum circuit is the minimum number of steps required to execute the circuit on a quantum computer. The depth of a quantum circuit may be less than the total number of gates, since gates acting on non-overlapping subsets of qubits may be executed in parallel. The layers of a quantum circuit may refer to the steps of the circuit, during which multiple gates may be executed in parallel. In some embodiments, a quantum circuit is executed by a quantum computer. In this sense, a quantum circuit may be thought of as comprising a set of instructions or operations that a quantum computer should execute. In order to execute a quantum circuit on a quantum computer, a user may inform the quantum computer what circuit to execute. A quantum computer may include a core quantum device and a classical peripheral / control device that are used to coordinate the control of the quantum device. When one attempts to have a quantum computer execute a circuit, a description of the quantum circuit may be sent to this classical control device.
[0123] A variational quantum circuit may refer to a parameterized quantum circuit that is executed multiple times, where some of the parameter values may change each time the circuit is executed. The parameters of a parameterized quantum circuit may refer to the parameters of a gate unitary matrix. For example, a gate that performs a spin around the y-axis may be parameterized by a real number that describes the angle of the spin. Variational quantum algorithms are a class of hybrid quantum-classical algorithms in which a classical computer is used to select and change the parameters of a variational quantum circuit. A typical classical processor updates the variational parameters based on measurements of a previously executed parameterized circuit.
[0124] Descriptions of quantum circuits to be executed on one or more quantum computers may be stored in non-transitory computer-readable storage media. The term "computer-readable storage medium" should be taken to include a single or multiple media (e.g., centralized or distributed databases, or associated caches and servers) capable of storing instructions. The term "computer-readable medium" should also be taken to include any medium capable of storing instructions for execution by a quantum computer and causing the quantum computer to perform any one or more of the methods disclosed herein. The term "computer-readable medium" includes, but is not limited to, data repositories in the form of solid-state memory, optical media, and magnetic media.
[0125] The above method may be applicable to a cloud-based quantum computing system, where quantum computing is provided as a shared service to different users. One example is described in patent application serial number 15 / 446,973, "Quantum Computing as a Service," the entire contents of which are incorporated herein.
[0126] Some parts of the above description describe embodiments in terms of algorithmic processes or operations. These algorithmic descriptions and representations are often used by those skilled in the art of computing to effectively convey the essence of their work to other skilled in the art. These operations described functionally, computationally, or logically are understood to be implemented by computer programs including instructions for execution by a processor or equivalent circuit, microcode, etc. In addition, it turns out that it is sometimes convenient to refer to the arrangement of these functional operations as modules without loss of generality.
[0127] As used herein, any reference to "one embodiment" or "an embodiment" means that a particular element, feature, structure, or characteristic described in association with the embodiment is included in at least one embodiment. The appearance of the phrase "in one embodiment" in different places of the specification does not necessarily refer to the same embodiment. Similarly, the use of "a" or "an" in front of an element or component is merely for convenience. Such descriptions should be understood to mean that there are one or more of the elements or components unless it is obvious that there is another meaning.
[0128] Alternative embodiments are implemented in computer hardware, firmware, software, and / or a combination thereof. Implementations may be implemented in a computer program product tangibly embodied in a machine-readable storage device for execution by a programmable processor; and the method steps may be performed by a programmable processor executing a program of instructions to perform functions by operating on input data and generating outputs. As used herein, "processor" may refer to one or more processors. Embodiments may be implemented in one or more computer programs executable on a programmable system, the programmable system comprising at least one coupled programmable processor to receive data and instructions from a data storage system, at least one input device, and at least one output device, and to transmit data and instructions to a data storage system, at least one input device, and at least one output device. Each computer program may be implemented in a high-level procedural or object-oriented programming language, and may also be implemented in assembly or machine language if desired; and in any case, the language may be a compiled language or an interpreted language. Suitable processors include, by way of example, general-purpose and special-purpose microprocessors. Typically, the processor will receive instructions and data from a read-only memory and / or a random access memory. Typically, a computer will include one or more mass storage devices for storing data files; such devices include disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including, for example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Any of the foregoing may be supplemented or incorporated in application specific integrated circuits (ASICs) and other forms of hardware.
[0129] Although the above description contains many details, these should not be construed as limiting the scope of the invention, but are merely different examples. It should be understood that the scope of the present disclosure includes other embodiments not discussed in detail above. Various other modifications, variations and variations that will be apparent to those skilled in the art can be made in the details of the arrangement, operation and methods of the methods and apparatus disclosed herein without departing from the spirit and scope of the present invention.
Claims
1. A method comprising: receiving a classical spin model for an I spin defined by a Hamiltonian that specifies an energy of a configuration of the I spin; as well as determining a quantum circuit which, when executed by a quantum computer, prepares in the quantum computer a quantum state |ψ> of n qubits, where n is less than I, and the quantum state |ψ> is a superposition of the configurations of the I spins representing the classical spin model, where |i> is the spin index of a single spin i in the configuration representing the I spin, and α i is the amplitude representing the spin value of spin i in the configuration of the I spin.
2. The method according to claim 1, wherein the number of spins I is equal to 2 n .
3. The method according to claim 1, wherein α i is a real number.
4. The method according to claim 1, wherein α i It is plural.
5. The method according to claim 1, wherein sign(α i ) represents the spin value of spin i.
6. The method according to claim 1, wherein α i The magnitude of represents the spin value of spin i.
7. The method according to claim 1, wherein the classical spin model is the Ising model, α i is a real number, and sign(α i ) represents the spin value of spin i.
8. The method according to claim 1, wherein the classical spin model is the Ising model, α i is a real or complex number, and α i The magnitude of represents the spin value of spin i.
9. The method according to claim 1, wherein the classical spin model is an XY model, α i is a complex number, and angle(α i ) represents the spin value of spin i.
10. The method according to claim 1, wherein the classical spin model is an XY model, α i is a real or complex number, and α i The magnitude of represents the spin value of spin i.
11. The method according to claim 1, further comprising: executing the quantum circuit by the quantum computer; executing a readout quantum circuit by the quantum computer, wherein execution of the readout quantum circuit modifies the quantum state |ψ> to form an output quantum state; measuring the output quantum state of the quantum computer; and A characteristic of the configuration of the I spin is determined based on the measured output quantum state.
12. The method of claim 11, wherein the property is the spin value of a spin in the configuration of the I spins, a magnetization of the configuration of the I spins, a spin-spin correlation between two spins in the configuration of the I spins, a sum of spin-spin correlations, the energy of the configuration of the I spins, or a spin structure factor of the configuration of the I spins.
13. The method of claim 11, wherein the readout quantum circuit comprises: A quantum gate that performs a Hadamard test using the quantum state |ψ>, or a quantum gate that applies a quantum Fourier transform to the quantum state |ψ>.
14. The method according to claim 1, further comprising: repeatedly executing the quantum circuit by the quantum computer; For each of the quantum circuits, perform: Select a measurement benchmark from a measurement benchmark set; as well as Measuring the quantum state |ψ> of the quantum computer using the selected measurement reference; as well as A neural network model is applied to the measurements, wherein the neural network model is trained to determine characteristics of the configuration of the I spin based on the measurements.
15. The method of claim 1, wherein determining the quantum circuit comprises: determining a quantum gate to be applied to the n quantum bits of the quantum computer; determining an arrangement of the quantum gates in the quantum circuit; as well as determining one or more gate parameters for one or more of the quantum gates, The one or more gate parameters include at least one of the following: a single-qubit rotation gate angle, a controlled phase gate phase, or a universal multi-qubit gate matrix entry.
16. The method of claim 1 , further comprising executing the quantum circuit by the quantum computer, wherein executing the quantum circuit comprises: Initializing each of the n qubits to state 0; Applying a Hadamard gate to each of the n qubits; as well as After applying the Hadamard gate to each qubit, only the combination of Z gates and controlled Z gates is applied to the n qubits.
17. The method of claim 1, further comprising executing the quantum circuit by the quantum computer, wherein executing the quantum circuit comprises: Initializing each of the n qubits to state 0; Applying a Hadamard gate to each of the n qubits; as well as After applying the Hadamard gate to each qubit, only a combination of multi-control qubit controlled U gates is applied to the n qubits, where U is a Z gate or a set of XZX gates.
18. The method of claim 1, further comprising: executing the quantum circuit by the quantum computer; executing a readout quantum circuit by the quantum computer to form an output quantum state; measuring the output quantum state of the quantum computer; determining, by a non-quantum computer, a characteristic of the configuration of the I spin based on the measured output quantum state; as well as A second set of quantum circuit parameters is determined by the non-quantum computer based on the characteristic.
19. A non-transitory computer-readable storage medium comprising instructions for determining storage of a quantum circuit that, when executed by a quantum computer, prepares a quantum state |ψ> of n qubits in the quantum computer, the quantum state |ψ> being a superposition of configurations of I spins representing a classical spin model, where |i> is the spin index of a single spin i in the configuration representing the I spin, and α i is the amplitude of the spin value of spin i in the configuration of the I spin, where n is less than I.
20. A quantum circuit which, when executed by a quantum computer, prepares a quantum state |ψ> of n quantum bits in the quantum computer, wherein the quantum state |ψ> is a superposition of configurations of I spins representing a classical spin model, where |i> is the spin index of a single spin i in the configuration representing the I spin, and α i is the amplitude of the spin value of spin i in the configuration of the I spin, where n is less than I.
