Skip to content

Replace the deprecated transpiled_circuit metrics with get_transpiled_circuit_metrics - #1787

Open
classiqdor wants to merge 2 commits into
mainfrom
fix_deprecation_transpiled_circuit
Open

classiqdor wants to merge 2 commits into
mainfrom
fix_deprecation_transpiled_circuit

Conversation

@classiqdor

Copy link
Copy Markdown
Contributor

Reading depth / count_ops from quantum_program.transpiled_circuit is deprecated. get_transpiled_circuit_metrics(quantum_program) returns both. Where a cell reads both values, it calls this once (circuit_metrics = ...).

transpiled_circuit.qasm (in resiliency_planning_AMD) is deprecated too. It's replaced with export(qprog, TargetLanguage.QASM3, transpilation_config=True), which I checked returns the same QASM.

Outputs:

  • Re-run locally with the updater from Save classiq's job logs as stdout when updating notebook outputs #1783, so their deprecation warnings are gone: qaoa_demonstration, ND_Laplacian_BE, select_structures_BE, stateprep_guassian_using_qsvt, and the 3 iQuHack notebooks.
  • Code only, CI runs them: resiliency_planning_AMD, quantum_walks_via_efficient_blockencoding, and both advection notebooks. Their saved outputs still show the old warning until their next re-run.
  • gradient_estimation_helpers.py prints the metrics only with print_circuit_info=True, which no notebook passes, so no outputs change.

Unrelated warnings that remain in the re-run outputs (to be handled separately):

  • stateprep_guassian_using_qsvt: "non-zero auxiliary amplitudes" at probability 1.7e-5 (it was already there)
  • classiq_iQuHack_2025_final_sol: the same warning, at probability 2.7%. It's new, since the previous outputs were generated with an SDK that didn't report it.

🤖 Generated with Claude Code

@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

@@ -541,8 +541,9 @@
"source": [

@TomerGoldfriend TomerGoldfriend Nov 19, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still some deprecation warnings. I guess we need to rerun those notebooks.


Reply via ReviewNB

…_circuit_metrics

Reading depth and count_ops from quantum_program.transpiled_circuit is
deprecated; get_transpiled_circuit_metrics(quantum_program) returns both.
Likewise, transpiled_circuit.qasm is replaced with
export(qprog, TargetLanguage.QASM3, transpilation_config=True), which
returns the same QASM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@classiqdor
classiqdor force-pushed the fix_deprecation_transpiled_circuit branch from 3304a59 to 8f0d86f Compare November 19, 2026 15:28
Also stops excluding #1787's notebooks from the deprecation-outputs check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants