code: def qubit_pairs(args, length):
      
      if not isinstance(args, tuple):
          raise ValueError("Control and target qubits pair(s) are required.")
      if len(args) != 2:
          raise ValueError("Control and target qubits pair(s) are required.")
      controls = list(slicing(args[0], length))
      targets = list(slicing(args[1], length))
      if len(controls) != len(targets):
          raise ValueError("The number of control qubits and target qubits are must be same.")
      for c, z in zip(controls, targets):
          if c == z:
              raise ValueError("Control qubit and target qubit are must be different.")
      return zip(controls, targets)
docs: Internally used.