Skip to content

Commit

Permalink
🎨 pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 27, 2024
1 parent e87cd66 commit 1d5a5c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/mqt/qudits/compiler/state_compilation/state_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,13 @@ def __str__(self) -> str:


class StatePrep:
def __init__(self, quantum_circuit: QuantumCircuit, state: NDArray[np.complex128],
not_noisy: bool = True, approx: bool = False) -> None:
def __init__(
self,
quantum_circuit: QuantumCircuit,
state: NDArray[np.complex128],
not_noisy: bool = True,
approx: bool = False,
) -> None:
self.circuit = quantum_circuit
self.state = state
self.not_noisy = not_noisy
Expand Down Expand Up @@ -196,5 +201,4 @@ def compile_state(self) -> QuantumCircuit:
if self.not_noisy:
r.turn_off_noise()


return new_circuit
2 changes: 1 addition & 1 deletion test/python/compiler/test_dit_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,4 @@ def test_random_evo_compile():
# assert np.allclose(og_state, compiled_state, rtol=1e-6, atol=1e-6)
og_state = og_state.reshape(-1)
norm_diff_s = naive_state_fidelity(og_state, compiled_state)
assert (1 - norm_diff_s) < 1e-6
assert (1 - norm_diff_s) < 1e-6

0 comments on commit 1d5a5c1

Please sign in to comment.