Hi all.
My team and I are working on training and evaluating a Quantum - Classical hybrid neural networks and after training with lightning.qubit simulator, we wanted to see if using default.mixed noisy simulator will have significant effect on the results
However, we found that the results are identical , which we do not understand as we thought implementing noise would alter the results a bit.
What’s causing this? I attached our code for generating the quantum circuit.
def create_qnn(n_qubits, n_layers, device_type="lightning.qubit"):
dev = qml.device(device_type, wires=n_qubits)
@qml.qnode(dev)
def circuit(inputs, weights):
encoded_inputs = Arctan_Encoding()(inputs)
# Feature map
for i in range(n_qubits):
qml.RY(encoded_inputs[i], wires=i)
# Ansatz
for layer in range(n_layers):
for i in range(n_qubits):
qml.RY(weights[layer * n_qubits + i], wires=i)
for i in range(n_qubits - 1):
qml.CNOT(wires=[i, i + 1])
return [qml.expval(qml.PauliZ(i)) for i in range(n_qubits)]
weight_shapes = {"weights": n_layers * n_qubits}
return circuit, weight_shapes
Thank you