Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test #52

Closed
kevinsung opened this issue Nov 23, 2022 · 1 comment
Closed

Failing test #52

kevinsung opened this issue Nov 23, 2022 · 1 comment

Comments

@kevinsung
Copy link

On main, running pytest gives

______________________________________________________________________________ test_best_mapping_ghz_state_full_device_multiple_qregs _______________________________________________________________________________

    def test_best_mapping_ghz_state_full_device_multiple_qregs():
        """Test best mappings with multiple registers"""
        qr_a = QuantumRegister(2)
        qr_b = QuantumRegister(3)
        qc = QuantumCircuit(qr_a, qr_b)
        qc.h(qr_a[0])
        qc.cx(qr_a[0], qr_a[1])
        qc.cx(qr_a[0], qr_b[0])
        qc.cx(qr_a[0], qr_b[1])
        qc.cx(qr_a[0], qr_b[2])
        qc.measure_all()
        trans_qc = transpile(qc, FakeLima(), seed_transpiler=102442)
        backends = [FakeBelem(), FakeQuito(), FakeLima()]
        res = mm.best_overall_layout(trans_qc, backends, successors=True)
        expected_res = [([0, 1, 2, 3, 4], 'fake_belem', 0.28117480552733065),
                        ([0, 1, 2, 3, 4], 'fake_lima', 0.2813874429560348),
                        ([2, 1, 0, 3, 4], 'fake_quito', 0.5101783470040677)]
        for index, expected in enumerate(expected_res):
>           assert res[index][0] == expected[0]
E           assert [2, 1, 0, 3, 4] == [0, 1, 2, 3, 4]
E             At index 0 diff: 2 != 0
E             Use -v to get more diff

mapomatic/tests/test_best_layout.py:38: AssertionError

This is also affecting the CI at https://github.com/Qiskit-Partners/mapomatic/actions/runs/3472401959/jobs/5804191803

@nonhermitian
Copy link
Collaborator

Close as solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants