class_docstr: Tests for differentiating a state vector.
docstr: Test a more complicated circuit with two parameters and two wires.
docstr_tok: ["Test","a","more","complicated","circuit","with","two","parameters","and","two","wires","."]
code: def test_two_wires_two_parameters(self):
      """Test a more complicated circuit with two parameters and two wires."""
  
      x = 0.5
      y = 0.6
      tape = qml.tape.QuantumScript(
          [qml.RX(x, 0), qml.RY(y, 1), qml.CNOT((0, 1))], [qml.state()]
      )
      x_jac, y_jac = adjoint_jacobian(tape)
  
      c_x, s_x = np.cos(x / 2), np.sin(x / 2)
      c_y, s_y = np.cos(y / 2), np.sin(y / 2)
      x_jac_expected = np.array(
          [
              -0.5 * c_y * s_x,
              -0.5 * s_y * s_x,
              -0.5j * s_y * c_x,
              -0.5j * c_x * c_y,
          ]
      )
      assert qml.math.allclose(x_jac, x_jac_expected)
  
      y_jac_expected = np.array(
          [
              -0.5 * c_x * s_y,
              0.5 * c_x * c_y,
              -0.5j * s_x * c_y,
              0.5j * s_x * s_y,
          ]
      )
      assert qml.math.allclose(y_jac, y_jac_expected)
  
      dy = np.array([0.5, 1.0, 2.0, 2.5])
      x_vjp, y_vjp = adjoint_vjp(tape, dy)
      x_vjp_expected = np.dot(x_jac_expected, dy)
      assert qml.math.allclose(x_vjp, x_vjp_expected)
      y_vjp_expected = np.dot(y_jac_expected, dy)
      assert qml.math.allclose(y_vjp, y_vjp_expected)
  
imports: import pytest
  import pennylane
  from pennylane.devices.qubit import adjoint_jacobian, adjoint_jvp, adjoint_vjp
  from pennylane.tape import QuantumScript
  import pennylane.numpy
label_desc: Use image node_id 2 for calling the TestAdjointJacobianState obj's underlying member method code with example usage: obj.test_two_wires_two_parameters() without return types