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 error thrown when 'parameters' does not contain one set
  of parameters for each wire.
docstr_tok: ["Tests","that","error","thrown","when","'parameters","'","does","not","contain","one","set","of","parameters","for","each","wire","."]
code: def test_throws_error_when_mismatch_params_wires(
      self, parameters, n_wires
  ):
      """Tests that error thrown when 'parameters' does not contain one set
      of parameters for each wire."""
  
      dev = qml.device("default.qubit", wires=n_wires)
  
      @qml.qnode(dev)
      def circuit():
          broadcast(
              unitary=RX,
              wires=range(n_wires),
              pattern="single",
              parameters=parameters,
          )
          return qml.expval(qml.PauliZ(0))
  
      with pytest.raises(
          ValueError, match="Parameters must contain entries for"
      ):
          circuit()
  
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 7 for calling the TestBuiltinPatterns obj's underlying member method code with example usage: obj.test_throws_error_when_mismatch_params_wires(parameters, n_wires) and returns: qml