qiskit-ibm-runtime icon indicating copy to clipboard operation
qiskit-ibm-runtime copied to clipboard

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

Open tralala87 opened this issue 9 months ago • 0 comments

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 avatar May 06 '24 18:05 tralala87