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 method to add instructions to a DAGCircuit from an iterator of PackedInstruction #13032

Merged
merged 14 commits into from
Sep 6, 2024

Commits on Sep 4, 2024

  1. Initial: Add add_from_iter method to DAGCircuit

    - Introduce a method that adds a chain of `PackedInstruction` continuously avoiding the re-linking of each bit's output-node until the very end of the iterator.
       - TODO: Add handling of vars
    - Add header for a `from_iter` function that will create a `DAGCircuit` based on a chain of `PackedInstruction`.
    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    22cdeb5 View commit details
    Browse the repository at this point in the history
  2. Fix: leverage new methods in layers

    - Fix incorrect re-insertion of last_node.
    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    a4ed753 View commit details
    Browse the repository at this point in the history
  3. Fix: Keep track of Vars for add_from_iter

    - Remove `from_iter`
    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    5cf7417 View commit details
    Browse the repository at this point in the history
  4. Fix: Incorrect modification of last nodes in add_from_iter.

    - Use `entry` api to either modify or insert a value if missing.
    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    e6c4fff View commit details
    Browse the repository at this point in the history
  5. Fix: Cycling edges in when adding vars.

    - A bug that adds duplicate edges to vars has been temporarily fixed. However, the root of this problem hasn't been found yet. A proper fix is pending. For now skip those instances.
    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    24c8b6a View commit details
    Browse the repository at this point in the history
  6. Fix: Remove set collecting all nodes to be connected.

    - A set collecting all the new nodes to connect with a new node was preventing additional wires to connect to subsequent nodes.
    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    0821aff View commit details
    Browse the repository at this point in the history
  7. Fix: Adapt to Qiskit#13033

    raynelfss committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    dcf674b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3cb950e View commit details
    Browse the repository at this point in the history
  9. Fix docstring

    - Caught by @ElePT
    
    Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
    raynelfss and ElePT authored Sep 4, 2024
    Configuration menu
    Copy the full SHA
    ff4b6eb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8011fdf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2ee5b40 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    2b765b7 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Fix: Corrections from code review.

    - Use Entry API to modify last nodes in the var.
    - Build new_nodes with an allocated vec.
    - Add comment explaining the removal of the edge between the output node and its predecessor.
    raynelfss committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    468869c View commit details
    Browse the repository at this point in the history
  2. Fix: Improper use of Entry API.

    - Use `or_insert_with` instead of `or_insert` to perform actions before inserting a value.
    raynelfss committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    d846cd0 View commit details
    Browse the repository at this point in the history