Skip to content

Information correction in Repetition Codes tutorial --> definition of measure_syndrome_bit function #4287

@matteo-piccolini

Description

@matteo-piccolini

URL to the relevant tutorial

Hi, the issue is related to the Repetition Codes Tutorial https://quantum.cloud.ibm.com/docs/en/tutorials/repetition-codes#tutorial-survey --> description of the measure_syndrome_bit function.

Select all that apply

  • new content request
  • typo
  • code bug
  • out-of-date content
  • broken link
  • other

Describe the fix or the content request.

I think there's an error in the description of the measure_syndrome_bit function. In particular, the incriminated statement is

We reset our ancilla qubits after measuring the stabilizer so we can reuse them for repeated stabilizer measurements.

Given the previous initialization

qreg_data = QuantumRegister(3)
qreg_measure = QuantumRegister(2)
creg_data = ClassicalRegister(3, name="data")
creg_syndrome = ClassicalRegister(2, name="syndrome")
state_data = qreg_data[0]
ancillas_data = qreg_data[1:]

the description drives the reader to believe that the qubits to reset are qreg_data[1] and qreg_data[2]. This is incorrect, as the qubits to reset are the ones in qreg_measure. This is consistent with what the function actually does, since it involves

with circuit.if_test((creg_measure[0], 1)):
        circuit.x(qreg_measure[0])
with circuit.if_test((creg_measure[1], 1)):
        circuit.x(qreg_measure[1])

I therefore suggest to change "We reset our ancilla qubits..." with "We reset our measurement qubits".

I also suggest to rename creg_measure as creg_syndrome within the definition of the function to uniform it with the rest of the code.

P.s.: this is the first time I open an issue, I hope I did everything correctly :)

For new content requests - if the request is accepted, do you want to write the content?

I only want to review the material when it's finished

Metadata

Metadata

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions