Repository navigation
Conversation
Signed-off-by: Scott Thornton <wsttiger@gmail.com>
The backend comparison in pauli_lcu_demo.py builds the alias encoding at mu=2, 3 and 4. The walk and QSVT circuits run at mu=2 and mu=3; the 19-qubit mu=4 encoding is priced, compared as an operator and applied once, since its walk and QSVT circuits took about 70 s of the example's 80 s on a two-thread CPU simulator. Including mu=3 shows the rounding behaviour the guide describes: its tables coincide with the mu=2 tables on this Hamiltonian, so the operator error stays at 4.5e-2 while the bound halves. The table now prints the bound beside the error. The resource table counted only X-type controlled gates, so the exact SELECT's controlled Y and Z (ccy, ccz, cz) and the alias circuit's cx and Hadamard gates were missing from the comparison. The row now lists rotations, uncontrolled single-qubit gates, singly, doubly and higher-controlled Paulis and Fredkins, and checks that these families sum to the estimator's total gate count. The guide and examples page describe the executed precisions and the table columns accordingly. Signed-off-by: Scott Thornton <wsttiger@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the existing PauliLCU walkthrough with the same mixed-sign, Y-containing Hamiltonian using exact PREPARE/SELECT and alias precision
mu=2andmu=4(skippingmu=3). Independent NumPy matrices and public alias-table enumeration distinguish coefficient discretization from circuit error while exercising the same action, Walk, and QSVT consumers. A separate small fixture checks odd/even moments; the resource table includes all ancillas and separates rotations, Toffolis, higher-controlled X, and Fredkins.Validation on CUDA-Q 0.16.0, Python 3.12.3, qpp-cpu:
python3 -m pytest tests/python/test_examples.py -k pauli_lcu_demo -q: 1 passed in 59.51 s.python3 -m sphinx -W --keep-going -b html docs/sphinx docs/sphinx/_build/html: passed.timeout 1200 python3 -m pytest tests/python -qreached its 20-minute limit (exit 124) during existing LCU regression cases. No failures were reported before timeout; the remaining suite is unverified. The focused example test and Sphinx build passed independently.Independent plan 01 PR against main; the original introduction and module-level composition remain in place. No other proposed example or new dependency is required.