| 1 |
.PS |
| 2 |
# QuantumDPV.m4 |
| 3 |
cct_init |
| 4 |
|
| 5 |
[ |
| 6 |
boxht = 0.30 |
| 7 |
boxwid = boxht |
| 8 |
define(`dotrad_',boxht/5) |
| 9 |
|
| 10 |
define(`Bus',`line right_ 10*boxwid `$1' |
| 11 |
circle diam boxht `$2' at last line.start |
| 12 |
box fill_(1) "H" at last line.start+(boxwid*3/2,0) |
| 13 |
box fill_(1) "H" at last line.end-(boxwid*2.5,0) ') |
| 14 |
|
| 15 |
define(`Meter',`[ Box: box wid boxwid*3/2 fill_(1) |
| 16 |
r = Box.wid/3 |
| 17 |
C: 0.3 between Box.s and Box.n |
| 18 |
arc cw from C+(-r,0) to C+(r,0) with .c at C |
| 19 |
arrow from C+(-r/4,0) to C+(0.9*r,0.9*r) ]') |
| 20 |
|
| 21 |
X: Bus(,shaded rgbstring(0.5,0.5,1) "X") |
| 22 |
A1: Bus(from X.start+(0,-boxht*3/2), shaded "red" "A") |
| 23 |
A2: Bus(from 2 between X.start and A1.start,shaded "red" "A") |
| 24 |
dot(at X.start+(3*boxwid,0)) |
| 25 |
line to (Here,A2); dot |
| 26 |
circle rad dotrad_ at A1.start+(4*boxwid,0) |
| 27 |
line from last circle.s to (last circle,X); dot |
| 28 |
Meter with .e at X.end |
| 29 |
box wid boxwid*1.2 ht boxht*1.2 fill_(1) \ |
| 30 |
"svg_it(R`'svg_sub(svg_psi)svg_sup(svg_pi/2,,,-1ex))" \ |
| 31 |
at A2.end-(4.5*boxwid,0) |
| 32 |
] |
| 33 |
[ |
| 34 |
# Rxx gate |
| 35 |
# https://tex.stackexchange.com/questions/741304/quantikz-how-to-draw-a-r-xx-gate-using-quantikz-in-latex |
| 36 |
define(`dotrad_',`(0.04*dimen_)') |
| 37 |
|
| 38 |
linethick = 1.6 |
| 39 |
define(`Box',`[ box wid boxwid*2/3 ht boxht*2/3 rad boxht/8 \ |
| 40 |
outlined rgbstring(10,0,0) fill_(1) \ |
| 41 |
"svg_theta`'svg_sub(svg_it(xx))`'svg_sup(svg_comma`$1'svg_comma`$2',,,-1ex)" |
| 42 |
"svg_small(2)" colored "red" at last box+(-textht/3,textht*3/4) ]') |
| 43 |
|
| 44 |
del = boxht/4 |
| 45 |
Outer: box rad boxht/4 dashed wid 3*boxwid ht 4*boxwid \ |
| 46 |
shaded rgbstring(1,0.95,0.95) |
| 47 |
Rxx: [ |
| 48 |
B1: Box(1,svg_it(i)) |
| 49 |
B2: Box(1,svg_it(j)) with .w at B1.e+(del,0) |
| 50 |
B3: Box(1,svg_it(j)) with .n at (1/2 between B1 and B2,B1.s-(0,B1.ht+del)) |
| 51 |
B4: Box(1,8) with .w at B3.e+(B1.ht+del/2,0) |
| 52 |
B5: Box(svg_it(j),8) with .n at (B1,B4.s-(0,B1.ht+del)) |
| 53 |
B6: Box(svg_it(i),8) at (B4.w.x-del/2,B5.y) |
| 54 |
I1: B1.nw+(-B1.ht,del) |
| 55 |
Rail1: line from I1 right_ B4.e.x+B1.w.x-2*I1.x |
| 56 |
Rail2: line from (Rail1.start,B3.n+(0,del)) right_ Rail1.len |
| 57 |
Rail3: line from (Rail1.start,B3.s-(0,del)) right_ Rail1.len |
| 58 |
Rail4: line from (Rail1.start,B5.s-(0,del)) right_ Rail1.len |
| 59 |
define(`connx', |
| 60 |
`dot(at (`$1',`$2')); line to `$1'.n; dot(at (`$1',`$3')); line to `$1'.s') |
| 61 |
connx(B1,Rail1,Rail2) |
| 62 |
connx(B2,Rail1,Rail3) |
| 63 |
connx(B3,Rail2,Rail3) |
| 64 |
connx(B4,Rail1,Rail4) |
| 65 |
connx(B5,Rail3,Rail4) |
| 66 |
connx(B6,Rail2,Rail4) |
| 67 |
"..." at (B3,Rail2)+(0,del*3/2) |
| 68 |
"..." at (B6,Rail2)+(0,del*3/2) |
| 69 |
"..." at (B2,Rail3)-(0,del*2/3) |
| 70 |
] at Outer |
| 71 |
#.PE |
| 72 |
] with .nw at last [].ne+(boxht/3,0) |
| 73 |
|
| 74 |
[ |
| 75 |
cct_init(svg_font(sans-serif,11bp__)) |
| 76 |
down_ |
| 77 |
S1: SQUID |
| 78 |
|
| 79 |
"J1" at S1.J1 above rjust |
| 80 |
"J2" at S1.J2 above ljust |
| 81 |
|
| 82 |
S2: SQUID(3,dimen_*1.5,-120) at S1.e+(elen_,0) |
| 83 |
"J1" at S2.J1 above rjust |
| 84 |
"J2" at S2.J2 below ljust |
| 85 |
"J3" wid 0.2 at S2.J3 above ljust |
| 86 |
arcrad = S2.C.rad*0.7 |
| 87 |
arc from S2.c+(Rect_(arcrad,-135)) to S2.c+(Rect_(arcrad,-45)) \ |
| 88 |
with .c at S2.C -> |
| 89 |
command "</g>" # end font |
| 90 |
] with .w at (1st [].w.x+boxwid/2,last [].s.y+boxht) |
| 91 |
|
| 92 |
.PE |