Skip to content

Conversation

@perlinm
Copy link
Contributor

@perlinm perlinm commented Dec 16, 2024

Note that the current implementation of Permute-ing classical registers may result in errors before #116 is fixed.

One possible solution to this issue is to construct classical logic that swaps the values of classical registers. On further thought, I'll leave this PR as a draft until that is implemented...

Classical registers are now swapped "manually" to avoid issue #116

@perlinm perlinm requested a review from ciaranra as a code owner December 16, 2024 23:07
Comment on lines -373 to +383
block = Block(
MeasDecode(
q=self.d,
meas_basis=meas_basis,
meas=self.raw_meas,
log_raw=self.log_raw,
log=self.log,
syn_meas=self.syn_meas,
pf_x=self.pf_x,
pf_z=self.pf_z,
last_raw_syn_x=self.last_raw_syn_x,
last_raw_syn_z=self.last_raw_syn_z,
),
block = MeasDecode(
q=self.d,
meas_basis=meas_basis,
meas=self.raw_meas,
log_raw=self.log_raw,
log=self.log,
syn_meas=self.syn_meas,
pf_x=self.pf_x,
pf_z=self.pf_z,
last_raw_syn_x=self.last_raw_syn_x,
last_raw_syn_z=self.last_raw_syn_z,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just some minor cleanup that comes for the ride in this PR

@perlinm perlinm marked this pull request as ready for review December 17, 2024 02:01
Copy link
Member

@ciaranra ciaranra left a comment

Choose a reason for hiding this comment

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

LGTM

@ciaranra ciaranra merged commit cc28567 into PECOS-packages:development Jan 2, 2025
17 checks passed
@perlinm perlinm deleted the permute-steane branch January 7, 2025 01:53
ciaranra added a commit to ciaranra/PECOS-alt that referenced this pull request May 25, 2025
* Unroll broadcast face rotations (PECOS-packages#110)

* Upgrade to using uv instead of pip (PECOS-packages#111)

* Adding uv to Makefile

* Turn on artifact generation (PECOS-packages#117)

* Add T gates with active error correction (PECOS-packages#118)

* remove t_tel_cor

* bugfix in tdg_cor

* fix t_cor

* Permute all variables of the Steane code (PECOS-packages#114)

* compute the swap of CRegs

* Add Steane-type and teleportation-based QEC for the Steane code (PECOS-packages#115)

* fix qec_steane_z

* set flag bit correctly

* add qec_steane_.*tel templates

* fix Steane.qec_steane_tel

* permute all qubits for teleportation

* fix teleportation-based QEC

* two flag bits for Steane.qec_tel

* rename flag_bit --> flag, in agreement with elsewhere in the repo

* fix If statement

* fix Steane QEC and an incorrect type hint

---------

Co-authored-by: Michael A. Perlin <[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.

2 participants