class_docstr: Test the AmplitudeAndPhase class that provides callable
  phase/amplitude combinations
class_docstr_tok: ["Test","the","AmplitudeAndPhase","class","that","provides","callable","phase\/amplitude","combinations"]
docstr: Test that when calling amplitude_and_phase, if only phase is callable,
  an AmplitudeAndPhase object with callable phase and fixed amplitude is
  correctly created
docstr_tok: ["Test","that","when","calling","amplitude_and_phase",",","if","only","phase","is","callable",",","an","AmplitudeAndPhase","object","with","callable","phase","and","fixed","amplitude","is","correctly","created"]
code: def test_amplitude_and_phase_callable_phase(self):
      """Test that when calling amplitude_and_phase, if only phase is callable,
      an AmplitudeAndPhase object with callable phase and fixed amplitude is
      correctly created"""
      f = amplitude_and_phase(np.sin, 2.7 / (2 * np.pi), callable_phase)
  
      # attributes are correct
      assert isinstance(f, AmplitudeAndPhase)
      assert f.amp_is_callable is False
      assert f.phase_is_callable is True
      assert f.func.__name__ == "callable_phase"
  
      # calling yields expected result
      expected_result = 2.7 * np.sin(callable_phase([1.3, 2.5], 2))
      assert f([1.3, 2.5], 2) == expected_result
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.pulse import HardwareHamiltonian, drive, rydberg_interaction
  from pennylane.pulse.hardware_hamiltonian import HardwarePulse, AmplitudeAndPhase, amplitude_and_phase, _reorder_parameters
  from pennylane.pulse.transmon import TransmonSettings
  from pennylane.pulse.rydberg import RydbergSettings
  from pennylane.wires import Wires
label_desc: Use image node_id 2 for calling the TestAmplitudeAndPhase obj's underlying member method code with example usage: obj.test_amplitude_and_phase_callable_phase() without return types