Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
98edf5f
Add QRE code owners for PR review assignment. (#2853)
msoeken Jan 15, 2026
24f5344
Merge branch 'main' into feature/qre
msoeken Jan 27, 2026
413cba3
Types to define ISAs and ISA requirements (#2856)
msoeken Jan 27, 2026
dcc53ed
Enumerate ISAs with transforms and queries (#2894)
msoeken Jan 30, 2026
0fae825
Initial commit; hypergraph module added (#2909)
brad-lackey Feb 2, 2026
c0308e9
Data types for traces, transforms, Pareto frontiers (#2907)
msoeken Feb 3, 2026
4c706d4
Magnets: added greedy edge coloring method, and two simple 1d lattice…
brad-lackey Feb 3, 2026
50d9bbc
Magnets: Base classes for Trotter-Suzuki expansions (#2913)
brad-lackey Feb 3, 2026
c8b973a
Base class for magnet models (#2914)
brad-lackey Feb 3, 2026
29c03ba
Magnets: more basic geometries (#2919)
brad-lackey Feb 6, 2026
ecd7e23
ISA queries, trace queries, and enumeration. (#2916)
msoeken Feb 7, 2026
aee65fa
Magnets: changed implementation of edge coloring (#2925)
brad-lackey Feb 9, 2026
b3f5198
Magnets: refactored Trotter step classes and added Suzuki and Yoshida…
brad-lackey Feb 9, 2026
b026182
New ISA and ISARequirements function (#2923)
msoeken Feb 10, 2026
289a181
Track instruction origin (#2933)
msoeken Feb 13, 2026
80ec786
Refactor trace and result properties (#2952)
msoeken Feb 17, 2026
bcc31d0
Brlackey/magnets ising model (#2955)
brad-lackey Feb 18, 2026
e19e6a1
Magnets: added utilities (#2965)
brad-lackey Feb 20, 2026
511c953
Various RE models and some API enhancements (#2963)
msoeken Feb 25, 2026
696f0dc
Merge branch 'main' into feature/qre
msoeken Feb 26, 2026
41bf7b5
Magnets: revisions to (hypergraph) coloring (#2972)
brad-lackey Feb 26, 2026
674124f
Minor changes to colorings and term representation; added Heisenberg …
brad-lackey Feb 27, 2026
1040016
More edits to functionality
brad-lackey Mar 5, 2026
739d087
Merge branch 'feature/qre' of github.com:microsoft/qdk into feature/qre
brad-lackey Mar 5, 2026
df1f2c2
Fix magnet tests (#3006)
msoeken Mar 10, 2026
bdddb70
Resource estimation results table (#2973)
msoeken Mar 11, 2026
a7d15c9
Refactor property keys from string to integer and add estimation impr…
msoeken Mar 16, 2026
8b1b520
QIR interop in QRE (#3018)
msoeken Mar 16, 2026
5ce010a
Split Yoked SC model into two codes (#3019)
msoeken Mar 17, 2026
0c86dbb
Use Rust parallelism for estimation with post processing (#3025)
msoeken Mar 17, 2026
dcadb5c
Fixes bucketing logic to distribute rotations to match the right dept…
msoeken Mar 23, 2026
317ff6a
Graph-based ISA pruning for resource estimation (#3031)
msoeken Mar 23, 2026
5de8ec1
Magnets: modified Trotter expansion classes and added Cirq output. (#…
brad-lackey Mar 23, 2026
1d5b568
Two small fixes to QRE 3 (#3041)
msoeken Mar 23, 2026
cd308a9
Return ISA as a pandas data frame (#3042)
msoeken Mar 23, 2026
8597d0a
Temporary plotting for estimation results (#3043)
msoeken Mar 23, 2026
232df87
Get the name of a known property ID as a string (#3044)
msoeken Mar 23, 2026
f1ceab8
Trace properties for logical qubits (#3045)
msoeken Mar 23, 2026
9d87a9c
Expose ISA requirements of a trace (#3046)
msoeken Mar 23, 2026
dabfa32
Trace ISA requirements (#3050)
msoeken Mar 25, 2026
c22cf5c
Plot multiple estimation tables in single plot (#3054)
msoeken Mar 25, 2026
0b92123
Create QRE traces from cirq circuits (#3060)
msoeken Mar 27, 2026
bc9a3c7
Merge branch 'main' into feature/qre
msoeken Mar 27, 2026
358171d
File missing from previous merge.
msoeken Mar 27, 2026
8f08a2b
Reorganize files and spit up large files in QRE (#3069)
msoeken Mar 30, 2026
c1bc4fc
Complete and consistent docs for QRE (#3077)
msoeken Apr 2, 2026
556e8a4
Remove matplotlib from tests (#3078)
msoeken Apr 2, 2026
cf70736
Adjust pruning logic for graph based search (#3089)
msoeken Apr 2, 2026
04f1e46
Merge branch 'main' into feature/qre
msoeken Apr 2, 2026
e5708d1
Fix CODEOWNERS file.
msoeken Apr 2, 2026
1c3b049
Enhance application models.
msoeken Apr 7, 2026
204c3e0
Address or postpone TODOs.
msoeken Apr 7, 2026
9d63b78
OpenQASM application model.
msoeken Apr 7, 2026
7c24ece
Re-export qre from the qdk package as extra dependency.
msoeken Apr 8, 2026
4b1acbf
Convenience functions for custom properties and property columns.
msoeken Apr 9, 2026
32ce932
API and doc improvements.
msoeken Apr 9, 2026
ce85591
Fix problem with negative exponents in cirq interop.
msoeken Apr 14, 2026
c923724
Initial commit for Ising notebook
brad-lackey Apr 14, 2026
923a356
Move magnets module into qre.application.
msoeken Apr 15, 2026
017ebfc
Add telemetry events for QRE.
msoeken Apr 15, 2026
fc899f9
Cirq interop handles memory/compute qubits.
msoeken Apr 15, 2026
0f31c20
Make RoundBasedFactory not expose lattice surgery instructions into p…
msoeken Apr 15, 2026
ef339bb
Clarify memory qubit tracking in Cirq interop.
msoeken Apr 15, 2026
6d801f2
Addressing reviewer comments.
msoeken Apr 16, 2026
74220b9
Missed pandas dependency in all.
msoeken Apr 16, 2026
2554fd7
Working on Ising model sample workbook
brad-lackey Apr 16, 2026
3aea86f
Remove spurious commented code
brad-lackey Apr 16, 2026
c379b59
Instruction IDs and property keys.
msoeken Apr 17, 2026
42666f3
Properties.
msoeken Apr 20, 2026
831833b
Updates to trotter.py
brad-lackey Apr 20, 2026
fe483f3
Merged feature/qre
brad-lackey Apr 20, 2026
8c7e875
More changes to notebooks; added move to ids
brad-lackey Apr 24, 2026
9db618b
Added a generic qubit architecture cell
brad-lackey Apr 27, 2026
f1dd8b5
Roughed out neutral atom model; new surface code
brad-lackey May 4, 2026
87172a3
Finished low move surface code
brad-lackey May 4, 2026
7f7950e
Merge with main.
brad-lackey May 4, 2026
3be1a12
Exported H, T, and CNOT from NeutralAtom class
brad-lackey May 5, 2026
6189408
Added tests
brad-lackey May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
649 changes: 504 additions & 145 deletions samples/estimation/estimation-hubbard-2D.ipynb

Large diffs are not rendered by default.

4,020 changes: 3,691 additions & 329 deletions samples/estimation/estimation-ising-2D.ipynb

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions source/pip/qsharp/qre/application/magnets/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# flake8: noqa F403
# pyright: ignore[reportWildcardImportFromLibrary]

"""Magnets application module.

Re-exports from the submodules."""

from .geometry import *
from .models import *
from .trotter import *
from .utilities import *
22 changes: 22 additions & 0 deletions source/pip/qsharp/qre/application/magnets/geometry/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Geometry module for representing quantum system topologies.

This module provides hypergraph data structures for representing the
geometric structure of quantum systems, including lattice topologies
and interaction graphs.
"""

from .complete import CompleteBipartiteGraph, CompleteGraph
from .lattice1d import Chain1D, Ring1D
from .lattice2d import Patch2D, Torus2D

__all__ = [
"CompleteBipartiteGraph",
"CompleteGraph",
"Chain1D",
"Ring1D",
"Patch2D",
"Torus2D",
]
150 changes: 150 additions & 0 deletions source/pip/qsharp/qre/application/magnets/geometry/complete.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Complete graph geometries for quantum simulations.

This module provides classes for representing complete graphs and complete
bipartite graphs as hypergraphs. These structures are useful for quantum
systems with all-to-all or bipartite all-to-all interactions.
"""

from ..utilities import (
Hyperedge,
Hypergraph,
HypergraphEdgeColoring,
)


class CompleteGraph(Hypergraph):
"""A complete graph where every vertex is connected to every other vertex.

In a complete graph K_n, there are n vertices and n(n-1)/2 edges,
with each pair of distinct vertices connected by exactly one edge.

Attributes:
n: Number of vertices in the graph.

Example:

.. code-block:: python
>>> graph = CompleteGraph(4)
>>> graph.nvertices
4
>>> graph.nedges
6
"""

def __init__(self, n: int, self_loops: bool = False) -> None:
"""Initialize a complete graph.

Args:
n: Number of vertices in the graph.
self_loops: If True, include self-loop edges on each vertex
for single-site terms.
"""
if self_loops:
_edges = [Hyperedge([i]) for i in range(n)]
else:
_edges = []

# Add all pairs of vertices
for i in range(n):
for j in range(i + 1, n):
_edges.append(Hyperedge([i, j]))
super().__init__(_edges)

self.n = n

def edge_coloring(self) -> HypergraphEdgeColoring:
"""Compute edge coloring for this complete graph."""
coloring = HypergraphEdgeColoring(self)
for edge in self.edges():
if len(edge.vertices) == 1:
coloring.add_edge(edge, -1)
else:
if self.n % 2 == 0:
i, j = edge.vertices
m = self.n - 1
if j == m:
coloring.add_edge(edge, i)
elif (j - i) % 2 == 0:
coloring.add_edge(edge, (j - i) // 2)
else:
coloring.add_edge(edge, (j - i + m) // 2)
else:
m = self.n
i, j = edge.vertices
if (j - i) % 2 == 0:
coloring.add_edge(edge, (j - i) // 2)
else:
coloring.add_edge(edge, (j - i + m) // 2)
return coloring


class CompleteBipartiteGraph(Hypergraph):
"""A complete bipartite graph with two vertex sets.

In a complete bipartite graph K_{m,n} (m <= n), there are m + n
vertices partitioned into two sets of sizes m and n. Every vertex
in the first set is connected to every vertex in the second set,
giving m * n edges total.

Vertices 0 to m-1 form the first set, and vertices m to m+n-1
form the second set.

Attributes:
m: Number of vertices in the first set.
n: Number of vertices in the second set.

Requires:
m <= n

Example:

.. code-block:: python
>>> graph = CompleteBipartiteGraph(2, 3)
>>> graph.nvertices
5
>>> graph.nedges
6
"""

def __init__(self, m: int, n: int, self_loops: bool = False) -> None:
"""Initialize a complete bipartite graph.

Args:
m: Number of vertices in the first set (vertices 0 to m-1).
n: Number of vertices in the second set (vertices m to m+n-1).
self_loops: If True, include self-loop edges on each vertex
for single-site terms.
"""
assert m <= n, "Require m <= n for CompleteBipartiteGraph."
total_vertices = m + n

if self_loops:
_edges = [Hyperedge([i]) for i in range(total_vertices)]

else:
_edges = []

# Connect every vertex in first set to every vertex in second set
for i in range(m):
for j in range(m, m + n):
_edges.append(Hyperedge([i, j]))
super().__init__(_edges)

self.m = m
self.n = n

def edge_coloring(self) -> HypergraphEdgeColoring:
"""Compute edge coloring for this complete bipartite graph."""
coloring = HypergraphEdgeColoring(self)
m = self.m
n = self.n
for edge in self.edges():
if len(edge.vertices) == 1:
coloring.add_edge(edge, -1)
else:
i, j = edge.vertices
coloring.add_edge(edge, (i + j - m) % n)
return coloring
123 changes: 123 additions & 0 deletions source/pip/qsharp/qre/application/magnets/geometry/lattice1d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""One-dimensional lattice geometries for quantum simulations.

This module provides classes for representing 1D lattice structures as
hypergraphs. These lattices are commonly used in quantum spin chain
simulations and other one-dimensional quantum systems.
"""

from ..utilities import (
Hyperedge,
Hypergraph,
HypergraphEdgeColoring,
)


class Chain1D(Hypergraph):
"""A one-dimensional open chain lattice.

Represents a linear chain of vertices with nearest-neighbor edges.
The chain has open boundary conditions, meaning the first and last
vertices are not connected.

Attributes:
length: Number of vertices in the chain.

Example:

.. code-block:: python
>>> chain = Chain1D(4)
>>> chain.nvertices
4
>>> chain.nedges
3
"""

def __init__(self, length: int, self_loops: bool = False) -> None:
"""Initialize a 1D chain lattice.

Args:
length: Number of vertices in the chain.
self_loops: If True, include self-loop edges on each vertex
for single-site terms.
"""
if self_loops:
_edges = [Hyperedge([i]) for i in range(length)]

else:
_edges = []

for i in range(length - 1):
_edges.append(Hyperedge([i, i + 1]))

super().__init__(_edges)
self.length = length

def edge_coloring(self) -> HypergraphEdgeColoring:
"""Compute a valid edge coloring for this chain."""
coloring = HypergraphEdgeColoring(self)
for edge in self.edges():
if len(edge.vertices) == 1:
coloring.add_edge(edge, -1)
else:
i, j = edge.vertices
color = min(i, j) % 2
coloring.add_edge(edge, color)
return coloring


class Ring1D(Hypergraph):
"""A one-dimensional ring (periodic chain) lattice.

Represents a circular chain of vertices with nearest-neighbor edges.
The ring has periodic boundary conditions, meaning the first and last
vertices are connected.

Attributes:
length: Number of vertices in the ring.

Example:

.. code-block:: python
>>> ring = Ring1D(4)
>>> ring.nvertices
4
>>> ring.nedges
4
"""

def __init__(self, length: int, self_loops: bool = False) -> None:
"""Initialize a 1D ring lattice.

Args:
length: Number of vertices in the ring.
self_loops: If True, include self-loop edges on each vertex
for single-site terms.
"""
if self_loops:
_edges = [Hyperedge([i]) for i in range(length)]
else:
_edges = []

for i in range(length):
_edges.append(Hyperedge([i, (i + 1) % length]))
super().__init__(_edges)

self.length = length

def edge_coloring(self) -> HypergraphEdgeColoring:
"""Compute a valid edge coloring for this ring."""
coloring = HypergraphEdgeColoring(self)
for edge in self.edges():
if len(edge.vertices) == 1:
coloring.add_edge(edge, -1)
else:
i, j = edge.vertices
if {i, j} == {0, self.length - 1}:
color = (self.length % 2) + 1
else:
color = min(i, j) % 2
coloring.add_edge(edge, color)
return coloring
Loading
Loading