The weapon is not magical but the bonus is a magical effect. Regardless it doesn't stack with Elemental Weapon
Pact Weapons are normally nonmagical
To begin we need to ask whether the Pact of Blade weapon is a magic weapon without benefitting from the Improved Pact Magic invocation. This answer says that it is not and therefore is not destroyed by an anti-magic field. The test for determining if something is magical is as follows:
- Is it a magic item?
- Is it a spell? Or does it let you create the effects of a spell
that’s mentioned in its description?
- Is it a spell attack?
- Is it fueled by the use of spell slots?
- Does its description say it’s magical?
The regular Pact Weapon does not fulfill any of these criteria.
The Pact Boon described (PHB, 107) makes no mention of the gift being magical.
your otherworldly patron bestows a gift upon you for your loyal service.
The description of the Pact Weapon also does not call it magical. It is only treated as magical with regards to overcoming resistance. (PHB, 107)
This weapon counts as magical for the purpose of overcoming resistance and immunity to non-magical attacks and damage.
This does not make it a magical item. This same wording is used by Monk's Ki Empowered Strikes feature (PHB, 79) yet a monk would hardly be considered a magical weapon. Since conjuring a weapon out of nothing strains the limits of what can be considered non-magical a DM might rule that conjuring a Pact Weapon is magical and so is impossible inside an antimagic field. This would not make a Pact Weapon magical itself, however. Objects can be created/transported via magic without becoming magical. An example of this is the Forge Cleric's Channel Divinity: Artisan's Blessing that magically creates a nonmagical item.
Does the Improved Pact Weapon invocation make the Pact Weapon a magic weapon?
The invocation reads:
the weapon gains a +1 bonus to its attack and damage rolls, unless it is a magic weapon that already has a bonus to those rolls.
This does not state that the weapon becomes magical. Read alone it doesn't even count as a magical effect.
Read in conjunction with the description of Eldritch Invocations (PHB, 107) it is clear that Improved Pact Weapon is a magical effect.
In your study of occult lore, you have unearthed eldritch invocations, fragments of forbidden knowledge that imbue you with an abiding magical ability.
A magical effect buffing a weapon does not necessarily make the weapon magical
- There are other magical abilities that grant bonuses to hit/damage without making the weapon magical. These include Flame Arrows, Absorb Elements, and the War Cleric's Channel Divinity: Guided Strike. Of particular note is Flame Arrows because the magical effect exclusively applies to ammunition drawn from the enchanted quiver.
- Other spells/abilities that turn a weapon into a magic weapon explicitly say so. These include Elemental Weapon, and Magic Weapon.
The eldritch invocation grants the Warlock, "you", an "abiding magical ability". In the case of Improved Pact Weapon the magic ability increases the hit bonus and damage done by Pact Weapons. The bonus is the warlock's effect on the weapon rather than the weapon itself being improved. This is supported by how the weapon disappears/unbonds on the warlock's death or if separated for more than 1 minute.
In addition it would be odd for a Hexblade Warlock to lose the ability to enchant their weapon with one of their Patron Spells by taking an invocation. The invocation is designed to enhance to Pact Weapon not to limit it which suggests preventing Elemental Weapon from being cast on a Pact Weapon would not be RAI.
The issue can also be tested by imagining Pact Weapons did not bypass nonmagic resistance and the Improved Pact Weapon instead granted only additional magic damage, parallel to a Cleric's Divine Strike. If a warlock were to strike a creature with nonmagic resistance with their Pact Weapon the weapon's regular damage would be halved but the extra damage would not. If granting a damage/attack bonus to a specific weapon via a class feature automatically made that weapon magical then said weapon would bypass nonmagic resistance even without the feature specifying. There are many examples of class features granting magical bonuses to hit/damage, however, so the only unique thing about Improved Pact Weapon is that the buff is restricted to a particular weapon. I don't see strong reasons to believe that makes a difference especially considering Flame Arrows also is restricted to a particular item at time of casting.
The Pact Weapon is unusual because it ignores magical resistances and receives a magical bonus from Improved Pact Weapon without being magical itself. As such Improved Pact Weapon does not prevent the use of Elemental Weapon.
Unfortunately for the Warlock trying to layer bonuses, Elemental Weapon specifically says it causes the weapon to be a magic weapon (PHB, 237)
A nonmagical weapon you touch becomes a magic weapon.
The Improved Pact Weapon invocation does not grant a +1 bonus to attack and damage if the weapon "is a magic weapon that already has a bonus to those rolls". As soon as Elemental Weapon is cast the damage and hit bonuses provided by Improved Pact Weapon end.
The damage and hit bonuses Elemental Weapon and Improved Pact Weapon do not stack. Improved Pact Weapon will still provide expanded Pact Weapon options and the ability to use the Pact Weapon as a spellcasting focus. It can also be used with magical weapons that do not provide a bonus to hit or damage such as a Sword of Wounding. Whether a magic sword that provides extra attack damage through an alternate means, such as Flame Tongue, would work is an additional question.
If there is a caster who wants to spend a 3rd level spell and concentration to give the warlock an extra 2.5 elemental damage less 1 weapon damage they can do so. Even cast as a 5th level spell, however, it will only do about 1 point extra damage over casting Hex. The only way I can imagine it being worth it is if it is free (cast by an NPC) or if the enemy is vulnerable to a type of elemental damage.
TLDR: Improved Pact Weapon cannot give bonuses to a Magic Weapon ...
that gives a bonus to hit or damage. As such Improved Magic Weapon will not stack with any effect that makes a weapon a magic weapon. These effects include Elemental Weapon, Magic Weapon, and the Artificer's Enhanced Weapon infusion.