Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/auto wiring #229

Merged
merged 44 commits into from
Oct 22, 2024
Merged

Feature/auto wiring #229

merged 44 commits into from
Oct 22, 2024

Conversation

deanpoulos
Copy link
Contributor

@deanpoulos deanpoulos commented Aug 26, 2024

(Work in progress)

Overview

Added a feature for auto-assigning channels for a collection of Quantum elements given a specific QM instrument setup.

graph TD
    A(Instruments) --> D["allocate_wiring()"]
    C(Connectivity) --> D["allocate_wiring()"]
    subgraph Wirer
        D["allocate_wiring()"]
    end
Loading

Features

Supports the following:

  • assignment of channels to any combination of MW-FEM/LF-FEM/Octave/OPX+.
  • any mapping of N resonator lines to M qubits
  • any mapping of N fems to OPX1000 chassis slots
  • overflowing of assignment to multiple slots, chassis, modules, octaves, etc.
  • any combination of resonator, flux line, coupler line for each qubit.
  • hardcoding of con/slot/port for particular lines
  • basic visualization of a single OPX1000

Safety

It has some simple validation:

  • can't mix OPX+ and OPX1000
  • can't define two FEMs on the same slot on the same chassis

Examples

    instruments = Instruments()
    instruments.add_lf_fem(con=1, slots=1)
    instruments.add_mw_fem(con=1, slots=2)

    qubits = [1, 2, 3, 4, 5, 6]
    connectivity = Connectivity()
    connectivity.add_resonator_line(qubits=qubits)
    connectivity.add_qubit_drive_lines(qubits=qubits)
    connectivity.add_qubit_flux_lines(qubits=qubits)

    allocate_wiring(connectivity, instruments)

    if visualize:
        visualize_chassis(connectivity.elements, instruments.available_channels)

image

Copy link

github-actions bot commented Aug 26, 2024

Unit Test Results

412 tests   403 ✔️  45s ⏱️
    1 suites      9 💤
    1 files        0

Results for commit 8e8945d.

♻️ This comment has been updated with latest results.

@deanpoulos
Copy link
Contributor Author

@TheoLaudatQM this is ready to for a final review and merge!

(the black formatting is failing, but I can't reproduce it locally).

@yomach
Copy link
Collaborator

yomach commented Oct 11, 2024

@TheoLaudatQM this is ready to for a final review and merge!

(the black formatting is failing, but I can't reproduce it locally).

Do poetry install to install the same version of black.

Copy link
Contributor

@TheoLaudatQM TheoLaudatQM left a comment

Choose a reason for hiding this comment

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

It is truly amazing, great job Dean!!

qualang_tools/wirer/README.md Outdated Show resolved Hide resolved
@TheoLaudatQM
Copy link
Contributor

To me it is ready to merge, but I am not sure how to fix the linting issues raised by the test... (black is okay)

@yomach
Copy link
Collaborator

yomach commented Oct 21, 2024

To me it is ready to merge, but I am not sure how to fix the linting issues raised by the test... (black is okay)

@TheoLaudatQM @deanpoulos - If you're stuck, schedule 30 minutes with me.

@TheoLaudatQM
Copy link
Contributor

Essentially flake8 doesn't want the init.py files so I could just delete them but maybe they are here for a reason so let's wait for @deanpoulos

@deanpoulos deanpoulos merged commit 7025c54 into main Oct 22, 2024
2 checks passed
@deanpoulos deanpoulos deleted the feature/auto_wiring branch October 22, 2024 14:05
@TheoLaudatQM
Copy link
Contributor

TheoLaudatQM commented Oct 22, 2024 via email

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