Skip to content

Commit

Permalink
✅ add tests for corner cases
Browse files Browse the repository at this point in the history
Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Mar 21, 2024
1 parent 9bb9ed8 commit ee389be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions supermarq-benchmarks/supermarq/converters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ def test_cirq_to_qiskit() -> None:
qiskit_circuit.h(0)
qiskit_circuit.cx(0, 1)
assert supermarq.converters.cirq_to_qiskit(cirq_circuit) == qiskit_circuit


def test_compute_parallelism_with_qiskit() -> None:
qiskit_circuit = qiskit.QuantumCircuit(2)
assert supermarq.converters.compute_parallelism_with_qiskit(qiskit_circuit) == 0
2 changes: 2 additions & 0 deletions supermarq-benchmarks/supermarq/features_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def test_compute_parallelism() -> None:
feature = supermarq.features.compute_parallelism(CIRCUIT)
assert feature >= 0 and feature <= 1

assert supermarq.features.compute_parallelism(cirq.Circuit()) == 0


def test_compute_measurement() -> None:
feature = supermarq.features.compute_measurement(CIRCUIT)
Expand Down

0 comments on commit ee389be

Please sign in to comment.