Closed AriJordan closed 4 years ago
Allows users to draw a histogram plot of all possible measurement outcomes.
Typical usage:
from projectq import MainEngine from projectq.ops import H, CNOT, Measure, All from projectq.libs.hist import histogram import matplotlib.pyplot as plt eng = MainEngine() qureg = eng.allocate_qureg(4) H | qureg[0] CNOT | (qureg[0], qureg[1]) CNOT | (qureg[0], qureg[2]) CNOT | (qureg[0], qureg[3]) eng.flush() histogram(eng.backend, qureg) plt.show() All(Measure) | qureg
Allows users to draw a histogram plot of all possible measurement outcomes.
Typical usage: