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 Jun 19, 2024
1 parent eaac905 commit 28da693
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/qibo/backends/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,11 @@ def execute_circuit(self, circuit, initial_state=None, nshots=1000):
return self.execute_circuit(initial_state + circuit, None, nshots)
elif initial_state is not None:
initial_state = self.cast(initial_state)
valid_shape = 2 * (2**circuit.nqubits,) if circuit.density_matrix else (2**circuit.nqubits,)
valid_shape = (
2 * (2**circuit.nqubits,)
if circuit.density_matrix
else (2**circuit.nqubits,)
)
if tuple(initial_state.shape) != valid_shape:
raise_error(
ValueError,
Expand Down

0 comments on commit 28da693

Please sign in to comment.