code: def get_constructor(self):
          
          if self.parameters:
              return lambda *params: lambda *qubits: \
                  Gate(name=self.name, params=list(params), qubits=list(map(unpack_qubit, qubits)))
          else:
              return lambda *qubits: Gate(name=self.name, params=[], qubits=list(map(unpack_qubit, qubits)))
docs: :returns: A function that constructs this gate on variable qubit indices. E.g.
                    `mygate.get_constructor()(1) applies the gate to qubit 1.`