Hey Turi,
Yes, 5.1 is backwards compatible with 4.0 the only requirement we place on upgrades for qube! is that the supervisor be the first migrated.
The 5.1 supervisor is able to communicate with 3.5 and newer versions of qube!, the gui, jobtypes and client applications will be able to communicate with the supervisor. Just keep in mind that the new features supported by the 5.1 supervisor will only be accessable through the 5.1 client software.
Thanks,
Anthony