def test_mixture_numpy_tensors(self, qubit_device_2_wires, tol):
    'Tests that qnodes work with python types and tensors.'

    @qml.qnode(qubit_device_2_wires, interface='tf')
    def circuit(w, x, y):
        qml.RX(x, wires=[0])
        qml.RX(y, wires=[1])
        return (qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliZ(1)))
    c = circuit(tf.constant(1.0), np.pi, np.pi).numpy()
    assert np.allclose(c, [(- 1.0), (- 1.0)], atol=tol, rtol=0)
Tests that qnodes work with python types and tensors.
def test_mixture_numpy_tensors(self, qubit_device_2_wires, tol):
    

    @qml.qnode(qubit_device_2_wires, interface='tf')
    def circuit(w, x, y):
        qml.RX(x, wires=[0])
        qml.RX(y, wires=[1])
        return (qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliZ(1)))
    c = circuit(tf.constant(1.0), np.pi, np.pi).numpy()
    assert np.allclose(c, [(- 1.0), (- 1.0)], atol=tol, rtol=0)