A method of fabricating a composite device for splitting photonic functions between two or more materials, the method comprising: aligning a first mask with a target; etching a recess in a silicon platform comprising a device layer with a waveguide based on the first mask aligned with the target; bonding a III/V-semiconductor material chip to the platform, wherein: the chip comprises an active region; the chip is bonded in the recess of the platform such that the active region is optically aligned with the device layer; the chip comprises an etch stop; the chip comprises a portion of a substrate; a gap separates a side of the chip and a wall of the recess; and the chip bonded to the platform forms the composite device; removing the portion of the substrate of the chip after bonding the chip in the recess of the platform by etching the portion of the substrate to the etch stop; applying a contact metal on top of the chip; at least partially covering both the platform and the chip with a first material thus filling the gap; applying a second mask that defines an area to etch over the gap; partially removing first material in the gap based on the second mask defining the area to etch over the gap; at least partially filling the gap with a second material; removing a portion of the second material from the gap; at least partially covering both the platform and the chip with a third material; applying a third mask to define an area to remove from the chip to form a feature on the chip; removing material from the chip to form the feature on the chip; and covering the chip with a fourth material. aligning a first mask with a target; etching a recess in a silicon platform comprising a device layer with a waveguide based on the first mask aligned with the target; bonding a III/V-semiconductor material chip to the platform, wherein: the chip comprises an active region; the chip is bonded in the recess of the platform such that the active region is optically aligned with the device layer; the chip comprises an etch stop; the chip comprises a portion of a substrate; a gap separates a side of the chip and a wall of the recess; and the chip bonded to the platform forms the composite device; removing the portion of the substrate of the chip after bonding the chip in the recess of the platform by etching the portion of the substrate to the etch stop; applying a contact metal on top of the chip; at least partially covering both the platform and the chip with a first material thus filling the gap; applying a second mask that defines an area to etch over the gap; partially removing first material in the gap based on the second mask defining the area to etch over the gap; at least partially filling the gap with a second material; removing a portion of the second material from the gap; at least partially covering both the platform and the chip with a third material; applying a third mask to define an area to remove from the chip to form a feature on the chip; removing material from the chip to form the feature on the chip; and covering the chip with a fourth material. the chip comprises an active region; the chip is bonded in the recess of the platform such that the active region is optically aligned with the device layer; the chip comprises an etch stop; the chip comprises a portion of a substrate; a gap separates a side of the chip and a wall of the recess; and the chip bonded to the platform forms the composite device; removing the portion of the substrate of the chip after bonding the chip in the recess of the platform by etching the portion of the substrate to the etch stop; applying a contact metal on top of the chip; at least partially covering both the platform and the chip with a first material thus filling the gap; applying a second mask that defines an area to etch over the gap; partially removing first material in the gap based on the second mask defining the area to etch over the gap; at least partially filling the gap with a second material; removing a portion of the second material from the gap; at least partially covering both the platform and the chip with a third material; applying a third mask to define an area to remove from the chip to form a feature on the chip; removing material from the chip to form the feature on the chip; and covering the chip with a fourth material.