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

error in wire_cutting_post_processing.py", line 164, in fill_label #569

Open
naeemktk opened this issue Apr 27, 2024 · 1 comment
Open
Labels
cutqc Related to the wire cutting code based on the CutQC paper, arXiv:2012.02333

Comments

@naeemktk
Copy link

naeemktk commented Apr 27, 2024

I have Qiskit circuit QAOA
when i run the bellow code in pycharm

cuts = cut_circuit_wires(
            circuit=circuit,
            method="automatic",
            max_subcircuit_width=max_subcircuit_width,
            max_subcircuit_cuts=10,
            max_subcircuit_size=12,
            max_cuts=10,
            num_subcircuits=[2],
        )
    subcircuit_instance_probabilities = evaluate_subcircuits(cuts)

on the line subcircuit_instance_probabilities = evaluate_subcircuits(cuts)
i get bellow error

   File "/home/naeem/PhDResearch/artifact/cutqc/wire_cutting_post_processing.py", line 329, in generate_summation_terms
    subcircuit_full_label = fill_label(
                            ^^^^^^^^^^^
  File "/home/naeem/anaconda3/envs/phd/lib/python3.11/site-packages/qiskit/utils/deprecation.py", line 96, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/naeem/PhDResearch/artifact/cutqc/wire_cutting_post_processing.py", line 164, in fill_label
    meas[qubit_idx] = subcircuit_label["meas"][subcircuit_meas_label_counter]
                      ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: string index out of range

Please help me

@garrison garrison added the cutqc Related to the wire cutting code based on the CutQC paper, arXiv:2012.02333 label Apr 29, 2024
@garrison
Copy link
Member

garrison commented Apr 29, 2024

Thank you for the report. Two quick thoughts: Without a circuit, this is not a full reproducible example. Also, cutqc is deprecated and users are encouraged to migrate to the new circuit cutting workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutqc Related to the wire cutting code based on the CutQC paper, arXiv:2012.02333
Projects
None yet
Development

No branches or pull requests

2 participants