sdiagonalizability.jl
A dynamic algorithm to minimize or recognize the S-bandwidth of an undirected graph, written in Julia.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Keywords
Repository
A dynamic algorithm to minimize or recognize the S-bandwidth of an undirected graph, written in Julia.
Basic Info
- Host: GitHub
- Owner: GraphQuantum
- License: mit
- Language: Julia
- Default Branch: main
- Homepage: https://graphquantum.github.io/SDiagonalizability.jl/
- Size: 499 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 4
Topics
Metadata Files
README.md
GraphQuantum logo by Madiha Waqar
SDiagonalizability
| Metadata |
|
| Documentation |
|
| Continuous integration |
|
| Code coverage |
|
| Static analysis with |
|
Overview
SDiagonalizability.jl implements the first non-naïve deterministic algorithm to minimize the S-bandwidth of an undirected graph with integer edge weights. Capabilities also exist for determining whether a graph has S-bandwidth less than or equal to a fixed integer k ≥ 1 without necessarily caring about the true minimum value.
Given an undirected, possibly weighted graph G and finite set of integers S ⊂ Z, G is said to be "S-diagonalizable" if there exists some diagonal matrix D and matrix P with all entries from S such that G's Laplacian matrix L(G) = PDP-1. If G is S-diagonalizable, then its "S-bandwidth" is the minimum integer k ∈ {1, 2, …, |V(G)|} such that there exists some diagonal matrix D and matrix P with all entries from S such that L(G) = PDP-1 and [PTP]i,j = 0 whenever |i - j| ≥ k; otherwise, its S-bandwidth is simply ∞.
For specific choices of S (namely {-1, 1} and {-1, 0, 1}), the S-bandwidth of a quantum network has been shown to be an indicator of high state transfer fidelity due to automorphic properties of the graph. As such, the nascent study of S-diagonalizability and S-bandwidth is of interest in the broader context of quantum information theory.
Installation
The only prerequisite is a working Julia installation (v1.10 or later). First, enter Pkg mode by typing ] in the Julia REPL, then run the following command:
julia-repl
pkg> add SDiagonalizability
Basic use
SDiagonalizability.jl offers capabilities for S-bandwidth minimization, S-bandwidth recognition, and plain old S-diagonalizability checking. To compute the S-bandwidth of a graph, you can use the s_bandwidth function:
```julia-repl julia> using Graphs
julia> g = complete_graph(14) {14, 91} undirected simple Int64 graph
julia> res01neg = sbandwidth(g, (-1, 0, 1)) Results of S-Bandwidth Minimization * S: (-1, 0, 1) * S-Bandwidth: 2 * Graph Order: 14
julia> res01neg.sdiagonalization LinearAlgebra.Eigen{Int64, Int64, Matrix{Int64}, Vector{Int64}} values: 14-element Vector{Int64}: 0 14 14 14 14 14 14 14 14 14 14 14 14 14 vectors: 14×14 Matrix{Int64}: 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 0 -1 0 -1 1 1 1 0 0 0 1 0 0 0 0 0 -1 1 0 1 1 0 0 0 1 0 0 0 0 0 0 -1 0 1 -1 0 0 0 1 0 0 0 0 0 0 0 -1 -1 1 1 1 1 1 0 0 0 0 0 0 0 -1 -1 1 -1 -1 -1 1 1 1 0 0 0 0 0 0 -1 0 0 -1 1 1 -1 -1 0 0 0 0 0 0 -1 0 0 0 -1 1 0 -1 1 1 0 0 0 0 0 -1 0 0 0 1 0 0 -1 -1 0 0 0 0 0 -1 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 0 0 0 1 0 1 0 1 0 0 0 0 0 -1 0 0 0 1 -1 -1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 -1
julia> res1neg = sbandwidth(g, (-1, 1)) Results of S-Bandwidth Minimization * S: (-1, 1) * S-Bandwidth: 13 * Graph Order: 14
julia> res1neg.sdiagonalization LinearAlgebra.Eigen{Int64, Int64, Matrix{Int64}, Vector{Int64}} values: 14-element Vector{Int64}: 0 14 14 14 14 14 14 14 14 14 14 14 14 14 vectors: 14×14 Matrix{Int64}: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 -1 -1 1 1 1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 1 1 1 1 1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 ```
Alternatively, to determine whether a graph has S-bandwidth less than or equal to some fixed integer k ≥ 1 without
necessarily caring about the true (minimum) value, you can take advantage of has_s_bandwidth_at_most_k:
```julia-repl julia> using Graphs
julia> g = PetersenGraph() {10, 15} undirected simple Int64 graph
julia> res01neg = hassbandwidthatmostk(g, (-1, 0, 1), 4) Results of S-Bandwidth Recognition * S: (-1, 0, 1) * S-Bandwidth Threshold k: 4 * Has S-Bandwidth ≤ k: true * Graph Order: 10
julia> res01neg.sdiagonalization LinearAlgebra.Eigen{Int64, Int64, Matrix{Int64}, Vector{Int64}} values: 10-element Vector{Int64}: 0 5 5 5 5 2 2 2 2 2 vectors: 10×10 Matrix{Int64}: 1 1 1 0 0 1 1 1 1 1 1 -1 -1 1 1 0 0 0 0 1 1 0 1 -1 -1 0 -1 0 -1 -1 1 0 0 0 1 0 0 0 -1 -1 1 0 -1 0 -1 1 1 0 0 0 1 -1 0 -1 0 0 0 1 1 0 1 1 0 -1 -1 -1 0 -1 0 1 1 1 -1 1 0 0 -1 0 0 -1 1 0 0 1 0 -1 0 0 0 0 1 -1 1 0 1 0 0 -1 0 0
julia> res1neg = hassbandwidthatmostk(g, (-1, 1), 10) Results of S-Bandwidth Recognition * S: (-1, 1) * S-Bandwidth Threshold k: 10 * Has S-Bandwidth ≤ k: false * Graph Order: 10
julia> isnothing(res1neg.sdiagonalization) true ```
Lastly, the is_s_diagonalizable function can be used to simply determine whether a graph is S-diagonalizable:
```julia-repl julia> using Graphs
julia> L = laplacianmatrix(completemultipartite_graph([1, 1, 2, 2, 3])) 9×9 SparseArrays.SparseMatrixCSC{Int64, Int64} with 71 stored entries: 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 ⋅ -1 -1 -1 -1 -1 -1 -1 ⋅ 7 -1 -1 -1 -1 -1 -1 -1 -1 -1 7 ⋅ -1 -1 -1 -1 -1 -1 -1 ⋅ 7 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 ⋅ ⋅ -1 -1 -1 -1 -1 -1 ⋅ 6 ⋅ -1 -1 -1 -1 -1 -1 ⋅ ⋅ 6
julia> res01neg = iss_diagonalizable(L, (-1, 0, 1)) Results of S-Diagonalizability Check * S: (-1, 0, 1) * S-Diagonalizable: true * Graph Order: 9
julia> res01neg.sdiagonalization LinearAlgebra.Eigen{Int64, Int64, Matrix{Int64}, Vector{Int64}} values: 9-element Vector{Int64}: 0 6 6 7 7 9 9 9 9 vectors: 9×9 Matrix{Int64}: 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 -1 -1 1 1 0 0 1 1 -1 -1 1 -1 1 0 0 -1 -1 -1 -1 1 -1 1 0 0 -1 1 -1 1 -1 0 1 0 0 1 -1 -1 1 -1 0 1 1 1 0 0 1 0 0 0 1 -1 0 0 0 1 0 0 0 1 0 -1 0 0 1 0 0 0
julia> res1neg = iss_diagonalizable(L, (-1, 1)) Results of S-Diagonalizability Check * S: (-1, 1) * S-Diagonalizable: false * Graph Order: 9
julia> isnothing(res1neg.sdiagonalization) true ```
(As demonstrated in this last example, you can supply the Laplacian matrix of a graph as an alternative to the Graph object itself from the Graphs.jl package.)
Documentation
The full documentation is available at GitHub Pages. Documentation for methods and types is also available via the Julia REPL. (Note that as we have just completed development of the core API, many symbols lack complete documentation at this time—we aim to rectify this by the release of v0.2.0.)
Citing
We encourage you to cite our work if you have used our algorithm in your research. Starring the SDiagonalizability.jl repository on GitHub is also appreciated.
The latest citation information may be found in the CITATION.bib file within the repository.
Project status
The latest stable release of SDiagonalizability.jl is v0.1.2. Although a good chunk of documentation and tests is still missing, the core API is fully functional and the package is ready for use. We are currently working on filling in the gaps and aim to release a more polished update (v0.2.0) in the near future.
Credits
Created by Luis M. B. Varona, Dr. Nathaniel Johnston, and Dr. Sarah Plosker.
Insights from Benjamin Talbot, Logan Pipes, and Dr. Liam Keliher are gratefully acknowledged.
Additional thanks to Madiha Waqar for the GraphQuantum logo and Luc Campbell for code review.
Owner
- Name: GraphQuantum
- Login: GraphQuantum
- Kind: organization
- Repositories: 1
- Profile: https://github.com/GraphQuantum
Citation (CITATION.bib)
@misc{VJP25,
author = {Varona, Luis M. B. and Johnston, Nathaniel and Plosker, Sarah},
title = {GraphQuantum/SDiagonalizability.jl: A dynamic algorithm to minimize or recognize the \emph{S}-bandwidth of an undirected graph},
year = {2025},
url = {https://github.com/GraphQuantum/SDiagonalizability.jl}
}
GitHub Events
Total
- Create event: 89
- Release event: 6
- Issues event: 23
- Delete event: 94
- Issue comment event: 55
- Member event: 2
- Push event: 267
- Pull request event: 113
Last Year
- Create event: 89
- Release event: 6
- Issues event: 23
- Delete event: 94
- Issue comment event: 55
- Member event: 2
- Push event: 267
- Pull request event: 113
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 14
- Total pull requests: 62
- Average time to close issues: 7 days
- Average time to close pull requests: 4 minutes
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.64
- Average comments per pull request: 0.32
- Merged pull requests: 45
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 14
- Pull requests: 62
- Average time to close issues: 7 days
- Average time to close pull requests: 4 minutes
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 0.64
- Average comments per pull request: 0.32
- Merged pull requests: 45
- Bot issues: 0
- Bot pull requests: 2
Top Authors
Issue Authors
- Luis-Varona (13)
- JuliaTagBot (1)
Pull Request Authors
- Luis-Varona (60)
- github-actions[bot] (1)
- dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 3 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
juliahub.com: SDiagonalizability
A dynamic algorithm to minimize or recognize the S-bandwidth of an undirected graph, written in Julia.
- Homepage: https://graphquantum.github.io/SDiagonalizability.jl/
- Documentation: https://docs.juliahub.com/General/SDiagonalizability/stable/
- License: MIT
-
Latest release: 0.1.1
published 7 months ago
Rankings
Dependencies
- actions/checkout v4 composite
- codecov/codecov-action v5 composite
- julia-actions/cache v2 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-docdeploy v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v2 composite
- julia-actions/julia-format v4 composite
- JuliaRegistries/TagBot v1 composite