qiskit-community / qiskit-aqua

Quantum Algorithms & Applications (**DEPRECATED** since April 2021 - see readme for more info)
https://qiskit.org/aqua
Apache License 2.0
572 stars 376 forks source link

IBMQBackendApiError: "Error submitting job: '400 Client Error #884

Closed rp87701n closed 4 years ago

rp87701n commented 4 years ago

Information

Screen Shot 2020-04-03 at 7 35 21 PM Screen Shot 2020-04-03 at 7 36 13 PM Qiskit Software Version
Qiskit 0.16.2
Terra 0.12.0
Aer 0.4.1
Ignis 0.2.0
Aqua 0.6.5
IBM Q Provider 0.5.0

Python | 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) [GCC 7.3.0] OS | Linux CPUs | 8 Memory (Gb) | 31.409027099609375 Fri Apr 03 23:22:05 2020 UTC OS: cloud-based IBM Quantum systems and simulators

What is the current behavior?

I can run the QSVM algorithm on qasm_simulator and getting the result back but when i run the same code on ibmq_16_melbourne device or any other device. getting this error

IBMQBackendApiError Traceback (most recent call last)

in 8 svm = QSVM(feature_map, training_input, test_input, total_array,multiclass_extension=extension) 9 quantum_instance = QuantumInstance(backend, shots=1024, seed_simulator=aqua_globals.random_seed, seed_transpiler=aqua_globals.random_seed, circuit_caching=False,wait=5, skip_qobj_validation=False,job_callback=job_callback) ---> 10 result = svm.run(quantum_instance,timeout=1200) 11 for k,v in result.items(): 12 print("'{}' : {}".format(k, v)) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/quantum_algorithm.py in run(self, quantum_instance, **kwargs) 65 quantum_instance.set_config(**kwargs) 66 self._quantum_instance = quantum_instance ---> 67 return self._run() 68 69 @abstractmethod /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/qsvm.py in _run(self) 435 436 def _run(self): --> 437 return self.instance.run() 438 439 @property /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_multiclass.py in run(self) 60 put the train, test, predict together 61 """ ---> 62 self.train(self._qalgo.training_dataset[0], self._qalgo.training_dataset[1]) 63 if self._qalgo.test_dataset is not None: 64 self.test(self._qalgo.test_dataset[0], self._qalgo.test_dataset[1]) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_multiclass.py in train(self, data, labels) 41 def train(self, data, labels): 42 """ train """ ---> 43 self.multiclass_classifier.train(data, labels) 44 45 def test(self, data, labels): /opt/conda/lib/python3.7/site-packages/qiskit/aqua/components/multiclass_extensions/one_against_rest.py in train(self, x, y) 76 "the prediction would be boring.") 77 estimator = self.estimator_cls(*self.params) ---> 78 estimator.fit(x, column) 79 self.estimators.append(estimator) 80 /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_estimator.py in fit(self, x, y) 37 y (numpy.ndarray): input labels, Nx1 array 38 """ ---> 39 self._qsvm_binary.train(x, y) 40 self._ret = self._qsvm_binary._ret 41 /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_binary.py in train(self, data, labels) 78 """ 79 scaling = 1.0 if self._qalgo.quantum_instance.is_statevector else None ---> 80 kernel_matrix = self._qalgo.construct_kernel_matrix(data) 81 labels = labels * 2 - 1 # map label from 0 --> -1 and 1 --> 1 82 labels = labels.astype(np.float) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/qsvm.py in construct_kernel_matrix(self, x1_vec, x2_vec, quantum_instance) 369 raise AquaError("Either setup quantum instance or provide it in the parameter.") 370 --> 371 return QSVM.get_kernel_matrix(self._quantum_instance, self.feature_map, x1_vec, x2_vec) 372 373 def train(self, data, labels, quantum_instance=None): /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/qsvm.py in get_kernel_matrix(quantum_instance, feature_map, x1_vec, x2_vec) 322 323 results = quantum_instance.execute(circuits, --> 324 had_transpiled=use_parameterized_circuits) 325 326 if logger.isEnabledFor(logging.DEBUG): /opt/conda/lib/python3.7/site-packages/qiskit/aqua/quantum_instance.py in execute(self, circuits, had_transpiled) 379 result = run_qobj(qobj, self._backend, self._qjob_config, 380 self._backend_options, self._noise_config, --> 381 self._skip_qobj_validation, self._job_callback) 382 383 if self._circuit_summary: /opt/conda/lib/python3.7/site-packages/qiskit/aqua/utils/run_circuits.py in run_qobj(qobj, backend, qjob_config, backend_options, noise_config, skip_qobj_validation, job_callback) 220 for qob in qobjs: 221 job, job_id = _safe_submit_qobj(qob, backend, --> 222 backend_options, noise_config, skip_qobj_validation) 223 job_ids.append(job_id) 224 jobs.append(job) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/utils/run_circuits.py in _safe_submit_qobj(qobj, backend, backend_options, noise_config, skip_qobj_validation) 137 job = run_on_backend(backend, qobj, backend_options=backend_options, 138 noise_config=noise_config, --> 139 skip_qobj_validation=skip_qobj_validation) 140 try: 141 job_id = job.job_id() /opt/conda/lib/python3.7/site-packages/qiskit/aqua/utils/run_circuits.py in run_on_backend(backend, qobj, backend_options, noise_config, skip_qobj_validation) 323 return job 324 else: --> 325 job = backend.run(qobj, **backend_options, **noise_config) 326 return job /opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py in run(self, qobj, job_name, job_share_level, job_tags, validate_qobj) 170 if validate_qobj: 171 validate_qobj_against_schema(qobj) --> 172 return self._submit_job(qobj, job_name, api_job_share_level, job_tags) 173 174 def _submit_job( /opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py in _submit_job(self, qobj, job_name, job_share_level, job_tags) 214 job_tags=job_tags) 215 except ApiError as ex: --> 216 raise IBMQBackendApiError(' Error submitting job: {}'.format(str(ex))) 217 218 # Error in the job after submission: IBMQBackendApiError: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'" But actually 5 times jobs were submitted on a quantum device[i can see the same on result tab on cloud]. Not sure where this number 5 configure for concurrent jobs. ### Steps to reproduce the problem %matplotlib inline # Importing standard Qiskit libraries and configuring account from qiskit import QuantumCircuit, execute, Aer, IBMQ from qiskit.compiler import transpile, assemble from qiskit.tools.jupyter import * from qiskit.visualization import * import numpy as np from qiskit.ml.datasets import iris from qiskit.aqua.utils import split_dataset_to_data_and_labels from qiskit.aqua.algorithms import SVM_Classical from qiskit.aqua import QuantumInstance from qiskit.aqua import run_algorithm from qiskit.aqua.components.multiclass_extensions import one_against_rest, all_pairs from qiskit.aqua.input import ClassificationInput from qiskit.tools.monitor import job_monitor from qiskit import QuantumCircuit, execute, Aer, IBMQ,QuantumRegister,ClassicalRegister from qiskit.tools.visualization import plot_histogram from qiskit.aqua import QuantumInstance, aqua_globals from qiskit.aqua.components.feature_maps import SecondOrderExpansion from qiskit.aqua.algorithms import QSVM from qiskit.aqua.components.multiclass_extensions import AllPairs from qiskit.aqua.utils.dataset_helper import get_feature_dimension from qiskit.aqua.algorithms.many_sample.qsvm._qsvm_estimator import _QSVM_Estimator from qiskit.aqua.components.multiclass_extensions import (OneAgainstRest, AllPairs, ErrorCorrectingCode) from qiskit.aqua.algorithms.classical.svm import _RBF_SVC_Estimator feature_dim = 4 # dimension of each data point sample_Total, training_input, test_input, class_labels = iris(training_size=20, test_size=10, n=feature_dim, plot_data=True) temp = [test_input[k] for k in test_input] total_array = np.concatenate(temp) backend = Aer.get_backend('qasm_simulator') aqua_globals.random_seed = 10598 feature_map = SecondOrderExpansion(feature_dimension=get_feature_dimension(training_input), depth=2, entanglement='linear') extensions = [ OneAgainstRest(_QSVM_Estimator, [feature_map]), AllPairs(_QSVM_Estimator, [feature_map])] for extension in extensions: svm = QSVM(feature_map, training_input, test_input, total_array,multiclass_extension=extension) quantum_instance = QuantumInstance(backend, shots=1024, seed_simulator=aqua_globals.random_seed, seed_transpiler=aqua_globals.random_seed, circuit_caching=False,wait=5, skip_qobj_validation=False,job_callback=job_callback) result = svm.run(quantum_instance,timeout=1200) for k,v in result.items(): print("'{}' : {}".format(k, v)) ### What is the expected behavior? I should see the result should print the following value-based on simulator result instead of throwing error. 'testing_accuracy' : 1.0 'test_success_ratio' : 1.0 'predicted_labels' : [1] 'predicted_classes' : ['B'] Attached screenshot of 5 jobs submitted on quantum device and result of one job
fbm2718 commented 4 years ago

I actually have the same problem with melbourne backend since yesterday's evening (CEST). I cannot send ANY job because I get the error about too many concurrent job requests, even though I do not have any jobs pending (according to my profile's dashboard). 5-qubit backends work normally and I can send jobs to them.

jyu00 commented 4 years ago

On the public devices, including ibmq_qasm_simulator, you can only have 5 unfinished jobs at a time.

@fbm2718 Are you saying that you verified you had no pending jobs before trying to run a job, yet the job submit still failed with the "maximum number reached" error?

rp87701n commented 4 years ago
  1. yes, that's right. there are no pending jobs. but still failing.
  2. I tried with the 5-qubit device but still failing . can you tell me name of the device that you tried which is working.
jyu00 commented 4 years ago

@rp87701n The issue should be fixed now, so can you try running jobs again? Don't forget there's a limit of 5 unfinished jobs. If it somehow still doesn't work, can you post the failing job ID and the backend you used? Thanks!

rp87701n commented 4 years ago

I just tried with ibmq_london instance and got the same error. please find job id 5e8d45f8db35e20012d27877 5e8d45f5628fb5001299d32a 5e8d45f18de4b40012aa08dc 5e8d45eb628fb5001299d328 5e8d45e78de4b40012aa08da Screen Shot 2020-04-07 at 11 39 58 PM

rp87701n commented 4 years ago
  1. tried with Backend: 'ibmqx2 (<AccountProvider for IBMQ(hub='ibm-q', group='open', project='main')>)', with following setting: {'basis_gates': ['u1', 'u2', 'u3', 'cx', 'id'], 'coupling_map': [[0, 1], [0, 2], [1, 0], [1, 2], [2, 0], [2, 1], [2, 3], [2, 4], [3, 2], [3, 4], [4, 2], [4, 3]]} {'pass_manager': None, 'initial_layout': None, 'seed_transpiler': 10598, 'optimization_level': None} RunConfig(max_credits=10, seed_simulator=10598, shots=1024) {'timeout': None, 'wait': 5} {}

got the same error here is the job submitted. 5e8d4933db35e20012d27893 JobStatus.QUEUED 5e8d492fc2693200125d4568 JobStatus.QUEUED 5e8d492cc9b49f00110be22f JobStatus.QUEUED 5e8d492a9b8c770011088162 JobStatus.QUEUED 5e8d4926c2693200125d4566 JobStatus.RUNNING

  1. checke with Backend: 'ibmq_16_melbourne (<AccountProvider for IBMQ(hub='ibm-q', group='open', project='main')>)', with following setting: {'basis_gates': ['id', 'u1', 'u2', 'u3', 'cx'], 'coupling_map': [[0, 1], [0, 14], [1, 0], [1, 2], [1, 13], [2, 1], [2, 3], [2, 12], [3, 2], [3, 4], [3, 11], [4, 3], [4, 5], [4, 10], [5, 4], [5, 6], [5, 9], [6, 5], [6, 8], [7, 8], [8, 6], [8, 7], [8, 9], [9, 5], [9, 8], [9, 10], [10, 4], [10, 9], [10, 11], [11, 3], [11, 10], [11, 12], [12, 2], [12, 11], [12, 13], [13, 1], [13, 12], [13, 14], [14, 0], [14, 13]]} {'pass_manager': None, 'initial_layout': None, 'seed_transpiler': 10598, 'optimization_level': None} RunConfig(max_credits=10, seed_simulator=10598, shots=1024) {'timeout': None, 'wait': 5} {} {} Measurement mitigation: None

here is the job id for the same. 5e8d49f89b8c770011088169 JobStatus.QUEUED 5e8d49f4c2693200125d4571 JobStatus.QUEUED 5e8d49f1fa2e94001232aede JobStatus.QUEUED 5e8d49eec2693200125d4570 JobStatus.QUEUED 5e8d49e7158d5e001135c13c JobStatus.QUEUED

Note: I run this test on each device separately to see if any of this device is working or not. at each time when I am running test, I make sure that if any jobs pending or running and cancel them before running.

rp87701n commented 4 years ago

here is a snippet of the code that I am running and error that I got during this test.

Screen Shot 2020-04-07 at 11 54 57 PM Screen Shot 2020-04-07 at 11 54 15 PM

jyu00 commented 4 years ago

tried with Backend: 'ibmqx2 ... got the same error here is the job submitted. 5e8d4933db35e20012d27893 JobStatus.QUEUED 5e8d492fc2693200125d4568 JobStatus.QUEUED 5e8d492cc9b49f00110be22f JobStatus.QUEUED 5e8d492a9b8c770011088162 JobStatus.QUEUED 5e8d4926c2693200125d4566 JobStatus.RUNNING

checke with Backend: 'ibmq_16_melbourne here is the job id for the same. 5e8d49f89b8c770011088169 JobStatus.QUEUED 5e8d49f4c2693200125d4571 JobStatus.QUEUED 5e8d49f1fa2e94001232aede JobStatus.QUEUED 5e8d49eec2693200125d4570 JobStatus.QUEUED 5e8d49e7158d5e001135c13c JobStatus.QUEUED

@rp87701n In both cases you described above, it seems that you submitted 5 jobs to each device, all 5 jobs were accepted (hence statuses were QUEUED/RUNNING). But the 6th job to each device was rejected? If so, that's the expected behavior as you can only have 5 unfinished jobs at a time. A job is "unfinished" if it's in one of INITIALIZING, QUEUED, VALIDATING, and RUNNING states.

rp87701n commented 4 years ago

@jyu00 No, it is not rejected all jobs were completed. as I explained earlier.

  1. first, I submitted jobs to ibmq_london and waited for the result, I got an error within 5 sec but when I checked the results page. I saw 3 jobs were running and 2 were queued.
  2. since I got the error, I canceled running and queued jobs with ibmq_london. Now no jobs were running on any devices.
  3. started to submit the jobs to ibmqx2. note: why I tried with another device: anyway I got an error and hence no point to wait to complete the jobs on London device. here also the same behavior and got the same error and hence no point in running jobs. that's why I canceled jobs on this devices.
  4. then I tried another device. why I tried with another device again. just to validate this error is not device-dependent. whether I am getting all devices. I am getting this error on all devices. Please note: I tried these steps one by one in sequence. I am 100% +VE that I am not submitting 6th jobs or all this device concurrently. Hoping you got my test case. let me know if you need any other details to debug this issue.
jyu00 commented 4 years ago

@rp87701n Due to backend limitation on how many circuits are allowed in a job, qiskit-aqua may split an experiment into multiple jobs. When I ran your test case, I could see it tried to submit at least 6 jobs. The first 5 were submitted successfully (in either QUEUED or RUNNING state on my dashboard), but the 6th one failed with the same "job limit reached" error.

jyu00 commented 4 years ago

Having said that, I can create a patch so that if the job limit is reached, it'll wait for the earlier jobs to finish before submitting a new one, rather than failing the experiment.

rp87701n commented 4 years ago

thanks and understood. Not sure why it is submitting 6 jobs. can I run one job at a time? or is there a way that we can control no. of jobs [any parameter can control a number of jobs that users can run]. Say concurrent_job=1 then it should submit only one job. so that user can control job scheduling

jyu00 commented 4 years ago

Currently there is no option to specify the number of concurrent jobs, but I can add that in when I do the patch.

rp87701n commented 4 years ago

thanks that would help us. Do you know when this patch get released for testing.

jyu00 commented 4 years ago

@rp87701n I'm hoping to have it available sometime next week.

jyu00 commented 4 years ago

@fbm2718 Are you still having issues with ibmq_16_melbourne ? If so, can you post a test case?

fbm2718 commented 4 years ago

@jyu00 Hey, sorry for not reaching out earlier. I was kind of in a hurry and found an inelegant workaround - I simply used different account and using it I can send job requests to melbourne without any problems. (I also tried resetting token, this did not help)

I just ran the test case on the faulty account: ibm_test_case_fbm_0

Here I delete and enable account once again to make sure I am using proper, faulty account's token. Note that I send only single job.

This is what I get as the output:

`/home/fbm/anaconda3/envs/GWE/bin/python /home/fbm/0_Research/Projects/test_case_ibm/test_case_ibm.py
Traceback (most recent call last):
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/api/session.py", line 207, in request
    response.raise_for_status()
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py", line 172, in _submit_job
    job_tags=job_tags)
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/api/clients/account.py", line 200, in job_submit
    job_tags=job_tags)
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/api/clients/account.py", line 232, in _job_submit_post
    job_tags=job_tags)
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/api/rest/root.py", line 143, in job_submit
    return self.session.post(url, json=payload).json()
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/requests/sessions.py", line 578, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/api/session.py", line 226, in request
    raise RequestsApiError(message) from ex
qiskit.providers.ibmq.api.exceptions.RequestsApiError: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fbm/0_Research/Projects/test_case_ibm/test_case_ibm.py", line 25, in <module>
    qobj_id = 'test_case')
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/execute.py", line 245, in execute
    return backend.run(qobj, **run_config)
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py", line 132, in run
    return self._submit_job(qobj, job_name, api_job_share_level, job_tags)
  File "/home/fbm/anaconda3/envs/GWE/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py", line 174, in _submit_job
    raise IBMQBackendApiError('Error submitting job: {}'.format(str(ex)))
qiskit.providers.ibmq.exceptions.IBMQBackendApiError: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'"

Process finished with exit code 1

And here's a screenshot of my current dashboard: image

If I run the very same code but with a token from a different account, then it works fine.

Thanks a lot!

P.S.: I think that patch changing the behaviour under submitting more than the allowed number of jobs is good idea, so far I've been sending more jobs using a loop with check if qiskit still returns an error. ;-)

jyu00 commented 4 years ago

@fbm2718 Your old account should be fixed now if you want to use it. Let me know if you encounter this issue again.

fbm2718 commented 4 years ago

@jyu00 Okay, I've just tried it and it works on the old account. Thanks a lot! (out of curiosity - was that very complicated bug?)

rp87701n commented 4 years ago

I am trying to run the qsvm on simulator and it is taking lot of time and want to reduce training time. what are hyperparameter that i can use it . do you know where 1000 came from? can I control it?

here is the log

2020-04-15 21:55:43,636:qiskit.aqua.components.feature_maps.pauli_expansion:WARNING: Due to the limited entangler_map, ZIIZ is skipped. 2020-04-15 21:55:43,637:qiskit.aqua.components.feature_maps.pauli_expansion:WARNING: Due to the limited entangler_map, ZIZI is skipped. 2020-04-15 21:55:43,638:qiskit.aqua.components.feature_maps.pauli_expansion:INFO: Pauli terms include: ['IIIZ', 'IIZI', 'IZII', 'ZIII', 'IIZZ', 'IZZI', 'ZZII'] 2020-04-15 21:55:43,639:qiskit.aqua.quantum_instance:INFO: Qiskit Terra version: 0.12.0 Backend: 'qasm_simulator (AerProvider)', with following setting: {'basis_gates': ['u1', 'u2', 'u3', 'cx', 'cz', 'id', 'x', 'y', 'z', 'h', 's', 'sdg', 't', 'tdg', 'swap', 'ccx', 'unitary', 'initialize', 'cu1', 'cu2', 'cu3', 'cswap', 'mcx', 'mcy', 'mcz', 'mcu1', 'mcu2', 'mcu3', 'mcswap', 'multiplexer', 'kraus', 'roerror'], 'coupling_map': None} {'pass_manager': None, 'initial_layout': None, 'seed_transpiler': 10598, 'optimization_level': None} RunConfig(max_credits=10, seed_simulator=10598, shots=1024) {'timeout': None} {} {} Measurement mitigation: None 2020-04-15 21:56:38,442:qiskit.aqua.algorithms.many_sample.qsvm.qsvm:DEBUG: Calculating overlap: |██████████████████████████████████████████████████| 1000/1000 [00:00:00:00] 2020-04-15 21:58:39,465:qiskit.aqua.algorithms.many_sample.qsvm.qsvm:DEBUG: Calculating overlap: |██████████████████████████████████████████████████| 1000/1000 [00:00:00:00] 2020-04-15 22:00:38,331:qiskit.aqua.algorithms.many_sample.qsvm.qsvm:DEBUG: Calculating overlap: |--------------------------------------------------| 0/1000 []

jyu00 commented 4 years ago

@jyu00 Okay, I've just tried it and it works on the old account. Thanks a lot! (out of curiosity - was that very complicated bug?)

@fbm2718 I don't actually what the bug was. I contacted Quantum Experience support and they fixed it lol.

jyu00 commented 4 years ago

@rp87701n I don't know the answer to that. You'll likely get an answer faster if you ask on Slack or Stack Exchange.

rp87701n commented 4 years ago

ok, thanks, I will check in slack . can we get a patch released this week.

rp87701n commented 4 years ago

I tested code again today and getting the same error.

here is the error 👍 2020-04-23 01:44:22,235:qiskit.aqua.parser.json_schema:DEBUG: Input: { "depth": 2, "entanglement": "linear", "entangler_map": null } 2020-04-23 01:44:22,237:qiskit.aqua.parser.json_schema:DEBUG: Input Schema: { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "id": "Second_Order_Expansion_schema", "properties": { "depth": { "default": 2, "minimum": 1, "type": "integer" }, "entanglement": { "default": "full", "enum": [ "full", "linear" ], "type": "string" }, "entangler_map": { "default": null, "type": [ "array", "null" ] } }, "type": "object" } 2020-04-23 01:44:22,249:qiskit.aqua.parser.json_schema:DEBUG: Input: { "depth": 2, "entanglement": "linear", "entangler_map": null } 2020-04-23 01:44:22,251:qiskit.aqua.parser.json_schema:DEBUG: Input Schema: { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "id": "Second_Order_Expansion_schema", "properties": { "depth": { "default": 2, "minimum": 1, "type": "integer" }, "entanglement": { "default": "full", "enum": [ "full", "linear" ], "type": "string" }, "entangler_map": { "default": null, "type": [ "array", "null" ] } }, "type": "object" } 2020-04-23 01:44:22,253:qiskit.aqua.parser.json_schema:DEBUG: Input: { "depth": 2, "entanglement": "linear", "entangler_map": null } 2020-04-23 01:44:22,255:qiskit.aqua.parser.json_schema:DEBUG: Input Schema: { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "id": "Second_Order_Expansion_schema", "properties": { "depth": { "default": 2, "minimum": 1, "type": "integer" }, "entanglement": { "default": "full", "enum": [ "full", "linear" ], "type": "string" }, "entangler_map": { "default": null, "type": [ "array", "null" ] } }, "type": "object" } 2020-04-23 01:44:22,256:qiskit.aqua.components.feature_maps.pauli_expansion:WARNING: Due to the limited entangler_map, IZIZ is skipped. 2020-04-23 01:44:22,257:qiskit.aqua.components.feature_maps.pauli_expansion:WARNING: Due to the limited entangler_map, ZIIZ is skipped. 2020-04-23 01:44:22,258:qiskit.aqua.components.feature_maps.pauli_expansion:WARNING: Due to the limited entangler_map, ZIZI is skipped. 2020-04-23 01:44:22,259:qiskit.aqua.components.feature_maps.pauli_expansion:INFO: Pauli terms include: ['IIIZ', 'IIZI', 'IZII', 'ZIII', 'IIZZ', 'IZZI', 'ZZII'] 2020-04-23 01:44:22,261:qiskit.aqua.quantum_instance:INFO: Qiskit Terra version: 0.13.0 Backend: 'ibmq_16_melbourne (<AccountProvider for IBMQ(hub='ibm-q', group='open', project='main')>)', with following setting: {'basis_gates': ['id', 'u1', 'u2', 'u3', 'cx'], 'coupling_map': [[0, 1], [0, 14], [1, 0], [1, 2], [1, 13], [2, 1], [2, 3], [2, 12], [3, 2], [3, 4], [3, 11], [4, 3], [4, 5], [4, 10], [5, 4], [5, 6], [5, 9], [6, 5], [6, 8], [7, 8], [8, 6], [8, 7], [8, 9], [9, 5], [9, 8], [9, 10], [10, 4], [10, 9], [10, 11], [11, 3], [11, 10], [11, 12], [12, 2], [12, 11], [12, 13], [13, 1], [13, 12], [13, 14], [14, 0], [14, 13]]} {'pass_manager': None, 'initial_layout': None, 'seed_transpiler': 1024, 'optimization_level': None} RunConfig(max_credits=10, seed_simulator=1024, shots=1024) {'timeout': None, 'wait': 5} {} {} Measurement mitigation: None 2020-04-23 01:44:22,263:qiskit.aqua.components.multiclass_extensions.all_pairs:INFO: Require 45.0 estimators. /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:258: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. state_registers = QuantumRegister(pauli_list[0][1].numberofqubits) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/operators/common.py:273: DeprecationWarning: The Pauli.numberofqubits method is deprecated as of 0.13.0, and will be removed no earlier than 3 months after that release date. You should use the Pauli.num_qubits method instead. n_qubits = pauli[1].numberofqubits

HTTPError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/api/session.py in request(self, method, url, bare, kwargs) 229 response = super().request(method, final_url, kwargs) --> 230 response.raise_for_status() 231 except RequestException as ex:

/opt/conda/lib/python3.7/site-packages/requests/models.py in raise_for_status(self) 940 if http_error_msg: --> 941 raise HTTPError(http_error_msg, response=self) 942

HTTPError: 400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs

The above exception was the direct cause of the following exception:

RequestsApiError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py in _submit_job(self, qobj, job_name, job_share_level, job_tags) 213 job_share_level=job_share_level, --> 214 job_tags=job_tags) 215 except ApiError as ex:

/opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/api/clients/account.py in job_submit(self, backend_name, qobj_dict, job_name, job_share_level, job_tags) 181 job_share_level=_job_share_level, --> 182 job_tags=job_tags) 183

/opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/api/rest/root.py in create_remote_job(self, backend_name, job_name, job_share_level, job_tags) 155 --> 156 return self.session.post(url, json=payload).json() 157

/opt/conda/lib/python3.7/site-packages/requests/sessions.py in post(self, url, data, json, kwargs) 577 --> 578 return self.request('POST', url, data=data, json=json, kwargs) 579

/opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/api/session.py in request(self, method, url, bare, **kwargs) 248 --> 249 raise RequestsApiError(message) from ex 250

RequestsApiError: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'

The above exception was the direct cause of the following exception:

IBMQBackendApiError Traceback (most recent call last)

in 10 svm = QSVM(feature_map, training_input, test_input, total_array,multiclass_extension=extension) 11 quantum_instance = QuantumInstance(backend, shots=1024, seed_simulator=aqua_globals.random_seed, seed_transpiler=aqua_globals.random_seed, circuit_caching=False,wait=5, skip_qobj_validation=False,job_callback=job_callback) ---> 12 result = svm.run(quantum_instance,timeout=1200) 13 for k,v in result.items(): 14 print("'{}' : {}".format(k, v)) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/quantum_algorithm.py in run(self, quantum_instance, **kwargs) 65 quantum_instance.set_config(**kwargs) 66 self._quantum_instance = quantum_instance ---> 67 return self._run() 68 69 @abstractmethod /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/qsvm.py in _run(self) 435 436 def _run(self): --> 437 return self.instance.run() 438 439 @property /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_multiclass.py in run(self) 60 put the train, test, predict together 61 """ ---> 62 self.train(self._qalgo.training_dataset[0], self._qalgo.training_dataset[1]) 63 if self._qalgo.test_dataset is not None: 64 self.test(self._qalgo.test_dataset[0], self._qalgo.test_dataset[1]) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_multiclass.py in train(self, data, labels) 41 def train(self, data, labels): 42 """ train """ ---> 43 self.multiclass_classifier.train(data, labels) 44 45 def test(self, data, labels): /opt/conda/lib/python3.7/site-packages/qiskit/aqua/components/multiclass_extensions/all_pairs.py in train(self, x, y) 79 y_filtered[y_filtered == i] = 0 80 y_filtered[y_filtered == j] = 1 ---> 81 estimator.fit(x_filtered, y_filtered) 82 estimators_from_i[j] = estimator 83 self.estimators[i] = estimators_from_i /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_estimator.py in fit(self, x, y) 37 y (numpy.ndarray): input labels, Nx1 array 38 """ ---> 39 self._qsvm_binary.train(x, y) 40 self._ret = self._qsvm_binary._ret 41 /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/_qsvm_binary.py in train(self, data, labels) 78 """ 79 scaling = 1.0 if self._qalgo.quantum_instance.is_statevector else None ---> 80 kernel_matrix = self._qalgo.construct_kernel_matrix(data) 81 labels = labels * 2 - 1 # map label from 0 --> -1 and 1 --> 1 82 labels = labels.astype(np.float) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/qsvm.py in construct_kernel_matrix(self, x1_vec, x2_vec, quantum_instance) 369 raise AquaError("Either setup quantum instance or provide it in the parameter.") 370 --> 371 return QSVM.get_kernel_matrix(self._quantum_instance, self.feature_map, x1_vec, x2_vec) 372 373 def train(self, data, labels, quantum_instance=None): /opt/conda/lib/python3.7/site-packages/qiskit/aqua/algorithms/many_sample/qsvm/qsvm.py in get_kernel_matrix(quantum_instance, feature_map, x1_vec, x2_vec) 322 323 results = quantum_instance.execute(circuits, --> 324 had_transpiled=use_parameterized_circuits) 325 326 if logger.isEnabledFor(logging.DEBUG): /opt/conda/lib/python3.7/site-packages/qiskit/aqua/quantum_instance.py in execute(self, circuits, had_transpiled) 379 result = run_qobj(qobj, self._backend, self._qjob_config, 380 self._backend_options, self._noise_config, --> 381 self._skip_qobj_validation, self._job_callback) 382 383 if self._circuit_summary: /opt/conda/lib/python3.7/site-packages/qiskit/aqua/utils/run_circuits.py in run_qobj(qobj, backend, qjob_config, backend_options, noise_config, skip_qobj_validation, job_callback) 220 for qob in qobjs: 221 job, job_id = _safe_submit_qobj(qob, backend, --> 222 backend_options, noise_config, skip_qobj_validation) 223 job_ids.append(job_id) 224 jobs.append(job) /opt/conda/lib/python3.7/site-packages/qiskit/aqua/utils/run_circuits.py in _safe_submit_qobj(qobj, backend, backend_options, noise_config, skip_qobj_validation) 137 job = run_on_backend(backend, qobj, backend_options=backend_options, 138 noise_config=noise_config, --> 139 skip_qobj_validation=skip_qobj_validation) 140 try: 141 job_id = job.job_id() /opt/conda/lib/python3.7/site-packages/qiskit/aqua/utils/run_circuits.py in run_on_backend(backend, qobj, backend_options, noise_config, skip_qobj_validation) 323 return job 324 else: --> 325 job = backend.run(qobj, **backend_options, **noise_config) 326 return job /opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py in run(self, qobj, job_name, job_share_level, job_tags, validate_qobj) 171 if validate_qobj: 172 validate_qobj_against_schema(qobj) --> 173 return self._submit_job(qobj, job_name, api_job_share_level, job_tags) 174 175 def _submit_job( /opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqbackend.py in _submit_job(self, qobj, job_name, job_share_level, job_tags) 214 job_tags=job_tags) 215 except ApiError as ex: --> 216 raise IBMQBackendApiError('Error submitting job: {}'.format(str(ex))) from ex 217 218 # Error in the job after submission: IBMQBackendApiError: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'"
rp87701n commented 4 years ago
Qiskit Software Version
Qiskit 0.18.1
Terra 0.13.0
Aer 0.5.0
Ignis 0.3.0
Aqua 0.6.6
IBM Q Provider 0.6.0

Python | 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) [GCC 7.3.0] OS | Linux CPUs | 8 Memory (Gb) | 31.420135498046875 Thu Apr 23 01:41:34 2020 UTC

rp87701n commented 4 years ago

i upgraded both qiskit and Terra version

woodsp-ibm commented 4 years ago

Hi, the fix has taken place in the master branch of the repository here and is not yet included in an official release. The plan is for a release very shortly - until then, to try it, you would have to clone the repositories here - aqua, terra etc and install from the source files. Here is a link that describes this if you are interested https://qiskit.org/documentation/contributing_to_qiskit.html#installing-from-source

rp87701n commented 4 years ago

thanks for the update. I upgraded the new packages. it seems my old code is not working. i guess something changed with this version as well.

Trying to run the same code that was worked earlier but not it is not working.

aqua_globals.random_seed = 1024 feature_map = SecondOrderExpansion(feature_dimension=get_feature_dimension(training_input), depth=2, entanglement='linear') extensions = [ OneAgainstRest(_QSVM_Estimator, [feature_map])] # this line throwing error do i need to create MulticlassExtension(_QSVM_Estimator) like this. is there any code snipet for this new changes.

for extension in extensions: svm = QSVM(feature_map, training_input, test_input, total_array,multiclass_extension=extension) quantum_instance = QuantumInstance(backend, shots=1024, seed_simulator=aqua_globals.random_seed, seed_transpiler=aqua_globals.random_seed, circuit_caching=False, skip_qobj_validation=False,job_callback=job_callback) result = svm.run(quantum_instance) for k,v in result.items(): print("'{}' : {}".format(k, v))


TypeError Traceback (most recent call last)

in 6 feature_map = SecondOrderExpansion(feature_dimension=get_feature_dimension(training_input), 7 depth=2, entanglement='linear') ----> 8 extensions = [ OneAgainstRest(_QSVM_Estimator, [feature_map])] 9 10 for extension in extensions: TypeError: __init__() takes 1 positional argument but 3 were given
woodsp-ibm commented 4 years ago

Hi, you can take a look at this test case https://github.com/Qiskit/qiskit-aqua/blob/master/test/aqua/test_qsvm.py which shows what I think you need

rp87701n commented 4 years ago

thanks . I can see the applied change working now. but after 30 to 45 mins later getting a qiskit.providers.ibmq.job.exceptions.IBMQJobTimeoutError: 'Timeout while waiting for job 5ea667291070d7001959644a.' error.

  1. here is fix for the earlier issues which is worked. 2020-04-27 05:34:02,449:qiskit.aqua.components.multiclass_extensions.all_pairs:INFO: Require 45.0 estimators. 2020-04-27 05:34:14,523:qiskit.aqua.utils.run_circuits:WARNING: FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'" 2020-04-27 05:34:14,890:qiskit.aqua.utils.run_circuits:WARNING: Job limit reached, waiting for job 5ea66ed0a100c50018f77078 to finish before submitting the next one. ^CTraceback (most recent call last): File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/providers/ibmq/api/session.py", line 250, in request response.raise_for_status() File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs

  2. later we are getting this error

Z', 'COMPLETED': '2020-04-27T05:00:07.850Z'}, _use_object_storage=True, allow_object_storage=True, cost=54.816, end_date='2020-04-27T05:00:07.608Z', hub_info={'hub': {'name': 'ibm-q'}, 'group': {'name': 'open'}, 'project': {'name': 'main'}}, ip={'ip': '3.86.182.117', 'city': 'Ashburn', 'country': 'United States', 'continent': 'North America'}, kind=<ApiJobKind.QOBJECT_STORAGE: 'q-object-external-storage'>, object_storage_info={}, properties={}, share_level='none', summary_data={'size': {'input': 63278, 'output': 14431}, 'summary': {'qobj_config': {'memory': False, 'max_credits': 10, 'type': 'QASM', 'n_qubits': 15, 'memory_slots': 2, 'shots': 1024}, 'gates_executed': 780, 'max_qubits_used': 15, 'partial_validation': False, 'num_circuits': 30}, 'success': True, 'resultTime': 26.082602901849896}, user_id='5e3b8d5eeb8baa00192a6b7c') 2020-04-27 05:01:37,600:qiskit.aqua.utils.run_circuits:WARNING: FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'" 2020-04-27 05:01:37,803:qiskit.aqua.utils.run_circuits:WARNING: Job limit reached, waiting for job 5ea667291070d7001959644a to finish before submitting the next one. Traceback (most recent call last): File "proj.py", line 102, in runcode() File "proj.py", line 95, in runcode result = svm.run(quantum_instance) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/quantum_algorithm.py", line 70, in run return self._run() File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/qsvm.py", line 447, in _run return self.instance.run() File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_multiclass.py", line 62, in run self.train(self._qalgo.training_dataset[0], self._qalgo.training_dataset[1]) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_multiclass.py", line 43, in train self.multiclass_classifier.train(data, labels) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/components/multiclass_extensions/all_pairs.py", line 74, in train estimator.fit(x_filtered, y_filtered) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_estimator.py", line 39, in fit self._qsvm_binary.train(x, y) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_binary.py", line 80, in train kernel_matrix = self._qalgo.construct_kernel_matrix(data) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/qsvm.py", line 381, in construct_kernel_matrix return QSVM.get_kernel_matrix(self._quantum_instance, self.feature_map, x1_vec, x2_vec) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/qsvm.py", line 334, in get_kernel_matrix had_transpiled=use_parameterized_circuits) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/quantum_instance.py", line 370, in execute self._skip_qobj_validation, self._job_callback) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/utils/run_circuits.py", line 233, in run_qobj backend_options, noise_config, skip_qobj_validation) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/utils/run_circuits.py", line 156, in _safe_submit_qobj oldest_running.wait_for_final_state(timeout=300) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/providers/ibmq/job/ibmqjob.py", line 583, in wait_for_final_state self._wait_for_completion(timeout=timeout, status_queue=status_queue) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/providers/ibmq/job/ibmqjob.py", line 623, in _wait_for_completion 'Timeout while waiting for job {}.'.format(self._job_id)) from None qiskit.providers.ibmq.job.exceptions.IBMQJobTimeoutError: 'Timeout while waiting for job 5ea667291070d7001959644a.'

rp87701n commented 4 years ago

here is the stack trace for this issue.

2020-04-27 06:10:11,548:qiskit.aqua.utils.run_circuits:WARNING: Job limit reached, waiting for job 5ea6773b473d6b0018016e0b to finish before submitting the next one. 2020-04-27 06:14:06,499:qiskit.aqua.utils.run_circuits:WARNING: FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'" 2020-04-27 06:14:07,206:qiskit.aqua.utils.run_circuits:WARNING: Job limit reached, waiting for job 5ea6773d1070d7001959650f to finish before submitting the next one. 2020-04-27 06:16:12,185:qiskit.aqua.utils.run_circuits:WARNING: FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'" 2020-04-27 06:16:12,589:qiskit.aqua.utils.run_circuits:WARNING: Job limit reached, waiting for job 5ea6773fbf76d30018086f15 to finish before submitting the next one. 2020-04-27 06:17:27,586:qiskit.aqua.utils.run_circuits:WARNING: FAILURE: Can not get job id, Resubmit the qobj to get job id. Terra job error: "Error submitting job: '400 Client Error: Bad Request for url: https://api.quantum-computing.ibm.com/api/Network/ibm-q/Groups/open/Projects/main/Jobs. Reached maximum number (5) of concurrent jobs, Error code: 3458.'" 2020-04-27 06:17:27,972:qiskit.aqua.utils.run_circuits:WARNING: Job limit reached, waiting for job 5ea6782c1070d7001959651b to finish before submitting the next one.

Traceback (most recent call last): File "proj.py", line 102, in runcode() File "proj.py", line 95, in runcode result = svm.run(quantum_instance) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/quantum_algorithm.py", line 70, in run return self._run() File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/qsvm.py", line 447, in _run return self.instance.run() File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_multiclass.py", line 62, in run self.train(self._qalgo.training_dataset[0], self._qalgo.training_dataset[1]) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_multiclass.py", line 43, in train self.multiclass_classifier.train(data, labels) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/components/multiclass_extensions/all_pairs.py", line 74, in train estimator.fit(x_filtered, y_filtered) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_estimator.py", line 39, in fit self._qsvm_binary.train(x, y) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_binary.py", line 80, in train kernel_matrix = self._qalgo.construct_kernel_matrix(data) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/qsvm.py", line 381, in construct_kernel_matrix return QSVM.get_kernel_matrix(self._quantum_instance, self.feature_map, x1_vec, x2_vec) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/algorithms/classifiers/qsvm/qsvm.py", line 334, in get_kernel_matrix had_transpiled=use_parameterized_circuits) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/quantum_instance.py", line 370, in execute self._skip_qobj_validation, self._job_callback) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/utils/run_circuits.py", line 233, in run_qobj backend_options, noise_config, skip_qobj_validation) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/aqua/utils/run_circuits.py", line 156, in _safe_submit_qobj oldest_running.wait_for_final_state(timeout=300) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/providers/ibmq/job/ibmqjob.py", line 583, in wait_for_final_state self._wait_for_completion(timeout=timeout, status_queue=status_queue) File "/app/anaconda3/envs/QiskitDevenv/lib/python3.6/site-packages/qiskit/providers/ibmq/job/ibmqjob.py", line 623, in _wait_for_completion 'Timeout while waiting for job {}.'.format(self._job_id)) from None qiskit.providers.ibmq.job.exceptions.IBMQJobTimeoutError: 'Timeout while waiting for job 5ea6782c1070d7001959651b.