def make_hardcore_boson_excitation_gate(self, indices, angle, control=None, assume_real=True, compile_options='optimize'):
    target = []
    for pair in indices:
        assert (len(pair) == 2)
        target += [pair[0], pair[1]]
    consistency = [(x < self.n_orbitals) for x in target]
    if (not all(consistency)):
        raise TequilaException('make_hardcore_boson_excitation_gate: Inconsistencies in indices={}. Should be indexed from 0 ... n_orbitals={}'.format(indices, self.n_orbitals))
    return gates.QubitExcitation(angle=angle, target=target, assume_real=assume_real, control=control, compile_options=compile_options)
def make_hardcore_boson_excitation_gate(self, indices, angle, control=None, assume_real=True, compile_options='optimize'):
    target = []
    for pair in indices:
        assert (len(pair) == 2)
        target += [pair[0], pair[1]]
    consistency = [(x < self.n_orbitals) for x in target]
    if (not all(consistency)):
        raise TequilaException('make_hardcore_boson_excitation_gate: Inconsistencies in indices={}. Should be indexed from 0 ... n_orbitals={}'.format(indices, self.n_orbitals))
    return gates.QubitExcitation(angle=angle, target=target, assume_real=assume_real, control=control, compile_options=compile_options)