Nearest neighbor distances are obtained by coherent majority voting based on a plurality of available distance estimates produced using amplitude estimation without measurement in a quantum computer. In some examples, distances are Euclidean distances or are based on inner products of a target vector with vectors from a training set of vectors. Distances such as mean square distances and distances from a data centroid can also be obtained.
Please help me write a proper abstract based on the patent claims. CLAIM: 1-20. (canceled) 21. A method of preparing a quantum computation, comprising: with a computer, defining a first quantum circuit that obtains an estimate of a distance between a target vector and a data vector from a set of data vectors; with the computer, defining a second quantum circuit so as to produce a plurality of quantum states associated with corresponding distance estimates based on amplitude estimation without measurement and provide a distance estimate based on the plurality of amplitudes associated with quantum distances; and configuring a quantum computer based on the definition of the first quantum circuit and the second quantum circuit. 22. The method of claim 21, wherein the second quantum circuit is configured to produce a quantum state corresponding to a median value of the distance estimates. 23. The method of claim 21, wherein the second quantum circuit is configured to produce a median distance based on the quantum state corresponding to the median value of the distance estimates. 24. The method of claim 21, wherein the first quantum circuit determines the estimate of distance based on an inner product of the target vector and the vectors of the set of data vectors. 25. The method of claim 21, wherein the first quantum circuit determines the estimate of distance as a Euclidean distance between the target vector and the vectors of the set of data vectors. 26. The method of claim 21, further comprising defining a third quantum circuit configured to determine a nearest neighbor vector of the set of data vectors associated with a minimum distance between the target vector and the vectors of the set of data vectors. 27. The method of claim 26, wherein the third quantum circuit is configured to determine the nearest neighbor distance based on the Dürr-Høyer algorithm. 28. The method of claim 21, further comprising defining a third quantum circuit configured to determine a nearest neighbor distance corresponding to a minimum distance between the target vector and the vectors of the set of data vectors. 29. The method of claim 21, further comprising defining a third quantum circuit configured to determine an mth smallest distance between the target vector and the vectors of the set of data vectors or an index associated with the vector of the set of data vectors associated with the mth smallest distance. 30. The method of claim 29, wherein the first quantum circuit determines the estimate of distance based on an inner product of the target vector and the vectors of the set of data vectors or as a Euclidean distance between the target vector and the vectors of the set of data vectors. 31. The method of claim 21, further comprising defining a coherent voting quantum circuit that determines a number of votes associated with the plurality of amplitudes so that the distance estimate is based on the number of votes. 32. A computer-readable medium comprising computer-executable instructions for a method of specifying circuits for a quantum computer, the method comprising: defining a quantum distance circuit configured to implement a quantum distance operator; and establishing an amplitude estimation quantum circuit configured to provide a plurality of amplitudes associated with quantum distances based on the quantum distance operator, wherein the amplitudes are estimated without qubit measurement. 33. The computer-readable medium of claim 32, wherein the method further comprises defining a coherent voting quantum circuit that provides a distance estimate based on the plurality of amplitudes associated with quantum distances. 34. The computer readable medium of claim 33, wherein the distance estimate is an estimate of a minimum distance. 35. The computer readable medium of claim 34, wherein the quantum distance circuit is configured to produce distance as a Euclidean distance or an inner product. 36. The computer readable medium of claim 33, wherein the quantum distance circuit produces a distance from a data centroid, or a mean square distance from a data centroid. 37. The computer readable medium of claim 32, wherein distance of the plurality of distances are associated with data vectors in one or more training sets, and the method further comprises defining a circuit that assigns a target data vector to at least one training set based on the plurality of distances. 38. The computer-readable of claim 32, wherein the method the further comprises defining a quantum circuit configured to identify a data vector from a set of training set that is associated with an mth smallest distance from a target data, wherein the mth smallest distance is obtained based on the plurality of amplitudes provided by the amplitude estimation circuit. 39. The computer-readable medium of claim 38, wherein the quantum distance circuit produces a median value of a distance. 40. A quantum computer, comprising: a first quantum circuit configured to determine a distance between a target vector and vectors from a set of data vectors, wherein the distance is a Euclidean distance or an inner product; a second quantum circuit configured to produce a plurality of quantum states associated with corresponding distance estimates obtained with the first quantum circuit based on amplitude estimation without measurement; and a third quantum circuit configured to determine a nearest neighbor distance between the target vector and the vectors of the set of data vectors by selecting a median value based on the plurality of quantum states and the corresponding distance estimates of distances between the target vector and the vectors of the set of data vectors.