# US 11,966,707 B2 · Quantum enhanced word embedding for natural language processing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,966,707 B2
- Document ID: US11966707B2
- Status: Granted
- Kind: B2
- Application number: 17/574,684
- Filed: 2022-01-13
- Published: 2023-05-11
- Granted: 2024-04-23
- Earliest claimed: 2021-01-13
- Assignees: Zapata Computing, Inc.
- Applicants: Zapata Computing, Inc.
- Inventors: Yudong Cao
- Web page: https://patentgrep.com/patent/US11966707B2

## CPC

- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06F 15/16: Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs {(coordinating program control therefor G06F9/52; in regulating and control system G05B)}
- G06F 40/30: Semantic analysis
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06N 10/00: Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N 10/20: Models of quantum computing, e.g. quantum circuits or universal quantum computers
- G06N 10/60: Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A quantum-enhanced system and method for natural language processing (NLP) for generating a word embedding on a hybrid quantum-classical computer. A training set is provided on the classical computer, wherein the training set provides at least one pair of words, and at least one binary value indicating the correlation between the pair of words. The quantum computer generates quantum state representations for each word in the pair of words. The quantum component evaluates the quantum correlation between the quantum state representations of the word pair using an engineering likelihood function and a Bayesian inference. Training the word embedding on the quantum computer is provided using an error function containing the binary value and the quantum correlation.

## Claims

### Claim 1

A method, performed on a hybrid quantum-classical computer system, for generating a word embedding, the computer system comprising a classical computer and a quantum computer,
the classical computer including a processor, a non-transitory computer-readable medium, and computer instructions stored in the non-transitory computer-readable medium;
the quantum computer including a quantum component, having a plurality of qubits, which accepts a sequence of instructions to evolve a quantum state based on a series of quantum gates;
wherein the computer instructions, when executed by the processor, perform a method for generating, on the hybrid quantum-classical computer, a word embedding for at least one pair of words;
wherein the classical computer includes a training set of training samples comprising: (1) a word pair set, the word pair set comprising N pairs of words, wherein N≥1, and (2) for each pair of words P in the word pair set, a numerical value BP indicating a classical correlation between the words in the pair of words P;
the method comprising:
generating, on the quantum computer, a plurality of quantum state representations including one quantum state representation for at least one word in the word pair set; and
training a quantum correlation between: (1) words in a word pair X in the pairs of words on the quantum computer using an error function, (2) the numerical value BX corresponding to the word pair X, and (3) the plurality of quantum state representations,
the word embedding including the quantum correlation.

### Claim 2 (depends on 1)

The method of claim 1, wherein training the quantum correlation comprises using an engineered likelihood function to train the quantum correlation.

### Claim 3 (depends on 2)

The method of claim 2, wherein the engineering likelihood function is implemented as a parameterized quantum circuit.

### Claim 4 (depends on 1)

The method of claim 1, wherein training the quantum correlation comprises using Bayesian inference to train the quantum correlation.

### Claim 5 (depends on 1)

The method of claim 1, wherein N>100,000.

### Claim 6 (depends on 1)

The method of claim 1, wherein the training set comprises a set of triples (x, y, b), and wherein, in each of the triples T: (1) x and y in triple T are two words in a corresponding pair of words in the word set, and (2) b in triple T is a binary value indicating whether the two words in the corresponding pair of words are semantically correlated.

### Claim 7 (depends on 1)

The method of claim 1, wherein for each pair of words Pin the word pair set, the numerical value BP comprises a binary value indicating whether the words in the pair of words P are semantically correlated.

### Claim 8 (depends on 1)

The method of claim 1, further comprising generating, on the classical computer, the training set using the “skip-gram with negative sampling” method.

### Claim 9 (depends on 1)

The method of claim 1, wherein training the quantum correlation comprises training the quantum correlation using quantum amplitude estimation.

### Claim 10 (depends on 1)

The method of claim 1, further comprising applying the word embedding in a natural language processing (NLP) application.

### Claim 11 (depends on 1)

The method of claim 1, further comprising determining a level of association between each pair of words by a distance metric.

### Claim 12 (depends on 11)

The method of claim 11, wherein the distance metric is represented by a function of at least one quantum state.

### Claim 13 (depends on 1)

The method of claim 1, wherein the classical correlation comprises a semantic correlation.

### Claim 14 (depends on 1)

The method of claim 1, wherein the classical correlation comprises a contextual correlation.

### Claim 15 (depends on 1)

The method of claim 1, wherein the training includes evaluating quantum representations of each word pair using a SWAP test.

### Claim 16 (depends on 1)

The method of claim 1, wherein the training includes testing the word embedding using overlap estimation.

### Claim 17 (depends on 1)

The method of claim 1, wherein the generating comprises generating, on the quantum computer, the plurality of quantum state representations including one quantum state representation for each of the words in the N pairs of words in the word pair set.

### Claim 18 (depends on 1)

The method of claim 1, further comprising repeating the training for each word pair in the N pairs of words.

### Claim 19 (depends on 18)

The method of claim 18, wherein N>100,000.

### Claim 20

A hybrid quantum-classical computer system for generating a word embedding, comprising:
a classical computer and a quantum computer;
the classical computer including a processor, a non-transitory computer-readable medium, and computer instructions stored in the non-transitory computer-readable medium;
the quantum computer including a quantum component, having a plurality of qubits, which accepts a sequence of instructions to evolve a quantum state based on a series of quantum gates;
wherein the computer instructions, when executed by the processor, perform a method for generating, on the hybrid quantum-classical computer, a word embedding for at least one pair of words;
wherein the classical computer includes a training set of training samples comprising: (1) a word pair set, the word pair set comprising N pairs of words, wherein N≥1, and (2) for each pair of words P in the word pair set, a numerical value BP indicating a classical correlation between the words in the pair of words P;
the method comprising:
generating, on the quantum computer, a plurality of quantum state representations including one quantum state representation for at least one word in the word pair set; and
training a quantum correlation between: (1) words in a word pair X in the pairs of words on the quantum computer using an error function, (2) the numerical value BX corresponding to the word pair X, and (3) the plurality of quantum state representations,
the word embedding including the quantum correlation.

### Claim 21 (depends on 20)

The system of claim 20, wherein training the quantum correlation comprises using an engineered likelihood function to train the quantum correlation.

### Claim 22 (depends on 21)

The system of claim 21, wherein the engineering likelihood function is implemented as a parameterized quantum circuit.

### Claim 23 (depends on 20)

The system of claim 20, wherein training the quantum correlation comprises using Bayesian inference to train the quantum correlation.

### Claim 24 (depends on 20)

The system of claim 20, wherein N>100,000.

### Claim 25 (depends on 20)

The system of claim 20, wherein the training set comprises a set of triples (x, y, b), and wherein, in each of the triples T: (1) x and y in triple T are two words in a corresponding pair of words in the word set, and (2) b in triple T is a binary value indicating whether the two words in the corresponding pair of words are semantically correlated.

### Claim 26 (depends on 20)

The system of claim 20, wherein for each pair of words Pin the word pair set, the numerical value BP comprises a binary value indicating whether the words in the pair of words P are semantically correlated.

### Claim 27 (depends on 20)

The system of claim 20, further comprising generating, on the classical computer, the training set using the “skip-gram with negative sampling” method.

### Claim 28 (depends on 20)

The system of claim 20, wherein training the quantum correlation comprises training the quantum correlation using quantum amplitude estimation.

### Claim 29 (depends on 20)

The system of claim 20, wherein the method further comprises applying the word embedding in a natural language processing (NLP) application.

### Claim 30 (depends on 29)

The system of claim 29, wherein the distance metric is represented by a function of at least one quantum state.

### Claim 31 (depends on 20)

The system of claim 20, wherein the method further comprises determining a level of association between each pair of words by a distance metric.

### Claim 32 (depends on 20)

The system of claim 20, wherein the classical correlation comprises a semantic correlation.

### Claim 33 (depends on 20)

The system of claim 20, wherein the classical correlation comprises a contextual correlation.

### Claim 34 (depends on 20)

The system of claim 20, wherein the training includes evaluating quantum representations of each word pair using a SWAP test.

### Claim 35 (depends on 20)

The system of claim 20, wherein the training includes testing the word embedding using overlap estimation.

### Claim 36 (depends on 20)

The system of claim 20, wherein the generating comprises generating, on the quantum computer, the plurality of quantum state representations including one quantum state representation for each of the words in the N pairs of words in the word pair set.

### Claim 37 (depends on 36)

The system of claim 36, wherein N>100,000.

### Claim 38 (depends on 20)

The system of claim 20, further comprising repeating the training for each word pair in the N pairs of words.
