From 1d5a5c10c00f852c5d35ae2a0fbcf2232035032e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:49:49 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20pre-commit=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compiler/state_compilation/state_preparation.py | 10 +++++++--- test/python/compiler/test_dit_compiler.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mqt/qudits/compiler/state_compilation/state_preparation.py b/src/mqt/qudits/compiler/state_compilation/state_preparation.py index 8ab3f92..41239f6 100644 --- a/src/mqt/qudits/compiler/state_compilation/state_preparation.py +++ b/src/mqt/qudits/compiler/state_compilation/state_preparation.py @@ -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 @@ -196,5 +201,4 @@ def compile_state(self) -> QuantumCircuit: if self.not_noisy: r.turn_off_noise() - return new_circuit diff --git a/test/python/compiler/test_dit_compiler.py b/test/python/compiler/test_dit_compiler.py index 8023d99..f0cace1 100644 --- a/test/python/compiler/test_dit_compiler.py +++ b/test/python/compiler/test_dit_compiler.py @@ -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 \ No newline at end of file + assert (1 - norm_diff_s) < 1e-6