Something strange occurs when optimizing physical dimensions in the "transmission line" model, the first model in the transmission line menu.
Optimization satisfies all of the requirements specified BUT when the physical dimensions are applied to the appropriate variables the performance does not remotely resemble the optimization prediction.
I hope that the netlist available from the QUCS simulation icon can be useful. This is the netlist when the optimizer is enabled:
Qucs 0.0.16 C:/Users/Randy/Downloads/detector.sch
MCROSS:MS2 _net0 _net1 _net2 _net3 Subst="Subst1" W1="10 mil" W2="10 mil" W3="10 mil" W4="10 mil" MSModel="Hammerstad" MSDispModel="Kirschning"
Diode:D_BAS70_1 _net6 _net7 Is="99.5p" N="1.7" Cj0="2p" M="0.333" Vj="0.7" Fc="0.5" Cp="0" Isr="0" Nr="2" Rs="0.6" Tt="7.2n" Ikf="0" Kf="0" Af="1" Ffe="1" Bv="70" Ibv="10u" Temp="26.85" Xti="3.0" Eg="1.11" Tbv="0.0" Trs="0.0" Ttt1="0.0" Ttt2="0.0" Tm1="0.0" Tm2="0.0" Tnom="26.85" Area="1.0"
Pac:P1 _net0 gnd Num="1" Z="50 Ohm" P="0 dBm" f="1 GHz" Temp="26.85"
C:C1 gnd _net7 C="20 pF" V=""
R:R1 gnd _net7 R="5000 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
ASCO configuration file(s) created
.DC:DC1 Temp="26.85" reltol="0.001" abstol="1 pA" vntol="1 uV" saveOPs="no" MaxIter="150" saveAll="no" convHelper="none" Solver="CroutLU"
R:R2 _net8 _net6 R="30" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.SP:SP1 Type="lin" Start="2 GHz" Stop="4 GHz" Points="19" Noise="no" NoiseIP="1" NoiseOP="2" saveCVs="no" saveAll="no"
Eqn:Eqn1 Input="max(mag(S[1,1]))" Ret_Loss="20*log10((mag(S[1,1])))" Export="yes"
SUBST:Subst1 er="4.4" h="63 mil" t="1.4 mil" tand="2e4" rho="0.022e6" D="0.15e6"
MLIN:MS3 _net1 _net4 Subst="Subst1" W="10 mil" L="L4" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
MLIN:MS4 _net5 _net3 Subst="Subst1" W="10 mil" L="L4" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
MRSTUB:MS6 _net5 Subst="Subst1" ri="10 mil" ro="L2" alpha="90"
MRSTUB:MS5 _net4 Subst="Subst1" ri="10 mil" ro="L2" alpha="90"
MLIN:MS1 _net2 _net8 Subst="Subst1" W="6 mil" L="L1" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
The optimized result indicates that the magnitude of S11 is less than .05 across the band of interest ! It's unlikely that anything except a resistor can exhibit this performance. OK, inserting the optimized variables and disabling optimization this is the netlist:
Qucs 0.0.16 C:/Users/Randy/Downloads/detector.sch
MCROSS:MS2 _net0 _net1 _net2 _net3 Subst="Subst1" W1="10 mil" W2="10 mil" W3="10 mil" W4="10 mil" MSModel="Hammerstad" MSDispModel="Kirschning"
Diode:D_BAS70_1 _net6 _net7 Is="99.5p" N="1.7" Cj0="2p" M="0.333" Vj="0.7" Fc="0.5" Cp="0" Isr="0" Nr="2" Rs="0.6" Tt="7.2n" Ikf="0" Kf="0" Af="1" Ffe="1" Bv="70" Ibv="10u" Temp="26.85" Xti="3.0" Eg="1.11" Tbv="0.0" Trs="0.0" Ttt1="0.0" Ttt2="0.0" Tm1="0.0" Tm2="0.0" Tnom="26.85" Area="1.0"
Pac:P1 _net0 gnd Num="1" Z="50 Ohm" P="0 dBm" f="1 GHz" Temp="26.85"
C:C1 gnd _net7 C="20 pF" V=""
R:R1 gnd _net7 R="5000 Ohm" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.DC:DC1 Temp="26.85" reltol="0.001" abstol="1 pA" vntol="1 uV" saveOPs="no" MaxIter="150" saveAll="no" convHelper="none" Solver="CroutLU"
R:R2 _net8 _net6 R="30" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
.SP:SP1 Type="lin" Start="2 GHz" Stop="4 GHz" Points="19" Noise="no" NoiseIP="1" NoiseOP="2" saveCVs="no" saveAll="no"
Eqn:Eqn1 Input="max(mag(S[1,1]))" Ret_Loss="20*log10((mag(S[1,1])))" Export="yes"
SUBST:Subst1 er="4.4" h="63 mil" t="1.4 mil" tand="2e4" rho="0.022e6" D="0.15e6"
MLIN:MS1 _net2 _net8 Subst="Subst1" W="6 mil" L="172.4 mil" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
MRSTUB:MS5 _net4 Subst="Subst1" ri="10 mil" ro="89.72 mil" alpha="90"
MRSTUB:MS6 _net5 Subst="Subst1" ri="10 mil" ro="89.72" alpha="90"
MLIN:MS3 _net1 _net4 Subst="Subst1" W="10 mil" L="22.2 mil" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
MLIN:MS4 _net5 _net3 Subst="Subst1" W="10 mil" L="22.2 mil" Model="Hammerstad" DispModel="Kirschning" Temp="26.85"
The magnitude of S11 is now greater than 0.7 in part of the band of interest !!!!
Questions:

Have I entered the circuit and the optimization parameters correctly ?

If so, is this a bug and is there a fix ?
Cheers,
Randy
Edited to add:
P.S. This doesn't happen with lumpedconstant LC transformation circuits 
Last edit: randyc 20130430