Skip to content

Commit ff82ef6

Browse files
committed
Added inverse sqrt(X) gate
1 parent ac51738 commit ff82ef6

File tree

1 file changed

+48
-4
lines changed

1 file changed

+48
-4
lines changed

lib/quantum-circuit.js

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ var QuantumCircuit = function(numQubits) {
305305
params: [],
306306
drawingInfo: {
307307
connectors: ["box"],
308-
label: "√NOT"
308+
label: "√X"
309309
},
310310
exportInfo: {
311311
quil: {
@@ -321,8 +321,8 @@ var QuantumCircuit = function(numQubits) {
321321
},
322322
quest: {
323323
name: "unitary",
324-
matrix: [[["1/sqrt(2)", "0"], ["-1/sqrt(2)", "0"]],
325-
[["-1/sqrt(2)", "0"],["1/sqrt(2)", "0"]]]
324+
matrix: [[["0.5", "0.5"], ["0.5", "-0.5"]],
325+
[["0.5", "-0.5"],["0.5", "0.5"]]]
326326
},
327327
qasm: {
328328
name: "sx"
@@ -340,6 +340,50 @@ var QuantumCircuit = function(numQubits) {
340340
}
341341
},
342342

343+
srndg: {
344+
description: "Inverse square root of NOT",
345+
matrix: [
346+
["0.5-0.5i","0.5+0.5i"],
347+
["0.5+0.5i","0.5-0.5i"]
348+
],
349+
params: [],
350+
drawingInfo: {
351+
connectors: ["box"],
352+
label: "√X†"
353+
},
354+
exportInfo: {
355+
quil: {
356+
name: "srndg",
357+
defgate: "DEFGATE srn:\n 0.5-0.5i, 0.5+0.5i\n 0.5+0.5i, 0.5-0.5i"
358+
},
359+
pyquil: {
360+
name: "srn",
361+
array: "[[0.5-0.5j, 0.5+0.5j], [0.5+0.5j, 0.5-0.5j]]"
362+
},
363+
cirq: {
364+
name: "X**(-1/2)"
365+
},
366+
quest: {
367+
name: "unitary",
368+
matrix: [[["0.5", "-0.5"], ["0.5", "0.5"]],
369+
[["0.5", "0.5"],["0.5", "-0.5"]]]
370+
},
371+
qasm: {
372+
name: "sxdg"
373+
},
374+
qiskit: {
375+
name: "sxdg"
376+
},
377+
braket: {
378+
name: "vi"
379+
},
380+
aqasm: {
381+
matrix: [["0.5-0.5i","0.5+0.5i"],["0.5+0.5i","0.5-0.5i"]],
382+
array: "[[0.5-0.5j, 0.5+0.5j], [0.5+0.5j, 0.5-0.5j]]"
383+
}
384+
}
385+
},
386+
343387
r2: {
344388
description: "PI/2 rotation over Z-axis aka \"Phase PI/2\"",
345389
matrix: [
@@ -1384,7 +1428,7 @@ var QuantumCircuit = function(numQubits) {
13841428
params: [],
13851429
drawingInfo: {
13861430
connectors: ["dot","box"],
1387-
label: "√NOT",
1431+
label: "√X",
13881432
root: "srn"
13891433
},
13901434
exportInfo: {

0 commit comments

Comments
 (0)