The Modi-Trump bilateral on the G7 sidelines touched on technology, trade and defence cooperation with both leaders expressing optimism about the relationship.