  The quantum singular value transformation has revolutionised quantum
algorithms. By applying a polynomial to an arbitrary matrix, it provides a
unifying picture of quantum algorithms. However, polynomials are restricted to
definite parity and real coefficients, and finding the circuit (the phase
factors) has proven difficult in practice. Recent work has removed these
restrictions and enabled faster computation of phase factors, yet only for
unitary matrices. Here we propose two generalisations. The generalised quantum
singular value transformation allows complex polynomials for arbitrary
matrices. For Hermitian matrices, we propose the generalised quantum eigenvalue
transformation that even allows polynomials of indefinite parity. While we find
that the polynomial might have to be downscaled compared to the quantum
singular value transformation, the higher expressivity of polynomials and
faster computation of phase factors can sometimes result in advantages. The
results are achieved with various block encoding (or projected unitary
encoding) techniques, including qubitisation, Hermitianisation, and
multiplication. We show how to multiply block-encoded matrices with only one
extra qubit, and introduce measure-early multiplication to further avoid the
extra qubit and decrease average circuit length.
