Skip to content

Commit

Permalink
Merge branch 'main' into power_gate
Browse files Browse the repository at this point in the history
  • Loading branch information
edyounis committed Jul 22, 2024
2 parents 07f95eb + c1629e7 commit 0fbe10a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions bqskit/compiler/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from bqskit.passes.mapping.routing.pam import PAMRoutingPass
from bqskit.passes.mapping.routing.sabre import GeneralizedSabreRoutingPass
from bqskit.passes.mapping.setmodel import ExtractModelConnectivityPass
from bqskit.passes.mapping.setmodel import RestoreModelConnevtivityPass
from bqskit.passes.mapping.setmodel import RestoreModelConnectivityPass
from bqskit.passes.mapping.setmodel import SetModelPass
from bqskit.passes.mapping.topology import SubtopologySelectionPass
from bqskit.passes.mapping.verify import PAMVerificationSequence
Expand Down Expand Up @@ -1012,7 +1012,7 @@ def build_multi_qudit_retarget_workflow(
optimization_level,
synthesis_epsilon,
),
RestoreModelConnevtivityPass(),
RestoreModelConnectivityPass(),
],
AutoRebase2QuditGatePass(3, 5, synthesis_epsilon),
),
Expand Down Expand Up @@ -1257,7 +1257,7 @@ def build_seqpam_mapping_optimization_workflow(
PAMRoutingPass(),
post_pam_seq,
UnfoldPass(),
RestoreModelConnevtivityPass(),
RestoreModelConnectivityPass(),

LogPass('Recaching permutation-aware synthesis results.'),
SubtopologySelectionPass(block_size),
Expand Down
16 changes: 8 additions & 8 deletions bqskit/ir/gates/parameterized/u8.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def get_grad(self, params: RealVector = []) -> npt.NDArray[np.complex128]:
[ # wrt params[0]
[-s1 * c2 * p1, c1 * p3, -s1 * s2 * p4],
[
-c1 * c2 * c3 * p1 * p2 * m3, -s1
* c3 * p2, -c1 * s2 * c3 * p2 * m3 * p4,
-c1 * c2 * c3 * p1 * p2 * m3, -s1 * c3 * p2,
-c1 * s2 * c3 * p2 * m3 * p4,
],
[
-c1 * c2 * s3 * p1 * m3 * p5, -s1
* s3 * p5, -c1 * s2 * s3 * m3 * p4 * p5,
-c1 * c2 * s3 * p1 * m3 * p5, -s1 * s3 * p5,
-c1 * s2 * s3 * m3 * p4 * p5,
],
],

Expand Down Expand Up @@ -142,8 +142,8 @@ def get_grad(self, params: RealVector = []) -> npt.NDArray[np.complex128]:
[ # wrt params[4]
[0, 0, 0],
[
-1j * s1 * c2 * c3 * p1 * p2 * m3, 1j * c1
* c3 * p2, -1j * s1 * s2 * c3 * p2 * m3 * p4,
-1j * s1 * c2 * c3 * p1 * p2 * m3, 1j * c1 * c3 * p2,
-1j * s1 * s2 * c3 * p2 * m3 * p4,
],
[1j * s2 * c3 * m2 * m4, 0, -1j * c2 * c3 * m1 * m2],
],
Expand Down Expand Up @@ -178,8 +178,8 @@ def get_grad(self, params: RealVector = []) -> npt.NDArray[np.complex128]:
[0, 0, 0],
[-1j * s2 * s3 * m4 * m5, 0, 1j * c2 * s3 * m1 * m5],
[
-1j * s1 * c2 * s3 * p1 * m3 * p5, 1j * c1
* s3 * p5, -1j * s1 * s2 * s3 * m3 * p4 * p5,
-1j * s1 * c2 * s3 * p1 * m3 * p5, 1j * c1 * s3 * p5,
-1j * s1 * s2 * s3 * m3 * p4 * p5,
],
],
],
Expand Down
6 changes: 3 additions & 3 deletions bqskit/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
PAMRoutingPass
EmbedAllPermutationsPass
ExtractModelConnectivityPass
RestoreModelConnevtivityPass
RestoreModelConnectivityPass
.. rubric:: PAM Verification Passes
Expand Down Expand Up @@ -239,7 +239,7 @@
from bqskit.passes.mapping.routing.pam import PAMRoutingPass
from bqskit.passes.mapping.routing.sabre import GeneralizedSabreRoutingPass
from bqskit.passes.mapping.setmodel import ExtractModelConnectivityPass
from bqskit.passes.mapping.setmodel import RestoreModelConnevtivityPass
from bqskit.passes.mapping.setmodel import RestoreModelConnectivityPass
from bqskit.passes.mapping.setmodel import SetModelPass
from bqskit.passes.mapping.topology import SubtopologySelectionPass
from bqskit.passes.mapping.verify import CalculatePAMErrorsPass
Expand Down Expand Up @@ -400,7 +400,7 @@
'GeneralSQDecomposition',
'StructureAnalysisPass',
'ExtractModelConnectivityPass',
'RestoreModelConnevtivityPass',
'RestoreModelConnectivityPass',
'TagPAMBlockDataPass',
'CalculatePAMErrorsPass',
'UnTagPAMBlockDataPass',
Expand Down
4 changes: 2 additions & 2 deletions bqskit/passes/mapping/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from bqskit.passes.mapping.routing.pam import PAMRoutingPass
from bqskit.passes.mapping.routing.sabre import GeneralizedSabreRoutingPass
from bqskit.passes.mapping.setmodel import ExtractModelConnectivityPass
from bqskit.passes.mapping.setmodel import RestoreModelConnevtivityPass
from bqskit.passes.mapping.setmodel import RestoreModelConnectivityPass
from bqskit.passes.mapping.setmodel import SetModelPass
from bqskit.passes.mapping.topology import SubtopologySelectionPass
from bqskit.passes.mapping.verify import CalculatePAMErrorsPass
Expand All @@ -32,7 +32,7 @@
'EmbedAllPermutationsPass',
'SubtopologySelectionPass',
'ExtractModelConnectivityPass',
'RestoreModelConnevtivityPass',
'RestoreModelConnectivityPass',
'TagPAMBlockDataPass',
'CalculatePAMErrorsPass',
'UnTagPAMBlockDataPass',
Expand Down
4 changes: 2 additions & 2 deletions bqskit/passes/mapping/setmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ExtractModelConnectivityPass(BasePass):
Extracts and saves the current target machine model's connectivity.
The model will remain unchanged except that it will be fully connected until
the RestoreModelConnevtivityPass is executed.
the RestoreModelConnectivityPass is executed.
"""

key = '_ExtractModelConnectivityPass_connectivity'
Expand All @@ -55,7 +55,7 @@ async def run(self, circuit: Circuit, data: PassData) -> None:
)


class RestoreModelConnevtivityPass(BasePass):
class RestoreModelConnectivityPass(BasePass):
"""Restores the connectivity of the target machine model."""

async def run(self, circuit: Circuit, data: PassData) -> None:
Expand Down

0 comments on commit 0fbe10a

Please sign in to comment.