input: Write a function to parse a given json-formatted string into a dictionary. If the input is not a valid json string, raise a ValueError. The function should be named "parse_json_to_dict".
  
  assert parse_json_to_dict('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}')=={"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}
  assert parse_json_to_dict('{"name": "Alice","age": 25}')=={"name": "Alice","age": 25}
  try:
      parse_json_to_dict('{"name": "Bob", "age": }')
  except ValueError:
      assert True
  else:
      assert False
output: import json
  
  def parse_json_to_dict(json_str):
      try:
          return json.loads(json_str)
      except json.JSONDecodeError:
          raise ValueError("Invalid JSON string")