Search⌘ K

Executing the Circuit

Explore how to execute parameterized quantum circuits by including measurements and running simulations in a quantum Bayesian network context. Understand how to analyze survival probabilities from qubit states, use classical registers, and apply backend simulation methods to obtain empirical results in quantum machine learning.

Circuit execution

Javascript (babel-node)
# execute the qc
results = execute(qc,Aer.get_backend('statevector_simulator')).result().get_counts()
plot_histogram(results)

We can see eight different states. These belong to the victims (qubit q2=0q_2=0) and the survivors ( ...