Skip to content

Commit

Permalink
Merge branch 'qcnn.py' of https://github.com/amansingh2116/piQture in…
Browse files Browse the repository at this point in the history
…to qcnn.py
  • Loading branch information
amansingh2116 committed Dec 20, 2024
2 parents b0bf595 + f4efa47 commit 84c89ca
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
exclude: ^(docs|graphics|utils)/

- repo: https://github.com/PyCQA/pylint
rev: v2.17.0
rev: v3.3.1
hooks:
- id: pylint
args: [--disable=import-error]
Expand Down
6 changes: 4 additions & 2 deletions tests/embeddings/image_embeddings/test_frqi.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def test_pixel_value(self, img_dims, pixel_vals, circuit_pixel_value):
((2, 2), None, PIXEL_POS_BINARY2),
],
)

# pylint: disable=R0917
def test_frqi(
self,
img_dims,
Expand All @@ -189,7 +191,8 @@ def test_frqi(
test_circuit.h(list(range(int(np.sqrt(math.prod(img_dims))))))
for pixel, pixel_pos_binary in enumerate(pixel_pos_binary_list):
test_circuit.compose(
circuit_pixel_position(img_dims, pixel_pos_binary), inplace=True
circuit_pixel_position(img_dims, pixel_pos_binary),
inplace=True, # pylint: disable=too-many-arguments
)
test_circuit.compose(
circuit_pixel_value(img_dims, pixel_vals, pixel), inplace=True
Expand All @@ -208,5 +211,4 @@ def test_frqi(
pixel_vals = np.random.random(math.prod(img_dims))
test_circuit.assign_parameters(pixel_vals, inplace=True)
mock_circuit.assign_parameters(pixel_vals, inplace=True)

assert mock_circuit == test_circuit
2 changes: 2 additions & 0 deletions tests/embeddings/image_embeddings/test_neqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def test_pixel_value(
"img_dims, pixel_vals, max_color_intensity",
[((2, 2), [list(range(1, 5))], MAX_COLOR_INTENSITY)],
)

# pylint: disable=R0917
def test_neqr(
self,
img_dims,
Expand Down
2 changes: 2 additions & 0 deletions tests/neural_networks/layers/test_fully_connected_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class TestFullyConnectedLayer:
(6, None, [2, 3], "circuit4"),
],
)

# pylint: disable=R0917
def test_build_layer(
self, request, num_qubits, circuit, unmeasured_bits, resulting_circuit
):
Expand Down
4 changes: 4 additions & 0 deletions tests/neural_networks/layers/test_pooling_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def test_conditional(self, num_qubits, circuit, unmeasured_bits, conditional):
(None, None, [2, 3, 5], True, "circuit4a"),
],
)

# pylint: disable=R0917
def test_build_layer(
self,
request,
Expand Down Expand Up @@ -264,6 +266,8 @@ def test_conditional(self, num_qubits, circuit, unmeasured_bits, conditional):
(None, None, [2, 3, 5, 7], True, "circuit7a"),
],
)

# pylint: disable=R0917
def test_build_layer(
self,
request,
Expand Down
2 changes: 2 additions & 0 deletions tests/tensor_networks/test_mera.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ def test_mera_general(self, num_qubits, layer_depth, complex_structure):
(5, None, True, "complex_simple"),
],
)

# pylint: disable=R0917
def test_mera_backbone(
self, num_qubits, layer_depth, complex_structure, parameterization, mera_circuit
):
Expand Down
2 changes: 2 additions & 0 deletions tests/tensor_networks/test_mps.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def test_mps_general(self, num_qubits, complex_structure):
(4, True, "complex_general"),
],
)

# pylint: disable=R0917
def test_mps_backbone(
self,
num_qubits,
Expand Down
2 changes: 2 additions & 0 deletions tests/tensor_networks/test_ttn.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def test_ttn_general(self, num_qubits, complex_structure):
(4, True, "complex_general"),
],
)

# pylint: disable=R0917
def test_ttn_backbone(
self,
num_qubits,
Expand Down

0 comments on commit 84c89ca

Please sign in to comment.