def TransconductanceAmplifierTwoPort(G, Zi, Zo, Z0=50.0):
    """TransconductanceAmplifierTwoPort
    Two port transconductance amplifier
    @param G float transconductance gain
    @param Zi float or complex input impedance
    @param Zo float or complex output impedance
    @param Z0 (optional) float reference impedance (defaults to 50 ohms)
    @return list of list s-parameter matrix for a transconductance amplifier
    @remark
    The two port transconductance amplifier is the same as the three port transconductance amplifier with
    port 3 grounded.

    The voltage sense element senses the voltage  to ground at port 1 shunted to ground
    with impedance of Zi.

    The current generated by the amplifier exits port 2 and
    is shunted to ground with Zo.

    """
    return [[(Zi - Z0) / (Zi + Z0), 0.0], [2.0 * G * Zi * Zo * Z0 / ((Zi +
        Z0) * (Zo + Z0)), (Zo - Z0) / (Zo + Z0)]]
