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

Add a full-featured serializer from a qiskit.QuantumCircuit to a quantum-viz.js JSON #44

Merged
merged 109 commits into from
May 27, 2022

Conversation

jond01
Copy link
Contributor

@jond01 jond01 commented Oct 29, 2021

Description

  • Resolves Qiskit support #37.
  • Dependencies that are required for this change: qiskit-terra, added as an optional dependency to the Python package.
    Installable with:
    pip install -U "quantum-viz[qiskit]"

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • Manual tests and examples
  • Automatic tests - run them with nox -s tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@jond01 jond01 force-pushed the feature/qiskit branch 3 times, most recently from 94ad6b5 to e8f51d8 Compare November 1, 2021 22:41
atching and others added 25 commits November 4, 2021 15:51
Initial commit of a parser for IBM Qiskit quantum circuits to output to json file compatible with Quantum-Viz.
Rename and reformat the files
All the previous functionality is implemented
Add logic for storing identifiers for qubits and classical bits
Works for circuits with a single qubit
Add P and R gates
These gates are already adjoints - no need to add `'`
Use the indices, hopefully that's enough
@anpaz anpaz mentioned this pull request Dec 3, 2021
12 tasks
quantum-viz/quantum_viz/qiskit_parser.py Outdated Show resolved Hide resolved
quantum-viz/examples/Qiskit.ipynb Show resolved Hide resolved
quantum-viz/examples/display_example.py Show resolved Hide resolved
quantum-viz/quantum_viz/qiskit_parser.py Show resolved Hide resolved
quantum-viz/quantum_viz/qiskit_parser.py Outdated Show resolved Hide resolved
quantum-viz/quantum_viz/qiskit_parser.py Show resolved Hide resolved
quantum-viz/quantum_viz/utils.py Show resolved Hide resolved
quantum-viz/quantum_viz/utils.py Show resolved Hide resolved
quantum-viz/tests/conftest.py Show resolved Hide resolved
quantum-viz/tests/test_qiskit_generate_results.py Outdated Show resolved Hide resolved
@anpaz
Copy link
Member

anpaz commented Dec 3, 2021

This is a great contribution. Thank you @jond01 for it! There are a few things that we need to clean up, otherwise looks great.
I'm also going to send a PR against your repo with a new notebook sample and a bug fix for the Viewer. But again, looks great!

@jond01 jond01 mentioned this pull request Jan 19, 2022
9 tasks
@jond01 jond01 changed the title Add a full-featured parser from a qiskit.QuantumCircuit to a quantum-viz.js json Add a full-featured serializer from a qiskit.QuantumCircuit to a quantum-viz.js json May 20, 2022
@jond01 jond01 changed the title Add a full-featured serializer from a qiskit.QuantumCircuit to a quantum-viz.js json Add a full-featured serializer from a qiskit.QuantumCircuit to a quantum-viz.js JSON May 20, 2022
@anpaz
Copy link
Member

anpaz commented May 20, 2022

sigh... @jond01, our new CI checks caught a lot of small things, like docstrings and coverage, if you have time could you add them? otherwise I'll try to get this done early next week.

@anpaz
Copy link
Member

anpaz commented May 27, 2022

We'll merge the fixes to CI pipeline on the next commit.

@anpaz anpaz enabled auto-merge (squash) May 27, 2022 04:52
@anpaz anpaz disabled auto-merge May 27, 2022 04:54
@anpaz anpaz merged commit 0a3f572 into microsoft:main May 27, 2022
@anpaz anpaz mentioned this pull request May 27, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qiskit support
5 participants