Skip to content

Conversation

@yurekami
Copy link

Summary

Changed c2p_mapping (classical to physical) to c2v_mapping (classical to virtual) in apply_readout_error methods across all NoiseModel classes.

This aligns the noise model's behavior with the measurement module which correctly uses v_c_reg_mapping["c2v"] for mapping classical measurement results to logical qubit indices.

Changes

  • NoiseModelTQ.apply_readout_error() (line 477)
  • NoiseModelTQPhase.apply_readout_error() (line 716)
  • NoiseModelTQPhaseReadout.apply_readout_error() (line 762)

Test plan

  • Test readout error application with transpiled circuits
  • Verify measurement outcomes match expected noise characteristics

Fixes #223

🤖 Generated with Claude Code

Changed c2p_mapping (classical to physical) to c2v_mapping
(classical to virtual) in apply_readout_error methods to match
the measurement module's behavior and correctly apply readout
errors to the logical qubit indices.

Fixes mit-han-lab#223

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

Maybe there's a bug in 'apply_readout_error' function?

1 participant