Skip to content

change Instruction.definition from List[Tuple] to QuantumCircuit#4622

Merged
mergify[bot] merged 13 commits into
Qiskit:masterfrom
ewinston:def_to_circuit
Jul 4, 2020
Merged

change Instruction.definition from List[Tuple] to QuantumCircuit#4622
mergify[bot] merged 13 commits into
Qiskit:masterfrom
ewinston:def_to_circuit

Conversation

@ewinston
Copy link
Copy Markdown
Contributor

@ewinston ewinston commented Jun 26, 2020

This PR attempts to change the type of Instruction.definition from list of tuples to QuantumCircuit.

Summary

The change here was mostly to replace gate.definition with gate.definition.data or assigning gate.definition directly to a quantum circuit if that made more sense.

Details and comments

some multi-qubit controlled gate tests are still failing.
@ewinston ewinston requested a review from a team as a code owner June 26, 2020 16:31
@ajavadia ajavadia added this to the 0.15 milestone Jun 30, 2020
Comment thread qiskit/circuit/add_control.py Outdated
Comment thread qiskit/circuit/instruction.py Outdated
@ewinston ewinston changed the title [WIP] change Instruction.definition from List[Tuple] to QuantumCircuit change Instruction.definition from List[Tuple] to QuantumCircuit Jul 3, 2020
Comment thread test/python/circuit/test_controlled_gate.py Outdated
Comment thread qiskit/transpiler/passes/basis/decompose.py Outdated
Comment thread qiskit/circuit/instruction.py Outdated
Comment thread qiskit/converters/circuit_to_instruction.py
Copy link
Copy Markdown
Member

@ajavadia ajavadia left a comment

Choose a reason for hiding this comment

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

looks good thanks

@mergify mergify Bot merged commit e265409 into Qiskit:master Jul 4, 2020
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
…kit#4622)

* definition changed to circuit

some multi-qubit controlled gate tests are still failing.

* resolve c_if register conversion

* revert removal of _define in standard gates

* linting

* resolve qreg bug in transpiler

* simplify unroller passes a bit

* linting

* resolve doc forward ref

* linting

* linting

* linting

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@ewinston ewinston deleted the def_to_circuit branch April 6, 2021 16:31
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.

3 participants