import numpy as np
from qiskit import(
  QuantumCircuit,
  execute,
  Aer)
from qiskit.visualization import plot_histogram

circuit = QuantumCircuit(2, 2) # Two Qubit and 2 Classical bit (q,c)
circuit.h(0)
circuit.cx(0, 1) #Controlled-NOT Gate
circuit.measure([0,1], [0,1]) #([q,q],[c,c])
circuit.draw()

simulator = Aer.get_backend('qasm_simulator')
job = execute(circuit, simulator, shots=100)
result = job.result()
counts = result.get_counts(circuit)
print("\nTotal count for 00 and 11 are:",counts)

plot_histogram(counts)

