Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
gluonhiggs committed Nov 18, 2024
1 parent f602ff4 commit 272b0d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mitiq/interface/mitiq_qiskit/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
assert convert_to_mitiq(test_qc)

0 comments on commit 272b0d5

Please sign in to comment.