Hi, I provided the following solution but it is not accepted:
def subcircuit_1(angle, wire_list):
"""
Implements the first subcircuit as a function of the RX gate angle
and the list of wires wire_list on which the gates are applied
"""
####################
###YOUR CODE HERE###
####################
qml.RX(angle, wires=wire_list[0])
qml.Y(wire_list[1])
def subcircuit_2(wire_list):
"""
Implements the second subcircuit as a function of the RX gate angle
and the list of wires wire_list on which the gates are applied
"""
####################
###YOUR CODE HERE###
####################
qml.H(wire_list[0])
qml.CNOT(wires=[wire_list[0], wire_list[1]])
dev = qml.device("default.qubit", wires = [0,1])
@qml.qnode(dev)
def full_circuit(theta, phi):
"""
Builds the full quantum circuit given the input parameters
"""
####################
###YOUR CODE HERE###
####################
subcircuit_1(theta, wire_list=[0, 1])
subcircuit_2(wire_list=[0, 1])
subcircuit_1(phi, wire_list=[1, 0])
return qml.state()
I always receive the error “Error: The full circuit QNode isn’t quite right.”