From 6ab8365995caaecaaed5b87f74b1a6a6b11d28a3 Mon Sep 17 00:00:00 2001 From: gluonhiggs Date: Mon, 18 Nov 2024 15:09:46 +0700 Subject: [PATCH] make format --- mitiq/interface/mitiq_qiskit/conversions.py | 4 +++- mitiq/interface/mitiq_qiskit/tests/test_conversions_qiskit.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mitiq/interface/mitiq_qiskit/conversions.py b/mitiq/interface/mitiq_qiskit/conversions.py index 5287b3ee0..a7d4c29b9 100644 --- a/mitiq/interface/mitiq_qiskit/conversions.py +++ b/mitiq/interface/mitiq_qiskit/conversions.py @@ -52,7 +52,9 @@ def _remove_qasm_barriers(qasm: QASMType) -> QASMType: return "".join(lines) -def _map_bit_index(bit_index: int, new_register_sizes: List[int]) -> Tuple[int, int]: +def _map_bit_index( + bit_index: int, new_register_sizes: List[int] +) -> Tuple[int, int]: """Returns the register index and (qu)bit index in this register for the mapped bit_index. diff --git a/mitiq/interface/mitiq_qiskit/tests/test_conversions_qiskit.py b/mitiq/interface/mitiq_qiskit/tests/test_conversions_qiskit.py index 2afbf24ef..52d146cf3 100644 --- a/mitiq/interface/mitiq_qiskit/tests/test_conversions_qiskit.py +++ b/mitiq/interface/mitiq_qiskit/tests/test_conversions_qiskit.py @@ -477,9 +477,10 @@ def test_remove_identity_from_idle_with_multiple_registers(): assert circuit_multi_reg == input_multi assert circuit_single_reg == input_single + def test_convert_to_mitiq_with_rx_and_rzz(): """Tests that convert_to_mitiq works with RX and RZZ gates.""" test_qc = qiskit.QuantumCircuit(2) test_qc.rx(0.1, 0) test_qc.rzz(0.1, 0, 1) - assert convert_to_mitiq(test_qc) \ No newline at end of file + assert convert_to_mitiq(test_qc)