class_docstr: Test that the configuration class works as expected
class_docstr_tok: ["Test","that","the","configuration","class","works","as","expected"]
docstr: Test setting items.
docstr_tok: ["Test","setting","items","."]
code: def test_set_item(self, default_config):
      """Test setting items."""
  
      # set existing options
      default_config["main.shots"] = 10
      assert default_config["main.shots"] == 10
      assert default_config["main"]["shots"] == 10
  
      default_config["strawberryfields.global"]["hbar"] = 5
      assert default_config["strawberryfields.global.hbar"] == 5
      assert default_config["strawberryfields.global"]["hbar"] == 5
  
      # set new options
      default_config["qiskit.ibmq"]["backend"] = "ibmq_rome"
      assert default_config["qiskit.ibmq.backend"] == "ibmq_rome"
  
      # set nested dictionaries
      default_config["strawberryfields.tf"] = {
          "batched": True,
          "cutoff_dim": 6,
      }
      assert default_config["strawberryfields.tf"] == {
          "batched": True,
          "cutoff_dim": 6,
      }
  
      # set nested keys that don't exist dictionaries
      default_config["strawberryfields.another.hello.world"] = 5
      assert default_config["strawberryfields.another"] == {
          "hello": {"world": 5}
      }
  
imports: import os
  import pytest
  import toml
  import pennylane
  from pennylane import Configuration
label_desc: Use image node_id 2 for calling the TestProperties obj's underlying member method code with example usage: obj.test_set_item(default_config) without return types