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

Fix bug where unexpected queuing occurs in qml.ctrl among other functions #6284

Closed
wants to merge 16 commits into from

Commits on Sep 19, 2024

  1. recursive approach

    KetpuntoG committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    0a01915 View commit details
    Browse the repository at this point in the history
  2. Update controlled.py

    KetpuntoG committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    e8d2048 View commit details
    Browse the repository at this point in the history
  3. Update controlled.py

    KetpuntoG committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    4de0ac3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fcbcb87 View commit details
    Browse the repository at this point in the history
  5. adding tests

    KetpuntoG committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    000b88d View commit details
    Browse the repository at this point in the history
  6. Update prod.py

    KetpuntoG committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    e921546 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. add test and changelog

    KetpuntoG committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    bfee7c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    36c2a20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    342a92c View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Configuration menu
    Copy the full SHA
    661dd52 View commit details
    Browse the repository at this point in the history
  2. Use pytest-rng generated seeds for stochastic tests (#6435)

    **Context:**
    
    The PennyLane CI suffers from sporadic failures due to stochasticity of
    test cases. In order to save CI runtime, we have seeded many tests.
    However, this approach introduces the risk of a test case passing due to
    a special seed, potentially hiding bugs that could have been discovered.
    Therefore, it is beneficial to periodically update the seeds to review
    such tests.
    
    **Description of the Change:**
    
    - The test suite uses `pytest-rng` to handle seed generation. A `seed`
    fixture is now available to use for every test case. If seeding is
    required, please use the seed provided by `pytest-rng`
    
    ```python
    def test_some_function(..., seed):
        dev = qml.device("default.qubit", seed=seed)
    ```
    
    - A `local_salt` test marker has been added that allows you to modify
    the seed locally for a particular test case if the generated seed
    happens to make your test fail.
    
    ```python
    @pytest.mark.local_salt(42)
    def test_some_function(..., seed):
        dev = qml.device("default.qubit", seed=seed)
    ```
    
    - All tests that uses local seeds has been updated to use the new
    seeding approach.
    
    - An `rng_salt` has been added to `pytest.ini`. This controls the seed
    generation for the entire test suite. We want to periodically change
    this `rng_salt` which updates all the seeds across the test suite.
    
    - The fixture that sets the global seed for every test case has been
    removed, and another fixture is added that restores the global seed
    after each test in case the test modifies the global seed.
    
    **Benefits:**
    
    We will be able to catch bugs hidden in tests that are passing only
    because of a magic seed that was set locally.
    
    **Possible Drawbacks:**
    
    This is a chore to maintain this seed an ensure that all tests pass with
    the new salt when it is updated.
    
    **Related Shortcut Story:**
    
    [sc-74294]
    
    ---------
    
    Co-authored-by: Mudit Pandey <[email protected]>
    astralcai and mudit2812 authored Oct 28, 2024
    Configuration menu
    Copy the full SHA
    8dde8f8 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2024

  1. Configuration menu
    Copy the full SHA
    ce0ab85 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7fafc93 View commit details
    Browse the repository at this point in the history
  3. suggestion, pytrees

    KetpuntoG committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    3324b8e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    30ec1d1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e4f55e0 View commit details
    Browse the repository at this point in the history