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

Fix a bug in linear.symplectic._build_hyper_partner #384

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

inmzhang
Copy link
Contributor

Summary

A small but obvious bug in _build_hyper_partner

Details and comments

pivot = +1 should be pivot += 1

@CLAassistant
Copy link

CLAassistant commented Aug 26, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@dsvandet dsvandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. I new there was something going wrong with this function but I had not looked at it yet. Thanks.

Will be merged once we fix another PR that is breaking the tests. Need to look at the tests to see why this was not being picked up.

Looked at the test. Rather simple and would not test this problem. Lets add the following test case:

matrix = np.array(
            [
                [1, 1, 0, 0, 1, 0, 0, 0],
                [0, 0, 1, 1, 1, 1, 0, 0],
                [0, 0, 0, 0, 0, 0, 1, 1],
            ],
            dtype=np.bool_,
        )
av = build_hyper_partner(matrix, 0).astype(int)
self.assertTrue
(np.array_equal([1, 1, 0, 0, 0, 0, 0, 0], av))

@grace-harper grace-harper merged commit 5e101bc into qiskit-community:main Sep 19, 2023
3 checks passed
grace-harper pushed a commit that referenced this pull request Sep 19, 2023
Fix a small bug (#384)

Co-authored-by: grace-harper <119029214+grace-harper@users.noreply.github.com>

Update README.md (#377)

Co-authored-by: grace-harper <119029214+grace-harper@users.noreply.github.com>

Issue #247 - Replace `execute` with `backend.run()` in `qiskit-qec` (#381)

* replace `execute` with `backend.run()` in `test_repetitionmatcher.py`

* replace `execute` with `backend.run()` in  `test_circuitmatcher.py`

* replace `execute` with `backend.run()` in  `test_heavy_hex_decoder.py`

* replace `execute` with `backend.run()` in `faultsampler.py`

* replace `execute` with `backend.run()` in `faultenumerator.py`

* formatting

* re-format test_repetitionmatcher.py

---------

Co-authored-by: grace-harper <119029214+grace-harper@users.noreply.github.com>

scrap
grace-harper added a commit that referenced this pull request Oct 2, 2023
Co-authored-by: grace-harper <119029214+grace-harper@users.noreply.github.com>
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 this pull request may close these issues.

4 participants