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 support for SingleQubitQPDGate to be passed through the transpiler #303

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

garrison
Copy link
Member

@garrison garrison commented Jul 3, 2023

This is a first step toward making our workflow more flexible with regard to transpilation. I created a new file for tests like this one. The _directive property is necessary for this test to pass.

@garrison garrison added the cutting QPD-based circuit cutting code label Jul 3, 2023
@coveralls
Copy link

coveralls commented Jul 3, 2023

Pull Request Test Coverage Report for Build 5480045219

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 90.296%

Totals Coverage Status
Change from base Build 5433896893: 0.3%
Covered Lines: 2438
Relevant Lines: 2700

💛 - Coveralls

@@ -201,6 +201,11 @@ def _define(self) -> None:
qc.append(CircuitInstruction(op, [qc.qubits[0]], []))
self.definition = qc

@property
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please just quickly explain this mechanism here? Not familiar with _directive

Copy link
Member Author

Choose a reason for hiding this comment

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

It is something that @mtreinish told me about. It tells the transpiler to treat it as something special that ought to be passed through most passes without being touched, and is used for Barriers and a few other things.

See this brief description, which itself links to Qiskit/qiskit#5811

#303 (comment)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Copy link
Collaborator

@caleb-johnson caleb-johnson left a comment

Choose a reason for hiding this comment

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

Good thinking getting this started, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutting QPD-based circuit cutting code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants