class_docstr: Tests for the annotated queue class
class_docstr_tok: ["Tests","for","the","annotated","queue","class"]
docstr: Tests that parallel queues do not queue each other's constituents.
docstr_tok: ["Tests","that","parallel","queues","do","not","queue","each","other","'s","constituents","."]
code: def test_parallel_queues_are_isolated(self):
      """Tests that parallel queues do not queue each other's constituents."""
      q1 = AnnotatedQueue()
      q2 = AnnotatedQueue()
      n = 10000
  
      def queue_pauli(arg):
          q, pauli = arg
          with q:
              for _ in range(n):
                  pauli(0)
  
      args = [(q1, qml.PauliX), (q2, qml.PauliY)]
      ThreadPool(2).map(queue_pauli, args)
      assert len(q1) == n
      assert len(q2) == n
      for queue, expected_op in args:
          assert all(isinstance(op, expected_op) for op in queue.queue)
  
imports: from multiprocessing.dummy import Pool
  import pytest
  import numpy
  import pennylane
  from pennylane.queuing import AnnotatedQueue, QueuingManager, QueuingError, WrappedObj
label_desc: Use image node_id 12 for calling the TestAnnotatedQueue obj's underlying member method code with example usage: obj.test_parallel_queues_are_isolated() without return types