microsoft / quantum-viz.js

quantum-viz.js is a configurable tool for rendering quantum circuits using pure HTML.
Other
44 stars 13 forks source link

SWAP gate support #50

Closed ElonDormancy closed 2 years ago

ElonDormancy commented 2 years ago

Is your feature request related to a problem? Please describe. It would be great and useful if you could add the SWAP gate in the qviz.

Describe the solution you'd like You may add an attribute "isSWAP" to the Operation Properties.

ElonDormancy commented 2 years ago

Sorry for bothering,I suddenly find that when the gate name is "SWAP",there it is. e.g.

const SWAP ={gate: 'SWAP', targets: [{ qId:0 }, { qId: 1}]