Skip to content

Commit

Permalink
codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
apchytr committed Oct 23, 2024
1 parent ab2c99f commit b8cfc7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
Unitary,
Operation,
Vacuum,
BtoQ,
)
from mrmustard.physics.wires import Wires

Expand Down
4 changes: 2 additions & 2 deletions tests/test_physics/test_representations.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def test_to_bargmann(self, d_gate_rep):
d_barg = d_fock.to_bargmann()
assert d_fock.ansatz._original_abc_data == d_gate_rep.ansatz.triple
assert d_barg == d_gate_rep
assert all([k[0] == RepEnum.BARGMANN for k in d_barg._idx_reps.values()])
assert all((k[0] == RepEnum.BARGMANN for k in d_barg._idx_reps.values()))

def test_to_fock(self, d_gate_rep):
d_fock = d_gate_rep.to_fock(shape=(4, 6))
assert d_fock.ansatz == ArrayAnsatz(
math.hermite_renormalized(*displacement_gate_Abc(x=0.1, y=0.1), shape=(4, 6))
)
assert all([k[0] == RepEnum.FOCK for k in d_fock._idx_reps.values()])
assert all((k[0] == RepEnum.FOCK for k in d_fock._idx_reps.values()))

0 comments on commit b8cfc7a

Please sign in to comment.