Skip to content

wilkensJ/drawio-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Circuit Library

How to use this library

There are 7 library parts: 1q, 2q, 3q, 4q/4q+, 5q/51+, classical, useful, and construction-kit. The last part lets you construct your outlines of any circuit you wish.

To open a draw.io online editor with the preloaded libraries click this link

If you wish to use the counter-intuitive way of drawing circuit diagrams (from left to right) click this link

For the large circuits library (not updated anymore) click on this link to open a draw.io editor with the preloaded L libraries.

Please cite this repository using the right panel or the CITATION.cff file when used in any publication.

Enabling mathematical typesetting Zoom
To use latex notation in the circuits and overall diagram document, click in the menu bar on Extras -> Mathematical typesetting. Use the zoom function by clicking on the magnifier under the menu bar.
Screenshot_Extras_mathematical_typesetting Zoom
Save to file Load other libraries
Select File-> Export as and choose a format. With the .png format, a border width can be defined. When other forms are needed like dashed rectangles, load other libraries with + More Shapes option under the existing libraries.
Bildschirmfoto 2023-01-19 um 21 52 27 Bildschirmfoto 2023-01-19 um 22 07 17

Example

In this example, illustrated with short gifs, a three-qubit circuit diagram is put together, saved to the scratchpad, and loaded from it.

Prebuild 3 qubits initialization By hand 3 qubits initialization
Drag and drop the wanted initialization gates, here it's three. They could be assembled by the single qubit init gates when aligned properly.
init gate init gate
Single qubit gate Two qubit gate
Align the single qubit gate along with the init box, the alignment lines turn solid blue once the right position is met. Now the two-qubit gate has to be aligned with the initialization and one qubit gate, again, the lines turn solid when it is aligned properly.
1q gate 2q gate
Toffoli Top Toffoli Middle Toffoli Bottom
Toffoli 1 Toffoli 2 Toffoli 3
Measurement Mathematical labeling
There are three different types of measurement boxes, here the one with no connector to the left is chosen to finish the diagram. Labeling the diagram parts is possible even with latex notation, double click the box and put two doller signs $$ around the latex part.
Measurement Mathematical typesetting
Save to Scratchpad Load from Scratchpad
Diagrams or parts of diagrams can be saved to the personal scratchpad. Select the parts and click the + sign next to the scratchpad to save it. When clicking on the diagram in the scratchpad, the whole saved diagram appears again.
Save to scratchpad Load from scratchpad

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published