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

Reproduce Table 1 of arXiv:2404.18809 #198

Merged
merged 116 commits into from
Jan 23, 2025
Merged

Reproduce Table 1 of arXiv:2404.18809 #198

merged 116 commits into from
Jan 23, 2025

Conversation

perlinm
Copy link
Collaborator

@perlinm perlinm commented Jan 21, 2025

@jmlarson1 let's discuss this sometime

@perlinm
Copy link
Collaborator Author

perlinm commented Jan 22, 2025

  1. Your reading is correct, there is only a partial search over placement strategies for the right partition.
  2. It is certainly possible to do a complete search for the right partition as well. I avoid this (as we did in arXiv:2404.18809 for the [288, 12, 18] code) because it generally takes very long. If you want to perform this search, you should search over
orders_l = code.get_order(vecs_l[0]), code.get_order(vecs_l[1])
for vecs_r in lattice_vectors:
    orders_r = code.get_order(vecs_r[0]), code.get_order(vecs_r[1])
    if orders_r == orders_l[::-1]
        vecs_r = vecs_r[::-1]
    elif orders_r != orders_l:  # required for L/R qubits to be placed on the same rectangular grid
        continue
  1. The "left" and "right" partitions correspond to L-type and R-type data qubits. See Figure 1 on page 4 of arXiv:2308.07915.
  2. There is no guarantee of optimality anywhere I can see 🙂

@perlinm
Copy link
Collaborator Author

perlinm commented Jan 22, 2025

By the way, if you want to play around with qubit placements, you can do something like

code = qldpc.codes.BBCode(
    {x: 6, y: 6},
    x**3 + y + y**2,
    y**3 + x + x**2,
)
folded_layout = True

vecs_l, vecs_r, shift_r, optimal_distance = get_optimal_layout_params(code, folded_layout, cheat=True)
get_qubit_pos = get_qubit_pos_func(code, folded_layout, vecs_l, vecs_r, shift_r)

Now you can get the position of node = qldpc.objects.Node(...) with get_qubit_pos(node.index, node.is_data).

@jmlarson1
Copy link
Collaborator

Since there is no search for optimality, should we rename the function get_optimal_layout_params to get_best_known_layout_params?

@perlinm
Copy link
Collaborator Author

perlinm commented Jan 22, 2025

get_best_known_layout_params doesn't sound right either, because get_optimal_layout_params does optimize over some search space (as long as cheat=False).

Maybe rather than having a boolean cheat flag, I can split off get_best_known_layout_params from get_optimal_layout_params. Is there a better name for get_optimal_layout_params when it only finds an optimum over a restricted search space?

@jmlarson1
Copy link
Collaborator

  1. I think the "split" is a good idea.
  2. How about the name search_for_layout_params since there is some search space. ("optimal" suggests "best-possible" to me.)

@vtomole vtomole changed the title Fully reproduce Talbe 1 of arXiv:2404.18809 Fully reproduce Table 1 of arXiv:2404.18809 Jan 22, 2025
@perlinm
Copy link
Collaborator Author

perlinm commented Jan 22, 2025

@jmlarson1 done. What do you think of the current version?

@perlinm perlinm changed the title Fully reproduce Table 1 of arXiv:2404.18809 Reproduce Table 1 of arXiv:2404.18809 Jan 23, 2025
@perlinm perlinm changed the base branch from reproduce-arxiv to main January 23, 2025 00:14
@perlinm perlinm linked an issue Jan 23, 2025 that may be closed by this pull request
@jmlarson1 jmlarson1 merged commit 5d4a20e into main Jan 23, 2025
4 checks passed
@jmlarson1 jmlarson1 deleted the actually-reproduce branch January 23, 2025 16:22
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.

Handle more general layouts in BBCode
2 participants