The HDMI 2.0 port on the latest M1 Pro and M1 Max MacBook Pros support the full 5120x1440 resolution at a 60Hz refresh rate.
Dual QHD (5120x1440) resolution requires an HDMI 2.0, USB-C with DisplayPort 1.2, or DisplayPort 1.2 and above, meaning you can also connect an ultrawide monitor via the Thunderbolt 3 port on your MacBook Pro.