Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Initial commit of tools for qec #211

Merged
merged 17 commits into from
Jun 10, 2019
Merged

Initial commit of tools for qec #211

merged 17 commits into from
Jun 10, 2019

Conversation

quantumjim
Copy link
Member

@quantumjim quantumjim commented May 29, 2019

Summary

A module has been added to 'verification' to create and decode repetition codes. The 'GraphDecoder' defined in this module will be extended to surface codes, color codes and other 2D topological codes. The module has therefore been name 'topological codes'

The purpose of codes in this module is not to actually perform useful error correction, but to provide tests that are based on error correction.

Details and comments

Merging of this closes #210

@CLAassistant
Copy link

CLAassistant commented May 29, 2019

CLA assistant check
All committers have signed the CLA.

@dcmckayibm
Copy link
Collaborator

I think you pushed some extraneous files

@dcmckayibm dcmckayibm changed the title Initial commit of tools for qec WIP [WIP] Initial commit of tools for qec May 29, 2019
@dcmckayibm
Copy link
Collaborator

Can you put an example notebook in examples/xxx.ipynb for the PR. At the end we'll remove it and push it to tutorials.

@quantumjim
Copy link
Member Author

Thanks. I'll add the notebook, remove the mystery files and do some other sorting out on Monday.

@quantumjim quantumjim changed the title [WIP] Initial commit of tools for qec Initial commit of tools for qec Jun 3, 2019
@quantumjim
Copy link
Member Author

I have done some linting and added a tutorial and a test. Travis is not happy for reasons I don't understand. If anyone knows what that error is, let me know.

@dcmckayibm
Copy link
Collaborator

The commenting looks a little different than the qiskit standard, see, e.g. https://github.com/Qiskit/qiskit-terra/blob/3bf6a0e5acae280910be0d7c5b24618a26461e1e/qiskit/result/result.py#L56

@dcmckayibm
Copy link
Collaborator

Based on the notebook it looks like circuits could use a .get_list() function which returns [ code.circuit[log] for log in ['0','1'] ]

self.circuit[log].add_register(self.code_bit)
self.circuit[log].measure(self.code_qubit, self.code_bit)

def process_results(self, raw_results):
Copy link
Collaborator

Choose a reason for hiding this comment

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

The philosophy is to have anything processing results be in the fitter

@quantumjim
Copy link
Member Author

Thanks Dave. I'll fix all.

@ajavadia
Copy link
Contributor

ajavadia commented Jun 6, 2019

error correction probably merits its own folder separate from verification?

@dcmckayibm
Copy link
Collaborator

error correction probably merits its own folder separate from verification?

There's no real error correction. Read @quantumjim 's summary at the top.

@quantumjim
Copy link
Member Author

quantumjim commented Jun 8, 2019

Looks like the build error seemed to start when I merged master, which is odd. Not sure what steps to take to fix it, but I'll look into it next week.

Edit: Seems that time heals all build errors.

@dcmckayibm dcmckayibm merged commit 527035c into qiskit-community:master Jun 10, 2019
mtreinish added a commit to mtreinish/qiskit-ignis that referenced this pull request Dec 7, 2020
The topological_code fitters module relies on networkx and has had a
hard dependency on it since it was first introduced in qiskit-community#211. However, it
was never added to the requirements list. This was never caught because
historically qiskit-terra (which is in the requirements list) has
required networkx too so installing qiskit-terra would install networkx.
But, in Qiskit/qiskit#5183 the dependency on networkx was removed
from terra. This commit corrects the issue so that we're properly
listing networkx as an ignis requirement moving forward. Longer term we
should migrate the topological codes fitter to use retworkx for better
performance and consistency with the rest of Qiskit. However, before we
can do that Qiskit/rustworkx#216 must be fixed first.
mtreinish added a commit that referenced this pull request Dec 7, 2020
The topological_code fitters module relies on networkx and has had a
hard dependency on it since it was first introduced in #211. However, it
was never added to the requirements list. This was never caught because
historically qiskit-terra (which is in the requirements list) has
required networkx too so installing qiskit-terra would install networkx.
But, in Qiskit/qiskit#5183 the dependency on networkx was removed
from terra. This commit corrects the issue so that we're properly
listing networkx as an ignis requirement moving forward. Longer term we
should migrate the topological codes fitter to use retworkx for better
performance and consistency with the rest of Qiskit. However, before we
can do that Qiskit/rustworkx#216 must be fixed first.
mtreinish added a commit to mtreinish/qiskit-ignis that referenced this pull request Feb 5, 2021
The topological_code fitters module relies on networkx and has had a
hard dependency on it since it was first introduced in qiskit-community#211. However, it
was never added to the requirements list. This was never caught because
historically qiskit-terra (which is in the requirements list) has
required networkx too so installing qiskit-terra would install networkx.
But, in Qiskit/qiskit#5183 the dependency on networkx was removed
from terra. This commit corrects the issue so that we're properly
listing networkx as an ignis requirement moving forward. Longer term we
should migrate the topological codes fitter to use retworkx for better
performance and consistency with the rest of Qiskit. However, before we
can do that Qiskit/rustworkx#216 must be fixed first.

(cherry picked from commit 2775689)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rep Code
4 participants