Question: Importing the qiskit module from qiskit import * # Defining input, output and scratch qubits x = # number of input qubits y1 = #

Importing the qiskit module
from qiskit import *
# Defining input, output and scratch qubits
x = # number of input qubits
y1 = # number of output qubit
s1 = # number of scratch qubit
# Defining Quantum Circuit with the given circuits
def Circuit_1(In,Ou,Sc):
if Sc != 0:
# initiating required qubits
X = QuantumRegister(In, 'input')
Y = QuantumRegister(Ou, 'output')
S = QuantumRegister(Sc, 'scratch')
# creating circuit with above qubits
Circ = QuantumCircuit(X,Y,S)
else:
# initiating required qubits
X = QuantumRegister(In, 'input')
Y= QuantumRegister(Ou, 'output')
# creating circuit with above qubits
Circ = QuantumCircuit(X,Y)
##### Create you circuit below #########
########################################
# Uncomment to draw quantum circuit
# display(Circ.draw('mpl'))
# Transpiling the circuit into u, cnot
Circ = transpile(Circ, basis_gates=['u3','cx'])
# Uncomment to draw transpiled circuit
# display(Circ.draw('mpl'))
return Circ
qc_1a = Circuit_1(x,y1,s1)
please continue the (#) code please yo should write the code on python
 Importing the qiskit module from qiskit import * # Defining input,

The task here is two provide three QASM circuits computing the mappings |x,0,0) = ei0;(x)|X, Y;(x),() expressed using single-qubit and CNOT gates, where (y1, y2, y3) = Popcount(x) is the 4-input 3- output Popcount function and j e {1,2,3}. Each of the three will be scored separately. a) Circuit for j = 1 |x,0,0) = 2101(x)|x, y (x), 0) The task here is two provide three QASM circuits computing the mappings |x,0,0) = ei0;(x)|X, Y;(x),() expressed using single-qubit and CNOT gates, where (y1, y2, y3) = Popcount(x) is the 4-input 3- output Popcount function and j e {1,2,3}. Each of the three will be scored separately. a) Circuit for j = 1 |x,0,0) = 2101(x)|x, y (x), 0)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!