class_docstr: Tests for computing the maximum entropy of a given state.
class_docstr_tok: ["Tests","for","computing","the","maximum","entropy","of","a","given","state","."]
docstr: Test `max_entropy` differentiability with torch interface.
docstr_tok: ["Test","`","max_entropy","`","differentiability","with","torch","interface","."]
code: def test_max_entropy_grad_torch(
      self, params, wires, base, check_state
  ):
      """Test `max_entropy` differentiability with torch interface."""
      params = torch.tensor(params, requires_grad=True)
  
      max_entropy = qml.math.max_entropy(
          params, wires, base, check_state
      )
      max_entropy.backward()
      gradient = params.grad
  
      assert qml.math.allclose(gradient, 0.0)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling the TestMaxEntropy obj's underlying member method code with example usage: obj.test_max_entropy_grad_torch(params, wires, base, check_state) without return types