Qho decapitation shim#2
Open
mbahram wants to merge 1614 commits into
Open
Conversation
Adding new operators: beam-splitter and phase shift
clarify what is TN in Wolfram quantum framework
Phase space quasiprobability distributions
adding doc page, with 2 basis examples
more examples added
more examples
added more examples
corrected HHL
minor update
some updates and cleaning up
more edits on text
Add a new Mathematica notebook exploring the double-cover relationship between SU(2) and SO(3) (double-cover-SU2-SO3.nb). Also update the existing course notebook (introduction-to-QIS.nb) with revisions to the Introduction to QIS material. These are binary notebook changes containing content and formatting updates.
Training notebooks
Add the /nisq-critique-papers entry to .gitignore to prevent that directory (likely local/generated critique papers) from being tracked by git.
Changing Re such that it does not appear for symbolic states
Changing MaTeX and adding references plus minor edits
Keeping option to have non-normalized coherent states, since in some cases it is useful for symbolic manipulations. By default it is normalized
replacing definition with Norm[..,F]
Conversion from LaTex to display formula in all chapters, Chapter 2 minor updates
Line 379: ConfirmBy[..., QuantumOperartorQ] in the Controlled0 dispatch
called an undefined predicate, silently failing for non-operator args.
Line 855: QuantumOperator["HeisenbergWeyl"] returned QuantumOperartor[...]
unevaluated instead of dispatching to the {"HeisenbergWeyl", 2} entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add '/.claude' to .gitignore to prevent committing the Claude config directory.
Fix gates and paclet cleanup
Delete Kernel/QuantumHamiltonianOperator/ (4 files, 281 LOC). Audit
showed it was an orphan: not in PacletInfo.wl Symbols, zero kernel .m
references outside its own subdir, only stale notebook menus referenced
the symbol. The QuantumHamiltonianOperator[] wrapper added no
functionality beyond QuantumOperator[..., "ParameterSpec" -> spec].
Migrate the two named constructors with no QuantumOperator equivalent
into Kernel/QuantumOperator/NamedOperators.m after the "Hamiltonian"
definition:
- QuantumOperator[{"Ising", J}, order : {1, 2}, opts___]
- QuantumOperator[{"TransverseIsing", J}, order : {1, 2}, opts___]
The unused {parameter, t0, tf} placeholder from the QHO signature is
dropped; users pass "ParameterSpec" -> {s, 0, 1} via opts when J is
symbolic. Both constructors verified in a Wolfram kernel: Hermitian
matrices match by-hand calculation; symbol registration in
$QuantumOperatorNames confirmed.
Skip migration of:
- "LinearInterpolation" (3-line user code)
- {"EvolutionOperator", U_matrix} inverse (no callers in audited tree)
- ["Gap"] / ["MinimumGap"] family (shallow utility on top of
qo["Eigenvalues"]; the 100-point default was a known perf trap)
Replacement guide for evolution work (already in active code):
- qo["EvolutionOperator"] -> QuantumEvolve[qo, None] / DSolveValue
- qo["NEvolutionOperator"] -> NDSolveValue (recommended)
- QuantumOperator[{"Hamiltonian", H, Ls, gammas}] -> packs H + jumps
Top-level CHANGELOG.md created with the user-facing migration table.
PacletInfo.wl needs no edit -- the QHO context was never registered.
See audit/qho-deprecation-audit.md and audit/CHANGELOG.md 2026-04-30.
Builds on remove-quantum-hamiltonian-operator (a727501). That branch hard-deleted the QHO subsystem; this branch instead re-introduces QuantumHamiltonianOperator as a single-file deprecation shim that emits Message[QuantumHamiltonianOperator::deprecated] and forwards to the equivalent QuantumOperator call. Old user code keeps working with a warning; the "Ising" and "TransverseIsing" named constructors still live as new constructors on QuantumOperator. Synthesis with origin/DecapitateHamiltonianOperator (upstream branch 27 days old, bundled with much larger refactor we do not want to merge): - Shim pattern adopted from upstream a8a4a7c. - Test file structure adapted from upstream Tests/QuantumHamiltonianDecapitation.wlt. - Kept this branch surgical scope -- no other files touched. - Kept the order-second + opts signature for the new named constructors (more idiomatic; ParameterSpec optional). The shim translates the legacy QHO-style positional spec into a "ParameterSpec" option attached to the forwarded call. Test runner output: PASS QuantumDistance.wlt: 32/32 PASS QuantumHamiltonianDecapitation.wlt: 18/18 Total: 50/50 (100%) The shim file lives at Kernel/QuantumHamiltonianOperator.m (single file, ~50 lines, replacing the original 4-file subdir at the same path). PacletInfo.wl needs no change -- the symbol context was never registered, and content-based loading picks up the file via its Package declaration.
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.
decapitation of hamiltonian operator