def test_keywordarg_passes_through_classicalnode(self, qubit_device_2_wires, tol):
    "Tests that qnodes' keyword arguments pass through classical nodes."

    def circuit(w, x=None):
        qml.RX(w, wires=[0])
        qml.RX(x, wires=[1])
        return (qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliZ(1)))
    circuit = qml.QNode(circuit, qubit_device_2_wires).to_tf()

    def classnode(w, x=None):
        return circuit(w, x=x)
    c = classnode(tf.constant(0.0), x=np.pi)
    assert np.allclose(c.numpy(), [1.0, (- 1.0)], atol=tol, rtol=0)
Tests that qnodes' keyword arguments pass through classical nodes.
def test_keywordarg_passes_through_classicalnode(self, qubit_device_2_wires, tol):
    

    def circuit(w, x=None):
        qml.RX(w, wires=[0])
        qml.RX(x, wires=[1])
        return (qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliZ(1)))
    circuit = qml.QNode(circuit, qubit_device_2_wires).to_tf()

    def classnode(w, x=None):
        return circuit(w, x=x)
    c = classnode(tf.constant(0.0), x=np.pi)
    assert np.allclose(c.numpy(), [1.0, (- 1.0)], atol=tol, rtol=0)