Skip to content

Trex mitigation - #181

Open
dekelmeirom wants to merge 18 commits into
mainfrom
trex_mitigation
Open

Trex mitigation#181
dekelmeirom wants to merge 18 commits into
mainfrom
trex_mitigation

Conversation

@dekelmeirom

Copy link
Copy Markdown
Collaborator

class for TREX mitigation method. should support the WrapperEstimator flow.

@dekelmeirom dekelmeirom self-assigned this May 12, 2026
@coveralls

coveralls commented May 12, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 26155713930

Coverage decreased (-1.8%) to 91.851%

Details

  • Coverage decreased (-1.8%) from the base build.
  • Patch coverage: 60 uncovered changes across 6 files (338 of 398 lines covered, 84.92%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
qiskit_addon_utils/noise_management/error_mitigation/executor_quantum_program.py 84 49 58.33%
qiskit_addon_utils/noise_management/error_mitigation/execution_inputs.py 67 57 85.07%
qiskit_addon_utils/noise_management/error_mitigation/trex.py 154 145 94.16%
qiskit_addon_utils/noise_management/error_mitigation/executor_quantum_program_result.py 15 12 80.0%
qiskit_addon_utils/noise_management/error_mitigation/base_mitigator.py 60 58 96.67%
qiskit_addon_utils/exp_vals/measurement_bases.py 8 7 87.5%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1264
Covered Lines: 1161
Line Coverage: 91.85%
Coverage Strength: 0.92 hits per line

💛 - Coveralls

Comment thread qiskit_addon_utils/noise_management/error_mitigation/trex.py Outdated
Comment thread qiskit_addon_utils/noise_management/error_mitigation/trex.py Outdated
Comment thread qiskit_addon_utils/noise_management/error_mitigation/trex.py Outdated
@dekelmeirom
dekelmeirom requested a review from caleb-johnson May 13, 2026 15:27

@caleb-johnson caleb-johnson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A few small comments on the measurement bases module.

Comment thread qiskit_addon_utils/exp_vals/measurement_bases.py Outdated
Comment thread qiskit_addon_utils/exp_vals/measurement_bases.py Outdated
Comment thread qiskit_addon_utils/exp_vals/measurement_bases.py Outdated
Comment thread qiskit_addon_utils/exp_vals/measurement_bases.py Outdated

@caleb-johnson caleb-johnson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is looking great, just a few comments

# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""ExecutorQuantumProgram."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's put something more descriptive here

Args:
shots: The number of shots for each circuit execution.
items: Items that comprise the program.
noise_maps: Noise maps to use with samplex items.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

for noise_maps, can we say what these are and what they're used for if provided?

For passthrough_data, can we give an indication of why this exists and what its function is?


Args:
data: A list of dictionaries with array-valued data.
passthrough_data: Dictionary passed through execution without modification.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as above. It's not clear what this is from the documentation (as far as I can tell so far)

# Y commutes with Y, Z commutes with Z
obs = SparsePauliOp(["YI", "IZ"], [1.0, 2.0])
bases = ["YI", "IZ"]
obs = SparsePauliOp(["YX", "IZ"], [1.0, 2.0])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Have you glanced at the coverage of the new code? Is the TREX source 100% covered?

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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.

4 participants