Sunday, May 16, 2021

C1000-112 - Atoms of Computation

 Atoms of Computation


I did not study from 8-May to 16-May for this IBM Certification.  So did not post any blogs. 

Good thing was that I configured my laptop for practicing all QISKit examples. 

17-May : I studied and practiced the chapter "The Atoms of Computation" from this URL https://qiskit.org/textbook/ch-states/atoms-computation.html

Am sharing the QISKit Python code here

from qiskit import QuantumCircuit, assemble, Aer
from qiskit.visualization import plot_histogram
from qiskit_textbook.widgets import binary_widget
binary_widget(nbits=5)
n=8
n_q = n
n_c = n
qc_output = QuantumCircuit(n_q, n_c)
for j in range(n):
    qc_output.measure(j,j)
qc_output.draw()
#I wanted to compare the output of text and mpl format
qc_output.draw('mpl')  
sim = Aer.get_backend('qasm_simulator')
qobj = assemble(qc_output)
result = sim.run(qobj).result()
counts = result.get_counts()
plot_histogram(counts)

Output of the above code
Here is the Requirements.txt list if you are interested.  Please note that I have many other packages also, you can ignore them.

absl-py 0.11.0
appdirs 1.4.4
argon2-cffi 20.1.0
astunparse 1.6.3
async-generator 1.10
attrs 20.2.0
autograd 1.3
backcall 0.2.0
bleach 3.2.1
cachetools 4.2.1
certifi 2020.6.20
cffi 1.14.3
chardet 3.0.4
click 7.1.2
colorama 0.4.3
cryptography 3.1.1
cvxpy 1.1.8
cycler 0.10.0
Cython 0.29.21
decorator 4.4.2
defusedxml 0.6.0
dill 0.3.2
dimod 0.9.14
dlx 1.0.4
docplex 2.15.194
dwave-cloud-client 0.8.4
dwave-networkx 0.8.8
dwave-qiskit-plugin 0.1.0
dwave-system 1.4.0
dwave-tabu 0.3.1
ecos 2.0.7.post1
entrypoints 0.3
fastdtw 0.3.4
fasteners 0.16
fastjsonschema 2.14.5
flatbuffers 1.12
future 0.18.2
gast 0.3.3
google-auth 1.27.0
google-auth-oauthlib 0.4.2
google-pasta 0.2.0
grpcio 1.32.0
h5py 2.10.0
homebase 1.0.1
idna 2.10
inflection 0.5.1
ipykernel 5.3.4
ipython 7.18.1
ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.17.2
Jinja2 2.11.2
joblib 0.16.0
json5 0.9.5
jsonschema 3.2.0
jupyter-client 6.1.7
jupyter-core 4.6.3
jupyterlab 2.2.8
jupyterlab-pygments 0.1.1
jupyterlab-server   1.2.0
Keras-Preprocessing 1.1.2
kiwisolver 1.2.0
llvmlite 0.36.0
Markdown 3.3.3
MarkupSafe 1.1.1
matplotlib 3.3.2
minorminer 0.2.5
mistune 0.8.4
more-itertools 8.5.0
mpmath 1.1.0
multitasking 0.0.9
nbclient 0.5.0
nbconvert 6.0.5
nbformat 5.0.7
nest-asyncio 1.4.0
networkx 2.5
notebook 6.1.4
ntlm-auth 1.5.0
numba 0.53.1
numexpr 2.7.1
numpy 1.20.1
oauthlib 3.1.0
opt-einsum 3.3.0
osqp 0.6.2.post0
packaging 20.4
pandas 1.1.2
pandocfilters 1.4.2
parso 0.7.1
PennyLane 0.14.1
pickleshare 0.7.5
Pillow 7.2.0
pip 20.2.3
plucky 0.4.3
ply 3.11
prometheus-client 0.8.0
prompt-toolkit 3.0.7
protobuf 3.15.1
psutil 5.7.2
pyasn1 0.4.8
pyasn1-modules 0.2.8
pybind11 2.6.2
pycparser 2.20
Pygments 2.7.1
pylatexenc 2.7
pyparsing 2.4.7
pyrsistent 0.17.3
python-constraint 1.4.0
python-dateutil   2.8.1
pytz 2020.1
pywin32 228
pywinpty 0.5.7
pyzmq 19.0.2
qdldl 0.1.5.post0
qiskit 0.25.1
qiskit-aer 0.8.1
qiskit-aqua 0.9.1
qiskit-ibmq-provider 0.12.2
qiskit-ignis 0.6.0
qiskit-machine-learning 0.1.0
qiskit-terra 0.17.1
qiskit-textbook 0.1.0
Quandl 3.5.2
requests 2.24.0
requests-ntlm 1.1.0
requests-oauthlib 1.3.0
retworkx 0.8.0
rsa 4.7.1
scikit-learn 0.23.2
scipy 1.5.2
scs 2.1.2
semantic-version 2.6.0
Send2Trash 1.5.0
setuptools 47.1.0
six 1.15.0
sparse 0.12.0
sympy 1.6.2
tensorboard 2.4.1
tensorboard-plugin-wit 1.8.0
tensorflow 2.4.1
tensorflow-estimator 2.4.0
termcolor 1.1.0
terminado 0.9.1
testpath 0.4.4
threadpoolctl 2.1.0
toml 0.10.1
torch 1.7.1
tornado 6.0.4
traitlets 5.0.4
typing-extensions 3.7.4.3
urllib3 1.25.10
wcwidth 0.2.5
webencodings 0.5.1
websockets 8.1
Werkzeug 1.0.1
wheel 0.36.2
widgetsnbextension 3.5.1
wrapt 1.12.1
yfinance 0.1.54





No comments:

Post a Comment