d-wave tikz: tools for generating TikZ pictures of various D-Wave topologies
What is this??
A collection of Python-based command line utilities that can generate standalone LateX documents with TikZ pictures of all currently available D-Wave annealers' topologies. The pictures contain minimum styling and should serve only for defining the "skeleton" of the graph.
The generated pictures heavily utilize TikZ styles, so you can adjust the looks of the pictures by tweaking style definitions at the very beginning of your TikZ picture.
What is this not?
The dwave-tikz is not designed for producing pretty pictures. Yes, it
contains basic styling, but the assumption is that you tweak the style
definition in the produced .tex file. Writing a comprehensive CLI allowing
one to control every single aspect of TikZ picture would be time consuming
beyond the point of being useful.
Installation
Python >= 3.8 is required. Other Python dependencies will be downloaded
during installation. The --compile flag assumes that latexmk is
available in your PATH variable.
To install the latest version just run:
pip install dwave-tikz
This should install the dwavetikz script in your path. To verify, run
dwavetikz -h
Usage
The CLI invocation looks as follows:
dwavetikz <topology> <size> [options]
Some options are common to all topologies, others are specific to only given topology. Anyway, you can always run
dwavetikz <topology> -h
to learn about all arguments available for given topology (both common and
specific). For instance, dwavetikz pegasus -h will give you all available
options for pegasus topoloy.
By default, the output is printed to stdout. You can either redirect it as
usually, or use --output parameter to provide a file name.
Additionally, if --compile flag is provided, an attempt will be made to
compile the output .tex file. Obviously, this only works in conjunction with
--output flag.
Examples
Warning If you are using dark Github theme, the SVG pictures presented in this section may look slightly unreadable, because they have transparent backgrounds.
Example 1: simple C2 Chimera, output to chimera.tex
dwavetikz chimera 2 --output chimera.tex
Example 2: the same Chimera, but with labels.
dwavetikz chimera 2 --output chimera2.tex --with-labels
Example 3: the same Chimera, with labels, and after changing styles.
dwavetikz chimera 2 --output chimera3.tex --with-labels
The styles were modified as follows (relevant part of chimera3.tex):
\begin{tikzpicture}[
scale=1,
coupler/.style={draw},
qubit/.style={
circle, line width=2pt, font={\large \bfseries}, fill=White,draw=darkgray,minimum size=7mm, inner sep=0.5mm
},
hidden/.style={opacity=0.0},
internal/.style={color=RoyalBlue, ultra thick, dashed},
external/.style={color=Tan, ultra thick},
]
Example 4: Chimera with 2 rows, 3 columns and nonstandard shore size of 8 (unit cells of such Chimera are ports of the Zephyr topology). It also uses larger scaling of coordinates to spread out nodes further away from each other (otherwise the nodes would overlap).
dwavetikz chimera 2 -n 3 -t 8 --output chimera4.tex --scale 40 --compile
Example 5: The P3 Pegasus using the default L-layout for Chimera unit cells.
dwavetikz pegasus 3 --output pegasus.tex
Example 6: The P3 Pegasus using the cross layout for Chimera unit cells.
dwavetikz pegasus 3 --cross --output pegasus2.tex
Example 7: The Z3 Zephyr graph.
dwavetikz zephyr 3 --cross --output zephyr.tex
Metadata
Release files for dwave-tikz 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dwave-tikz-0.0.2.tar.gz | 147.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dwave_tikz-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 299.4 kB
Release files / dwave-tikz-0.0.2.tar.gz
| Download URL | dwave-tikz-0.0.2.tar.gz |
|---|---|
| Size | 147.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38bc6b7976ed0e820e607ad8947b543bc4d75fa0aa02ba3bfba9ba0ecc9c1e85
|
|
BLAKE2b-256 checksum How to use checksums |
f15d3f71f96c79c2c871d52905d26da503cc0a025729f0965def5b02b02b2986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / dwave_tikz-0.0.2-py3-none-any.whl
| Download URL | dwave_tikz-0.0.2-py3-none-any.whl |
|---|---|
| Size | 152.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b208848125e6c07afe56a2af370db563299b5edab9f6aa7894c162ede7a9565a
|
|
BLAKE2b-256 checksum How to use checksums |
178ec31e807fcd60f44c15e6d276f99eaf528d628d7c38462bd32e95f79541a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for dwave-tikz 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.