Search⌘ K
AI Features

Quantum Rejection Sampling

Explore how quantum rejection sampling works to estimate probabilities by generating and selecting relevant samples. Understand challenges with low sample usefulness and how quantum amplitude amplification enhances the probability of obtaining desired evidence. Learn to design oracles and entangle qubits for targeting specific outcomes within quantum Bayesian networks to improve sampling efficiency.

Rejection sampling is a straightforward method. We create samples and pick the ones that contain the evidence we’re interested in. The problem with this type of sampling is that we generate many samples that we don’t end up using. Let’s look at the following case of calculating the probability of female children being favored by a norm.

Evaluate the effectiveness

Javascript (babel-node)
norm_mes = get_trained_qbn_norm(train, trained_params)
print("{:.2f} of female children were favored by a norm ".format(
norm_mes['111']/(norm_mes['111']+norm_mes['011'])))
print("Considered {} samples ".format(
norm_mes['111']+norm_mes['011']))
print ("Acceptance of {:.1f}% of the samples".format(
(norm_mes['111']+norm_mes['011'])/100))

We repeated our quantum circuit 10,000 times, but only around 200 instances were female children. This reflects that our data that contains only very few female children.

It results in only 2% of the samples being useful. This can become a problem if the network becomes complex.

What if we had a way of increasing the probability of obtaining the proper evidence?

We have one! In a QBN, a quantum state represents a possible configuration of passenger ...