Skip to content

docs: fix hardcoded resonator output ports in demonstration.md#222

Open
aranbqm wants to merge 1 commit into
qua-platform:mainfrom
aranbqm:fix/demonstration-resonator-output-ports
Open

docs: fix hardcoded resonator output ports in demonstration.md#222
aranbqm wants to merge 1 commit into
qua-platform:mainfrom
aranbqm:fix/demonstration-resonator-output-ports

Conversation

@aranbqm

@aranbqm aranbqm commented Jul 1, 2026

Copy link
Copy Markdown

Summary

In docs/demonstration.md, the "Populating the Machine" example initializes each qubit's resonator inside a for idx in range(num_qubits) loop, but hardcoded the same output ports for every qubit:

opx_output_I=("con1", 1),
opx_output_Q=("con1", 2),

This contradicts the machine.print_summary() output shown further down in the same doc, which reports distinct ports per qubit: q0 has ('con1', 1)/('con1', 2) and q1 has ('con1', 4)/('con1', 5) — i.e. 3 * idx + 1 / 3 * idx + 2, matching the pattern already used for the xy and z channels a few lines above.

Fix

  • opx_output_I=("con1", 1)opx_output_I=("con1", 3 * idx + 1)
  • opx_output_Q=("con1", 2)opx_output_Q=("con1", 3 * idx + 2)

opx_input_I/opx_input_Q are left unchanged as ("con1", 1)/("con1", 2), since those are intentionally shared across qubits.

Test plan

  • Diffed against the machine.print_summary() output later in the same doc to confirm the formula produces the shown ports for q0 and q1.

The resonator initialization in the Populating the Machine loop hardcoded
opx_output_I/Q to ("con1", 1)/("con1", 2) for every qubit, even though the
loop iterates idx to give each qubit distinct ports. The printed
machine.print_summary() output later in the same doc shows q0 with
('con1', 1)/('con1', 2) and q1 with ('con1', 4)/('con1', 5), i.e.
3 * idx + 1 / 3 * idx + 2 — the code didn't match its own shown output.
opx_input_I/Q are left as-is since they are intentionally shared across
qubits.
@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

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.

3 participants