Skip to content

Commit 9864c24

Browse files
authored
Merge pull request #628 from sandialabs/feature-mcfe-integration
Mirror circuit fidelity estimation support and introduction of benchmarking interface (name TBD)
2 parents 53cbda6 + 442d8b0 commit 9864c24

File tree

23 files changed

+6620
-182
lines changed

23 files changed

+6620
-182
lines changed

jupyter_notebooks/Examples/MCFE-Example.ipynb

Lines changed: 417 additions & 0 deletions
Large diffs are not rendered by default.

pygsti/baseobjs/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ def to_native(self):
18931893
"""
18941894
return tuple(self)
18951895

1896-
def replacename(self, oldname, newname):
1896+
def replace_name(self, oldname, newname):
18971897
"""
18981898
Returns a label with `oldname` replaced by `newname`.
18991899

pygsti/baseobjs/qubitgraph.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def shortest_path_predecessor_matrix(self):
853853
self._refresh_dists_and_predecessors()
854854
return self._predecessors.copy()
855855

856-
def subgraph(self, nodes_to_keep, reset_nodes=False):
856+
def subgraph(self, nodes_to_keep, reset_nodes=False, include_directions=True):
857857
"""
858858
Return a graph that includes only `nodes_to_keep` and the edges between them.
859859
@@ -867,6 +867,10 @@ def subgraph(self, nodes_to_keep, reset_nodes=False):
867867
be the integers starting at 0 (in 1-1 correspondence
868868
with the ordering in `nodes_to_keep`).
869869
870+
include_directions : bool, optional
871+
Whether the subgraph should retain the direction information
872+
of the parent graph. Defaults to True.
873+
870874
Returns
871875
-------
872876
QubitGraph
@@ -878,7 +882,7 @@ def subgraph(self, nodes_to_keep, reset_nodes=False):
878882
qubit_labels = nodes_to_keep
879883

880884
edges = []
881-
for edge in self.edges():
885+
for edge in self.edges(include_directions=include_directions):
882886
if edge[0] in nodes_to_keep and edge[1] in nodes_to_keep:
883887
if reset_nodes:
884888
edges.append((labelmap[edge[0]], labelmap[edge[1]]))

pygsti/circuits/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919
from .cloudcircuitconstruction import *
2020
from .gstcircuits import *
2121
# Unused: from rpecircuits import *
22+
23+
from .subcircuit_selection import *

pygsti/circuits/circuit.py

Lines changed: 308 additions & 3 deletions
Large diffs are not rendered by default.

pygsti/circuits/subcircuit_selection.py

Lines changed: 811 additions & 0 deletions
Large diffs are not rendered by default.

pygsti/extras/ibmq/ibmqexperiment.py

Lines changed: 168 additions & 84 deletions
Large diffs are not rendered by default.

pygsti/processors/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
# http://www.apache.org/licenses/LICENSE-2.0 or in the LICENSE file in the root pyGSTi directory.
1111
#***************************************************************************************************
1212

13-
from .processorspec import ProcessorSpec, QubitProcessorSpec, QuditProcessorSpec
14-
from .compilationrules import CompilationRules, CliffordCompilationRules, CompilationError
13+
from .processorspec import *
14+
from .compilationrules import *
15+
from .random_compilation import *

0 commit comments

Comments
 (0)