Skip to content

Migrate/new execution interface d 3 - #1651

Open
nathan-classiq wants to merge 11 commits into
mainfrom
migrate/new-execution-interface-d-3
Open

Migrate/new execution interface d 3#1651
nathan-classiq wants to merge 11 commits into
mainfrom
migrate/new-execution-interface-d-3

Conversation

@nathan-classiq

Copy link
Copy Markdown
Collaborator

PR Description

Some notes

  • Please make sure that the notebook runs successfully with the latest Classiq version.

  • Please make sure that you placed the files in an appropriate folder

    • And that the file names are clear, descriptive, and match the notebook content.
      • Note that we require the file names of .ipynb and .qmod to be unique across this repository.
    • Plus, please make sure that all required files are included: .qmod, .synthesis_options.json, .metadata.json
    • And that images are embedded inside the notebook, not added as external files
  • If applicable, please include link to the paper on which the notebook is based, in the notebook itself.

  • Please use rebase on your branch (no merge commits)

  • Please link this PR to the relevant issue

  • Please make sure to run pre-commit when commiting changes

    • If you're using git in the terminal, make sure to install pre-commit via running pip install pre-commit followed by pre-commit install
    • Note that Classiq runs automatic code linting. Meaning that one of the tests verifies the output of pre-commit.
    • Also note that pre-commit may minorly alter some files. Make sure to git add the changes done by pre-commit

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

nathan-classiq and others added 11 commits July 8, 2026 09:43
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the two hand-rolled `estimate_cost` COBYLA loops with `ExecutionSession.variational_minimize` so the notebook follows the new execution API while preserving the existing sampling-based analysis flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the hand-rolled `estimate_cost` COBYLA loop with `ExecutionSession.variational_minimize` so this notebook follows the new execution API while keeping its sampling and validity-analysis workflow unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace `estimate_cost` optimizer loops with `ExecutionSession.variational_minimize` and switch gradient estimation from deprecated `estimate` to `observe`, keeping the notebook’s iterative ADAPT structure intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
This replaces ExecutionSession estimate/sample calls with classiq.execution.functions.sample and computes objective values from parsed shot counts to align with the new execution interface.

Co-authored-by: Cursor <cursoragent@cursor.com>
This removes ExecutionSession estimate/sample usage and evaluates objective values from weighted parsed shot counts using classiq.execution.functions.sample for new-interface compatibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ace.

This replaces ExecutionSession estimate and sample flows with classiq.execution.functions.sample and observe while preserving the optimizer and gradient loop behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nathan-classiq
nathan-classiq force-pushed the migrate/new-execution-interface-d-3 branch from f31be43 to 4d6df69 Compare July 8, 2026 08:08
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.

1 participant