class_docstr: Test the default gaussian device. The test ensures that the device is properly
  applying gaussian operations and calculating the correct observables.
class_docstr_tok: ["Test","the","default","gaussian","device",".","The","test","ensures","that","the","device","is","properly","applying","gaussian","operations","and","calculating","the","correct","observables","."]
docstr: Test reduced state
docstr_tok: ["Test","reduced","state"]
code: def test_reduced_state(self, gaussian_dev, tol):
      """Test reduced state"""
  
      # Test requesting via an integer
      res = gaussian_dev.reduced_state(Wires(0))
      expected = gaussian_dev.reduced_state(Wires([0]))
      assert res[0] == pytest.approx(expected[0], abs=tol)
      assert res[1] == pytest.approx(expected[1], abs=tol)
  
      # Test requesting all wires returns the full state
      res = gaussian_dev.reduced_state(Wires([0, 1]))
      expected = gaussian_dev._state
      assert res[0] == pytest.approx(expected[0], abs=tol)
      assert res[1] == pytest.approx(expected[1], abs=tol)
  
imports: import numpy
  import numpy.random
  import pytest
  from scipy.linalg import block_diag
  from scipy.special import factorial
  import pennylane
  from pennylane import DeviceError
  from pennylane.devices.default_gaussian import fock_prob, rotation, squeezing, quadratic_phase, beamsplitter, two_mode_squeezing, controlled_addition, controlled_phase, vacuum_state, coherent_state, squeezed_state, displaced_squeezed_state, thermal_state
  from pennylane.wires import Wires
label_desc: Use image node_id 13 for calling the TestDefaultGaussianDevice obj's underlying member method code with example usage: obj.test_reduced_state(gaussian_dev, tol) without return types