class_docstr: Tests the built-in patterns ("single", "ring", etc) of the broadcast template constructor.
class_docstr_tok: ["Tests","the","built-in","patterns","(","``","single","''",",","``","ring","''",",","etc",")","of","the","broadcast","template","constructor","."]
docstr: Tests that the special error is thrown when 'parameters' does not contain one sequence
  of parameters for a two-wire ring pattern.
docstr_tok: ["Tests","that","the","special","error","is","thrown","when","'parameters","'","does","not","contain","one","sequence","of","parameters","for","a","two-wire","ring","pattern","."]
code: def test_throws_special_error_for_ring_pattern_2_wires(self):
      """Tests that the special error is thrown when 'parameters' does not contain one sequence
      of parameters for a two-wire ring pattern."""
  
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(pars):
          broadcast(
              unitary=RX,
              wires=range(2),
              pattern="ring",
              parameters=pars,
          )
          return qml.expval(qml.PauliZ(0))
  
      pars = [[1.6], [2.1]]
  
      with pytest.raises(
          ValueError,
          match="the ring pattern with 2 wires is an exception",
      ):
          circuit(pars)
  
imports: from math import pi
  import pytest
  import numpy
  import pennylane
  from pennylane.templates import broadcast
  from pennylane.ops import RX, RY, T, S, Rot, CRX, CRot, CNOT
  from pennylane.templates.broadcast import wires_pyramid, wires_all_to_all, wires_ring
  from pennylane.wires import Wires
label_desc: Use image node_id 8 for calling the TestBuiltinPatterns obj's underlying member method code with example usage: obj.test_throws_special_error_for_ring_pattern_2_wires() and returns: qml