Skip to content

Cutqc cut method fails with the latest release of qiskit #5

@hrushikesh890

Description

@hrushikesh890

With the latest release of qiskit, some elements of DAGNode have been deprecated.
In cutter.py
if u.type == "op" and v.type == "op":
throws the following error
File "cutqc/cutter.py", line 341, in read_circ if u.type == "op" and v.type == "op": AttributeError: 'DAGInNode' object has no attribute 'type'

Solution is simple
Replace faulting line with
if (type(u) == DAGOpNode) and (type(v) == DAGOpNode):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions