CQCL / pytket-quantinuum

pytket-quantinuum, extensions for pytket quantum SDK
Apache License 2.0
28 stars 13 forks source link

QIR submissions with more than N shots never return results (or error) #279

Open cqc-alec opened 1 year ago

cqc-alec commented 1 year ago

For the circuit below, it looks like N=3632; I don't know if the limit depends on the circuit.

from pytket.circuit import Circuit
from pytket.extensions.quantinuum import QuantinuumBackend, QuantinuumAPI, Language
from time import time
import warnings

warnings.filterwarnings("ignore")

api_handler = QuantinuumAPI(api_url="https://hqapi.quantinuum.com/")
b = QuantinuumBackend("H1-1E", api_handler=api_handler)

c = Circuit(2).H(0).CX(0, 1).measure_all()
c1 = b.get_compiled_circuit(c)

for n_shots in [3632, 3633]:
    t0 = time()
    r = b.run_circuit(c1, n_shots=n_shots, language=Language.QIR)
    t1 = time()
    print(n_shots, t1 - t0)

Output:

3632 7.960129261016846
^C

No problems with QASM submission.

cqc-alec commented 12 months ago

It seems that the job is actually run, and shows on the UI. It is also possible to retrieve the results with pytket-quantinuum by setting use_websocket=False in get_result(). But when using websockets (the default), we get no response.

mramirez2021 commented 12 months ago

@cqc-alec any chance you have the job id(s) from this testing?

cqc-alec commented 12 months ago

@cqc-alec any chance you have the job id(s) from this testing?

Sure. From a run just now (QA env), using websockets:

3632 shots: successful, job ID f621f33ceeae4779a03f569b7eb478b4 3633 shots: unsuccessful (no reply on websocket), job ID a500119299084e10b74ed3b7689f50cd