New answers tagged

0

In order to fully recover your Job object from IBMQ, you need two things: the backend name the job id Once you sent your job, you can save those like this: job_id = job.job_id() backend_name = job.backend().name() Later, when the job is done, you can recover the Job object like this: provider = IBMQ.load_account() job = provider.get_backend(backend_name)....


1

I take it you're running the jobs on an IBMQ backend and not one of the local simulators. If so, just keep track of job_id, then use the retrieve_job function to retrieve the job at a later point in time and get its result.


2

Sometime that happens. The controlled electronic might got a reboot during while your jobs were in queue or something of that sort... You can try to cancel your jobs and resubmitted them to see if that fixes it. Note that if you running jobs through Aqua, like performing QAOA or VQE, you can cancel the current jobs and they will create a replacement job ...


1

To add on to the previous answer, if you want to see the progress of your job in real time, you can try the following: from qiskit.tools.monitor import job_monitor job_monitor(job) job_monitor shows you ever step, including job initialization, validation, being queued, to running and completion.


1

Try this: provider = IBMQ.get_provider(hub='YOUR-HUB-NAME', group='YOUR-GROUP-NAME', project='YOUR-PROJECT_NAME') backend = provider.get_backend('ibmq_**your_device**') for gate_i in hardware_backend.properties().gates: print("{} gate on qubits {} error rate is {}{}".format(gate_i.name, gate_i.qubits, gate_i.parameters[0].value, gate_i....


0

With a higher Quantum Volume, your circuits will run faster, partly because a backend with a higher quantum volume can run complex circuits with a greater width and depth than backends with lower quantum volume. However, the number of qubits on a backend does not affect the speed of a circuit, because each logical qubit in your circuit is mapped to one ...


1

You can type the following: provider = IBMQ.get_provider(hub='YOUR-HUB-NAME', group='YOUR-GROUP-NAME', project='YOUR-PROJECT_NAME') provider.backends.backend You should see an interactive widget with 5 tabs. Under the Multi-Qubit Gates tab, you can see the CNOT error rate between any two connected qubits on that given backend. If you don't see the widget, ...


2

There isn't any specific method to optimise HHL other than using the PassManager from Qiskit, but this is a more general circuit optimisation. With the newest devices it might be possible to run larger circuits due to the reduced error, otherwise you will have to manually find circuit reductions. In the last page of https://arxiv.org/abs/2009.04484 you can ...


0

IBMQJobManager finds the jobs in a set by their tags and names. So yes, if you re-submit the same job with the same tags/job name, it'll be picked up by the job manager. Something like failed_job = backend.retrieve_job(FAILED_JOB_ID) qobj = failed_job.qobj() backend.run(qobj, job_name=failed_job.name(), job_tags=failed_job.tags()) jm = IBMQJobManager() ...


1

Qiskit 0.21 has qiskit-ibmq-provider 0.9. This new provider comes with a connector to the RNG service in IBMQ. From the release notes: You can now access the IBMQ random number services, such as the CQC randomness extractor, using the new package qiskit.providers.ibmq.random. Note that this feature is still in beta, and not all accounts have access to it. ...


1

Here is a code that will generate random bitstring. Althoug in the code, I have used qasm_simulator, it can be replaced with any available quantum hardware from IBM. from qiskit import * def random_bitstring_generator(bit_number, backend): """ Generate a bitstring with one qubit :param bit_number: number of bits that we want to ...


2

You can't. The quantum volume is supposed to be an average measure of the quality of the quantum computer - it doesn't tell you anything on how good it will perform on solving a certain problem. (It is even questionable whether it is telling you anything meaningful, see also Is the "Quantum Volume" a fair metric for future, elaborate, high value ...


1

I suppose you want to generate uniformly distributed sequence of bits. In such case you can apply a Hadamard gates on $n$ qubits, where $n$ is number of bits you want to have in your sequence. Application of Hadamard gates on $n$ qubits in state $|0\rangle$ will lead to state $$ H^{\otimes n}|0\rangle ^{\otimes n} = \frac{1}{\sqrt{2^n}}\sum_{i=0}^{2^n-1}|i\...


2

Thank you for your report. I investigated the details and fixed the bug with this pull request.


1

Qiskit 0.21 has qiskit-ibmq-provider 0.9. This new provider comes with a connector to the RNG service in IBMQ. From the release notes: You can now access the IBMQ random number services, such as the CQC randomness extractor, using the new package qiskit.providers.ibmq.random. Note that this feature is still in beta, and not all accounts have access to it. ...


1

The function execute is non-blocking. That means that it will return after sending the job, but not necessarily with the result. In your code, you should wait for the status of the job to be DONE: print('About to run job') job = execute(circuit, backend) job.status() JobStatus.QUEUED After waiting some time: job.status() JobStatus.DONE Then, job....


2

A simulator executes just an algorithm on a classical hardware as Martin said. On a real quantum hardware, your circuit is calibrated before actually being executed. In addition, there are other tasks like loading pulses into waveform generator, qubits relaxation...which take time and explain the difference.


2

Transpiling time is the time it takes for your circuit to be translated into a circuit that can be run on the backend of your choosing. This process includes converting gates into the standard basis gates ['cx', 'u1', 'u2', 'u3', 'id'], optimizing the circuit so it is shorter, mapping virtual qubits in the circuit to physical qubits, etc. Converting gates ...


1

Transpilation (in this context) is backend-specific. Longer transpiling time just means the software took longer to make your circuits compatible and more optimized for the backend you selected (e.g. because your circuits require a lot of remapping). In general, transpiling time is important to those who do research on that topic. Much like classical ...


1

When you perform one shot, the measurement at the end of the computation gives you one of the possible results. More shots produce a distribution. In your simple example, you should get a uniform distribution over 00, 01, 10 and 11. You should notice that, with more shots, the distribution you get is more similar to the uniform one.


2

If you have more circuits than what the backend allows, consider using IBMQJobManager, which will divide the circuits and collect results for you.


2

Checkout the backend max_experiments property. The amount of circuits in a job ( len(all_qc)) should be smaller than that. For example, in ibmq_16_melbourne: from qiskit import IBMQ IBMQ.load_account() provider = IBMQ.get_provider(hub='ibm-q') device = provider.get_backend('ibmq_16_melbourne') device.configuration().max_experiments 75


3

Reading out all the probabilities for all the possible output bit strings isn't common in quantum computing. The ideal case is to induce an interference effect that will allow your result to be read out with just one shot. Though that isn't something most algorithms achieve, they nevertheless use only $O(1)$ shots, or some other complexity that is far less ...


2

This is not exactly a problem. When Qiskit finishes downloading a job result, it sends an acknowledgement to the server, so the server can do some cleanup. This warning (not error) message just says that the acknowledgement failed, which is usually due to temporary networking issues. This failed acknowledgement has no impact to you, as the result has already ...


3

Looks like backend = provider.backends(name='ibmq_ourense') returns a list of backends whose name is ibmq_oursense (a list whose length is obviously 1). Try backend = provider.backends(name='ibmq_ourense')[0].


1

It is not possible to compare the statevector of a circuit run on the statevector_simulator and on a real device, like IBMQ Santiago, because the result of a job run on hardware is in the form of counts. You can see this by running the following command in qiskit: job.result().data(circuit) for a specific circuit and job run on a real IBMQ device. The ...


1

You need to import QuantumCircuit from qiskit: from qiskit import QuantumCircuit I imagine you will probably also need to do: from qiskit import execute And you can combine your three imports neatly into one line like so: from qiskit import Aer, QuantumCircuit, execute


2

You can use so-called Quantum Lab in IBM Q Experience web interface. Log into your account on IBM Q and click on this icon: After that, click on New notebook button and here you can write your code in Qiskit and run it. The Quantum Lab is based on Jupyter notebooks and interactive Python. Also, you can use the Qiskit tutorial which is a part of the ...


0

With the help of documentation from this URL https://github.com/Qiskit/qiskit-ibmq-provider, I realized that I need to run load_account() of my APIToken and store the provider object as shown below my_provider = IBMQ.load_account() print(my_provider.backends()) backend = my_provider.get_backend('ibmq_qasm_simulator')


0

While it's not always helpful, you can find solutions for most error codes here: https://quantum-computing.ibm.com/docs/manage/errors In your case since you're running with Qiskit Aqua, it automatically re-submitted the job, as indicated by FAILURE: Can not get job id, Resubmit the qobj to get job id. So your VQE calculation should resume once the new job ...


Top 50 recent answers are included