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: 'H' format requires 0 <= number <= 65535 #1656

Open
tralala87 opened this issue May 6, 2024 · 0 comments
Open

error: 'H' format requires 0 <= number <= 65535 #1656

tralala87 opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tralala87
Copy link

When I run my quantum machine learning algorithm on ibm quantum computer, I get:

error Traceback (most recent call last)
in <cell line: 270>()
268
269 # Optimize the parameters
--> 270 opt_result = optimizer.minimize(fun=lambda theta_flat: cost_function(theta_flat, num_qubits), x0=theta_flat)
271 optimal_theta = opt_result.x
272 optimal_value = opt_result.fun
...........
/usr/local/lib/python3.10/dist-packages/qiskit/qpy/binary_io/circuits.py in _write_instruction(file_obj, instruction, custom_operations, index_map, use_symengine, version)
686 num_ctrl_qubits = getattr(instruction.operation, "num_ctrl_qubits", 0)
687 ctrl_state = getattr(instruction.operation, "ctrl_state", 0)
--> 688 instruction_raw = struct.pack(
689 formats.CIRCUIT_INSTRUCTION_V2_PACK,
690 len(gate_class_name),

error: 'H' format requires 0 <= number <= 65535

@tralala87 tralala87 added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant