def CurrentControlledVoltageSource(G, Z0=50.0):
    """ CurrentControlledVoltageSource
    Current controlled voltage source
    @param G float or complex transresistance.
    @param Z0 (optional) float or complex reference impedance Z0 (defaults to 50 ohms).
    @return s-parameter matrix of a current controlled voltage source.
    The four port current controlled voltage source has
    the current sense element sensing the current
    entering port 1 and exiting port 2.

    The voltage generated by the amplifier has its positive terminal
    at port 4 and its negative terminal at port 3.
    """
    return [[0.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0], [-G / (2.0 * Z0), G /
        (2.0 * Z0), 0.0, 1.0], [G / (2.0 * Z0), -G / (2.0 * Z0), 1.0, 0.0]]
