Draft
Conversation
…_leakage_report. Add a correctness test for DirectSumGaugeGroup.
…gaugeopt.py to remove need for n_leak kwarg.
…aise an error if needed). All tests pass!
…ge order ofarguments.
…n, modified eigenvalue_entanglement_fidelity to handle bases with implied leakage modeling, half-baked extension of eigenvalue_fidelity thats work-in-progress.
rileyjmurray
commented
Jan 22, 2026
… II are both absent
Contributor
Author
|
Todo: add the following function. Maybe not strictly necessary, but I wrote it in another PR where it's distinctly less necessary. def trace_effect(op: _np.ndarray, op_basis: BasisLike, on_space: SpaceT = 'HilbertSchmidt'):
"""
Let `op` be the array representation of a superoperator G in `op_basis`,
where G maps from and to the space of order-d Hermitian operators.
The trace effect of G is the Heritian operator E that satifies
trace(G(ρ)) = trace(E ρ) for all order-d Hermitian matrices ρ.
If on_space='HilbertSchmidt', then this function returns a superket representation
of E in `op_basis`. If on_space='Hilbert', then we return E itself.
"""
d = int(_np.round(op.size ** 0.25))
assert op.shape == (d**2, d**2)
basis = op_basis if isinstance(op_basis, _Basis) else _Basis.cast(op_basis, dim=d**2)
vecI = _bt.stdmx_to_vec(_np.eye(d), basis)
vecE = op.T.conj() @ vecI
if on_space == 'HilbertSchmidt':
return vecE
else:
E = _bt.vec_to_stdmx(vecE, op_basis)
return E |
5664fa5 to
83c21cc
Compare
…:transform_composed_model. Those changes have been moved to PR #643.
Contributor
Author
|
The test in Original results are shown below. We don't rely on the exact numbers here. What matters is
qualitative aspects of how Gxpi2 and Gypi2 deviate from their respective targets. Since our
data generating model only applied leakage to Gxpi2, a "good" result reports much more error
in Gxpi2 than Gypi2. (It's not clear to me why stdgaugeopt lacks wildcard error.)
Leakage-aware guage optimization.
| Gate | ent. infidelity | 1/2 trace dist | 1/2 diamond dist | Max TOP | Unmodeled error |
|---------|-----------------|----------------|------------------|----------|-----------------|
| [] | 0.000009 | 0.002639 | 0.003724 | 0.000014 | 0.00007 |
| Gxpi2:0 | 0.000965 | 0.030946 | 0.040751 | 0.001629 | 0.000764 |
| Gypi2:0 | 0.000375 | 0.019367 | 0.025308 | 0.000531 | 0.000475 |
Standard gauge optimization
| Gate | ent. infidelity | 1/2 trace dist | 1/2 diamond dist | Max TOP |
|---------|-----------------|----------------|------------------|----------|
| [] | 0.000016 | 0.003644 | 0.005146 | 0.000026 |
| Gxpi2:0 | 0.000620 | 0.024758 | 0.032616 | 0.001000 |
| Gypi2:0 | 0.000611 | 0.024714 | 0.033323 | 0.001001 |
We'll run tests with subspace entanglement infidelity.
* For LAGO, infidelity of Gxpi2 is 2.57x larger than that of Gypi2;
we'll test for a 2x difference.
* For standard gauge optimization, Gxpi2 and Gypi2 have almost identical infidelities;
we'll test for a factor 1.1x there.The issue is that the factor 1.1x is, apparently, not enough to cover the change after merging in develop. I don't know exactly what changes in develop would cause the changes here, but that's the nature of integration tests. I'll probably regenerate the table and pick a new tolerance. |
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.
No description provided.