class_docstr: Tests that sampling is correctly implemented.
class_docstr_tok: ["Tests","that","sampling","is","correctly","implemented","."]
docstr: Tests that the np.random.normal is called with the correct parameters that reflect
  the underlying distribution for a squeezed state.
docstr_tok: ["Tests","that","the","np.random.normal","is","called","with","the","correct","parameters","that","reflect","the","underlying","distribution","for","a","squeezed","state","."]
code: def test_sampling_parameters_squeezed(
      self, tol, gaussian_device_1_wire, r, phi, monkeypatch
  ):
      """Tests that the np.random.normal is called with the correct parameters that reflect
      the underlying distribution for a squeezed state."""
  
      mean = 0.0
      std = np.sqrt(gaussian_device_1_wire.hbar * np.exp(2 * r) / 2)
      gaussian_device_1_wire.apply(
          "SqueezedState", wires=Wires([0]), par=[r, phi]
      )
  
      with monkeypatch.context() as m:
          m.setattr(numpy.random, "normal", input_logger)
          gaussian_device_1_wire.sample("QuadP", Wires([0]), [])
          assert np.isclose(
              input_logger.args[0], mean, atol=tol, rtol=0
          )
          assert np.isclose(input_logger.args[1], std, atol=tol, rtol=0)
          assert input_logger.args[2] == gaussian_device_1_wire.shots
  
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 3 for calling the TestSample obj's underlying member method code with example usage: obj.test_sampling_parameters_squeezed(tol, gaussian_device_1_wire, r, phi, monkeypatch) without return types