-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
Pull Request Test Coverage Report for Build 5480045219
💛 - Coveralls |
@@ -201,6 +201,11 @@ def _define(self) -> None: | |||
qc.append(CircuitInstruction(op, [qc.qubits[0]], [])) | |||
self.definition = qc | |||
|
|||
@property |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 Barrier
s and a few other things.
See this brief description, which itself links to Qiskit/qiskit#5811
#303 (comment) Co-authored-by: Matthew Treinish <[email protected]>
There was a problem hiding this 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 👍
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.