I am working with two random matrices, $Z$ and $H$:

1. $Z$ is an $n \times K$ matrix with entries sampled i.i.d. from a Bernoulli distribution: $Z_{ij} \sim \mathrm{Bernoulli}(p)$.
2. $H$ is a $K \times K$ matrix with entries sampled i.i.d. from a Gaussian distribution.

I've defined a matrix product as:
$ \kappa = ZHZ^T $

Given that $Z$ and $H$ are independent, I'm interested in computing $E\kappa^2$.

Any suggestions on how to approach this problem would be greatly appreciated. Thank you!