QuantestPy / quantestpy

Apache License 2.0
9 stars 3 forks source link

Add crx, cry, crz gates of QASM2.0 to TestCircuit #82

Closed mitz1012 closed 2 years ago

mitz1012 commented 2 years ago

This issue is separated from issue41.

cry(0.4) is given like crz.

q_0: ─────────────■────────────────■──
     ┌─────────┐┌─┴─┐┌──────────┐┌─┴─┐
q_1: ┤ Ry(0.2) ├┤ X ├┤ Ry(-0.2) ├┤ X ├
     └─────────┘└───┘└──────────┘└───┘

crx(0.4) is given as follows(we can use S gate instead of u1(pi/2) and RY(-0.2) gate instead of u3(-0.2,0,0).):

q_0: ─────────────■────────────────────■────────────────────
     ┌─────────┐┌─┴─┐┌──────────────┐┌─┴─┐┌────────────────┐
q_1: ┤ U1(π/2) ├┤ X ├┤ U3(-0.2,0,0) ├┤ X ├┤ U3(0.2,-π/2,0) ├
     └─────────┘└───┘└──────────────┘└───┘└────────────────┘