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 Rust representation of EquivalenceLibrary #12585

Merged
merged 83 commits into from
Sep 25, 2024

Commits on Jun 5, 2024

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

Commits on Jun 10, 2024

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

Commits on Jun 11, 2024

  1. Add: EquivalencyLibrary to qiskit._accelerate.circuit

    - Add `get_entry` method to obtain an entry from binding to a `QuantumCircuit`.
    - Add `rebind_equiv` to bind parameters to `QuantumCircuit`
    raynelfss committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    a215694 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Configuration menu
    Copy the full SHA
    7d0f4de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0f85dc0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f73581e View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. Configuration menu
    Copy the full SHA
    57e0ef8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9eddbbf View commit details
    Browse the repository at this point in the history
  3. Add: Stable infrastructure for EquivalenceLibrary

    - TODO: Make elements pickleable.
    raynelfss committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    11611e2 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. Configuration menu
    Copy the full SHA
    a013d5b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1bf0316 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab57e3e View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

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

Commits on Jun 17, 2024

  1. Format: Fix lint test

    raynelfss committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    6a033c9 View commit details
    Browse the repository at this point in the history
  2. Fix: Use EdgeReferences instead of edge_indices.

    - Remove stray comment.
    - Use match instead of matches!.
    raynelfss committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    b04cae2 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

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

Commits on Jun 21, 2024

  1. Fix: Use StableDiGraph for more stable indexing.

    - Remove required py argument for get_entry.
    - Reformat `to_pygraph` to use `add_nodes_from` and `add_edges_from`.
    - Other small fixes.
    raynelfss committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    38436cd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db6acb4 View commit details
    Browse the repository at this point in the history
  3. Fix: Use clone instead of to_owned

    - Use `clone_ref` for the PyObject Graph instance.
    raynelfss committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    e16e57b View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Configuration menu
    Copy the full SHA
    b8bd422 View commit details
    Browse the repository at this point in the history
  2. Fix: Use OperationTypeConstruct instead of CircuitInstruction

    - Use `convert_py_to_operation_type` to correctly extract Gate instances into rust operational datatypes.
    - Add function `get_sources_from_circuit_rep` to not extract circuit data directly but only the necessary data.
    - Modify failing test due to different mapping. (!!)
    - Other tweaks and fixes.
    raynelfss committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    fb1652c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    139af74 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

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

Commits on Jun 26, 2024

  1. Configuration menu
    Copy the full SHA
    ab84d04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6dec921 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    785564f View commit details
    Browse the repository at this point in the history
  4. Fix: Make CircuitRep attributes OneCell-like.

    - Attributes from CircuitRep are only written once, reducing the overhead.
    - Modify `__setstate__` to avoid extra conversion.
    - Remove `get_sources_from_circuit_rep`.
    raynelfss committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3b954e4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    48bb8eb View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

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

Commits on Jun 28, 2024

  1. Configuration menu
    Copy the full SHA
    9a7d9a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2c8dcb View commit details
    Browse the repository at this point in the history
  3. Remove: Default initialization methods from custom datatypes.

    - Use `__getnewargs__ instead.
    raynelfss committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    dc3041e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a072635 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Fix: Further improvements to pickling

    - Use python structures to avoid extra conversions.
    - Add rust native `EquivalenceLibrary.keys()` and have the python method use it.
    raynelfss committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    77dbec8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd0b36e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    73e5b5b View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Fix: Use PyList and iterators when possible to skip extra conversion.

    - Use a `py` token instead of `Python::with_gil()` for `rebind_params`.
    - Other tweaks and fixes.
    raynelfss committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    72e1c33 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Configuration menu
    Copy the full SHA
    17eb9d2 View commit details
    Browse the repository at this point in the history
  2. Fix: improvements on rust native methods

    - Accept `Operations` and `[Param]` instead of the custom `GateOper` when calling from rust.
    - Build custom `GateOper` inside of class.
    raynelfss committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    9d39cf6 View commit details
    Browse the repository at this point in the history
  3. Remove: add_equiv, set_entry from rust-native methods.

    - Add `node_index` Rust native method.
    - Use python set comparison for `Param` check.
    raynelfss committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    e9e3921 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5519659 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. Remove: Undo changes to Param

    - Fix comparison methods for `Key`, `Equivalence`, `EdgeData` and `NodeData` to account for the removal of `PartialEq` for `Param`.
    raynelfss committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    bf9aedd View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

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

Commits on Jul 12, 2024

  1. Configuration menu
    Copy the full SHA
    41764f2 View commit details
    Browse the repository at this point in the history
  2. Fix: Leverage usage of CircuitData for accessing the `QuantumCircui…

    …t` intructions in rust.
    
    - Change implementation of `CircuitRef, to leverage the use of `CircuitData`.
    raynelfss committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    08915c0 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Add: data() method to avoid extracting CircuitData

    - Add `py_clone` to perform shallow clones of a `CircuitRef` object by cloning the references to the `QuantumCircuit` object.
    - Extract `num_qubits` and `num_clbits` for CircuitRep.
    - Add wrapper over `add_equivalence` to be able to accept references and avoid unnecessary cloning of `GateRep` objects in `set_entry`.
    - Remove stray mutability of `entry` in `set_entry`.
    raynelfss committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d24c134 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd582f0 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

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

Commits on Jul 18, 2024

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

Commits on Jul 19, 2024

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

Commits on Jul 21, 2024

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

Commits on Jul 23, 2024

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

Commits on Jul 24, 2024

  1. Configuration menu
    Copy the full SHA
    d257db1 View commit details
    Browse the repository at this point in the history
  2. Fix: Adapt to Qiskit#12730

    raynelfss committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    dd2773a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e7b3cb0 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Configuration menu
    Copy the full SHA
    aa626b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1aaf17a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ba90411 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f4bfb7 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. Configuration menu
    Copy the full SHA
    d59f0db View commit details
    Browse the repository at this point in the history
  2. Fix: Adapt to Qiskit#12974

    raynelfss committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    0d3a164 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. Configuration menu
    Copy the full SHA
    feff6eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6554b38 View commit details
    Browse the repository at this point in the history
  3. Chore: update dependencies

    raynelfss committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    132b6be View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Configuration menu
    Copy the full SHA
    3dbcc41 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c48f0da View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d12dee6 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2024

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

Commits on Aug 29, 2024

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

Commits on Aug 30, 2024

  1. Configuration menu
    Copy the full SHA
    f44eaba View commit details
    Browse the repository at this point in the history
  2. Fix: Update EquivalenceLibrary to store CircuitData.

    - The equivalence library will now only store `CircuitData` instances as it does not need to call python directly to re-assign parameters.
    - An `IntoPy<PyObject>` trait was adapted so that it can be automatically converted to a `QuantumCircuit` instance using `_from_circuit_data`.
    - Updated all tests to use register-less qubits in circuit comparison.
    - Remove `num_qubits` and `num_clbits` from `CircuitRep`.
    raynelfss committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    3479254 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c433c87 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

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

Commits on Sep 5, 2024

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

Commits on Sep 18, 2024

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

Commits on Sep 20, 2024

  1. Fix: Review comments and ownership issues.

    - Add `from_operation` constructor for `Key`.
    - Made `py_has_entry()` private, but kept its main method public.
    - Made `set_entry` more rust friendly.
    - Modify `add_equivalence` to accept a slice of `Param` and use `Into` to convert it into a `SmallVec` instance.
    raynelfss committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    b7c6316 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8e7cff View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Fix: Use maximum possible integer value for Key in basis_translator.

    - Add method to immutably borrow the `EquivalenceLibrary`'s graph.
    raynelfss committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    e7d99bc View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Fix: Use generated string, instead of large int

    - Using large int as the key's number of qubits breaks compatibility with qpy, use a random string instead.
    raynelfss committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    bf7486c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56278bc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11f0470 View commit details
    Browse the repository at this point in the history