from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, Aer, execute

from qiskit.quantum_info import Statevector
from qiskit.visualization import plot_bloch_multivector, plot_histogram

import numpy as np
from numpy import pi
import math
from math import sqrt

import matplotlib as mpl
%matplotlib inline

inp_reg = QuantumRegister(2, name='inp')
ancilla = QuantumRegister(1, name='anc')
qcA = QuantumCircuit(inp_reg, ancilla)

qcA.h(inp_reg)
qcA.x(ancilla)
qcA.draw()

inp_reg = QuantumRegister(2, name='inp')
ancilla = QuantumRegister(1, name='anc')
qcB = QuantumCircuit(inp_reg, ancilla)

qcB.h(inp_reg[0:2])
qcB.x(ancilla[0])
qcB.draw()

inp_reg = QuantumRegister(2, name='inp')
ancilla = QuantumRegister(1, name='anc')
qcC = QuantumCircuit(inp_reg, ancilla)

qcC.h(inp_reg[0:1])
qcC.x(ancilla[0])
qcC.draw()

inp_reg = QuantumRegister(2, name='inp')
ancilla = QuantumRegister(1, name='anc')
qcD = QuantumCircuit(inp_reg, ancilla)

qcD.h(inp_reg[0])
qcD.h(inp_reg[1])
qcD.x(ancilla[0])
qcD.draw()

inp_reg = QuantumRegister(2, name='inp')
ancilla = QuantumRegister(1, name='anc')
qcE = QuantumCircuit(inp_reg, ancilla)

qcE.h(inp_reg[0])
qcE.h(inp_reg[1])
qcE.x(ancilla[0])
qcE.draw()

inp_reg = QuantumRegister(2, name='inp')
ancilla = QuantumRegister(1, name='anc')
qcF = QuantumCircuit(inp_reg, ancilla)

qcF.h(inp_reg)
qcF.h(inp_reg)
qcF.x(ancilla)
qcF.draw()

