from qiskit import IBMQ

IBMQ.load_account()
# provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')
provider = IBMQ.get_provider(hub='ibm-q-oxford', group='on-boarding', project='on-boarding-proj')
from qiskit import BasicAer
backend = BasicAer.get_backend('unitary_simulator')

%matplotlib inline

from byskit import byskit,gen_random_weights

n_parent = 3
n_child = 3
parents,children = gen_random_weights(n_parent,n_child)
b = byskit(backend,parents,children)
b.circ.draw(output='mpl')

results = b.execute_circ()
plot_histogram(results.get_counts(b.circ))

n_parent = 2
n_child = 4
parents,children = gen_random_weights(n_parent,n_child)
b = byskit(backend,parents,children)
b.circ.draw(output='mpl')

results = b.execute_circ()
plot_histogram(results.get_counts(b.circ))