Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 6, 2024
1 parent 8b6ca77 commit 2869d3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/qibo/quantum_info/quantum_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def __matmul__(self, second_network):
+ "``QuantumNetwork`` by a non-``QuantumNetwork``.",
)

if len(self.partition) == 2: # `self` is a channel
if len(self.partition) == 2: # `self` is a channel
if len(second_network.partition) != 2:
raise_error(
ValueError,
Expand All @@ -548,8 +548,7 @@ def __matmul__(self, second_network):

subscripts = "jk,kl -> jl"


elif len(self.partition) == 4: # `self` is a super-channel
elif len(self.partition) == 4: # `self` is a super-channel
if len(second_network.partition) != 2:
raise_error(
ValueError,
Expand Down
8 changes: 6 additions & 2 deletions tests/test_quantum_info_quantum_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,12 @@ def test_with_comb(backend):
comb = random_density_matrix(2**4, backend=backend)
channel = random_density_matrix(2**2, backend=backend)

comb_choi = QuantumNetwork(comb, comb_partition, system_output=comb_sys_out, backend=backend)
channel_choi = QuantumNetwork(channel, channel_partition, system_output=channel_sys_out, backend=backend)
comb_choi = QuantumNetwork(
comb, comb_partition, system_output=comb_sys_out, backend=backend
)
channel_choi = QuantumNetwork(
channel, channel_partition, system_output=channel_sys_out, backend=backend
)
# channel_choi_2 = QuantumNetwork(
# comb @ channel, comb_partition, system_output=comb_sys_out, backend=backend
# ).to_full(backend)
Expand Down

0 comments on commit 2869d3e

Please sign in to comment.