Skip to content

Commit

Permalink
Trying to reorder imports to pass the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jkalloor3 committed Oct 8, 2024
1 parent 883c507 commit d673f13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/ir/gates/parameterized/test_mpry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from __future__ import annotations

import numpy as np
import scipy.linalg as la
from hypothesis import given
from hypothesis.strategies import floats
from hypothesis.strategies import integers
from hypothesis.strategies import lists
from scipy.linalg import block_diag

from bqskit.ir.gates.constant import PermutationGate
from bqskit.ir.gates.parameterized import MPRYGate
Expand Down Expand Up @@ -34,7 +34,7 @@ def test_get_unitary(thetas: list[float]) -> None:
thetas = thetas[:2 ** (num_qudits - 1)]
MPRy = MPRYGate(num_qudits=num_qudits)
block_unitaries = [RYGate().get_unitary([theta]) for theta in thetas]
blocked_unitary = block_diag(*block_unitaries)
blocked_unitary = la.block_diag(*block_unitaries)
dist = MPRy.get_unitary(thetas).get_distance_from(blocked_unitary)
assert dist < 1e-7

Expand All @@ -50,7 +50,7 @@ def test_get_unitary_target_select(target_qubit: int) -> None:

# Create the block diagonal matrix
block_unitaries = [RYGate().get_unitary([theta]) for theta in thetas]
blocked_unitary = block_diag(*block_unitaries)
blocked_unitary = la.block_diag(*block_unitaries)

# Apply a permutation transformation
# to the block diagonal matrix
Expand Down
6 changes: 3 additions & 3 deletions tests/ir/gates/parameterized/test_mprz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from __future__ import annotations

import numpy as np
import scipy.linalg as la
from hypothesis import given
from hypothesis.strategies import floats
from hypothesis.strategies import integers
from hypothesis.strategies import lists
from scipy.linalg import block_diag

from bqskit.ir.gates.constant import PermutationGate
from bqskit.ir.gates.parameterized import MPRZGate
Expand Down Expand Up @@ -34,7 +34,7 @@ def test_get_unitary(thetas: list[float]) -> None:
thetas = thetas[:2 ** (num_qudits - 1)]
MPRy = MPRZGate(num_qudits=num_qudits)
block_unitaries = [RZGate().get_unitary([theta]) for theta in thetas]
blocked_unitary = block_diag(*block_unitaries)
blocked_unitary = la.block_diag(*block_unitaries)
dist = MPRy.get_unitary(thetas).get_distance_from(blocked_unitary)
assert dist < 1e-7

Expand All @@ -50,7 +50,7 @@ def test_get_unitary_target_select(target_qubit: int) -> None:

# Create the block diagonal matrix
block_unitaries = [RZGate().get_unitary([theta]) for theta in thetas]
blocked_unitary = block_diag(*block_unitaries)
blocked_unitary = la.block_diag(*block_unitaries)

# Apply a permutation transformation
# to the block diagonal matrix
Expand Down

0 comments on commit d673f13

Please sign in to comment.