class_docstr: Testing the tracking capabilities of DefaultQubit.
class_docstr_tok: ["Testing","the","tracking","capabilities","of","DefaultQubit","."]
docstr: Test that the new default qubit integrates with the tracker.
docstr_tok: ["Test","that","the","new","default","qubit","integrates","with","the","tracker","."]
code: def test_tracking_batch(self):
      """Test that the new default qubit integrates with the tracker."""
  
      qs = qml.tape.QuantumScript([], [qml.expval(qml.PauliZ(0))])
  
      dev = qml.device("default.qubit")
      config = ExecutionConfig(gradient_method="adjoint")
      with qml.Tracker(dev) as tracker:
          dev.execute(qs)
          dev.compute_derivatives(qs, config)
          dev.execute([qs, qs])  # and a second time
  
      assert tracker.history == {
          "batches": [1, 1],
          "executions": [1, 1, 1],
          "simulations": [1, 1, 1],
          "results": [1.0, 1.0, 1.0],
          "resources": [
              Resources(num_wires=1),
              Resources(num_wires=1),
              Resources(num_wires=1),
          ],
          "derivative_batches": [1],
          "derivatives": [1],
      }
      assert tracker.totals == {
          "batches": 2,
          "executions": 3,
          "simulations": 3,
          "derivative_batches": 1,
          "derivatives": 1,
      }
      assert tracker.latest == {
          "executions": 1,
          "simulations": 1,
          "results": 1,
          "resources": Resources(num_wires=1),
      }
  
file_path: pennylane/tests/devices/test_default_qubit_tracking.py
imports: import pytest
  import numpy
  import pennylane
  from pennylane.resource import Resources
  from pennylane.devices import ExecutionConfig
label_desc: Use image node_id 3 for calling the TestTracking obj's underlying member method code with example usage: obj.test_tracking_batch() without return types