code: def indices_up_to(n_max):
      """Returns an iterator over the number of qubits and output dimension, up to value n_max.
      The output dimension never exceeds the number of qubits."""
  
      a, b = np.tril_indices(n_max)
      return zip(*[a + 1, b + 1])
  
imports: from collections import defaultdict
  import numpy
  import pytest
  import pennylane
label_desc: Use image node_id 3 for calling a global function with example usage: indices_up_to(n_max) and returns: zip