Questions tagged [programming]

For questions about writing code to be executed on a quantum computer, or to more generally simulate some aspect of it. For questions about a specific programming language, please also include a more specific tag.

Filter by
Sorted by
Tagged with
2
votes
1answer
55 views

How can I print out the probability of a certain state in histogram?

This is a simulation I did in my program. I'm hoping to print out the probability of the state $|0001\rangle$ (which is $0.052$), and store this number in a letter (a). How can I do this? Thanks!!
2
votes
1answer
253 views

What is the difference between Qiskit execute and the IBMQJobManager?

I was researching how to submit multiple pulse schedules/circuits in the same job and came across 2 methods: Executing Experiments with qiskit.execute and ...
1
vote
1answer
64 views

Expectation value of an arbitrary observable. My own definition and `cirq` limitations

In my previous question I was struggling with the definition of expectation value of an observable for a circuit. Here is what I have derived after some support (I simplify the definition to 2-qubit ...
1
vote
1answer
52 views

Qiskit IBMQ.load_account fails on version 0.20.0

So when trying to load my account I get this error: ...
1
vote
1answer
47 views

In the job tab, no histogram appears

(Newbie here) Accessing IBM Q Experience on a Windows 7 operating system and using the Google Chorme browser. I can completely assemble my circuit, using the IBM Quantum Composer and when executing it ...
1
vote
2answers
178 views

How can the state $\lvert0\rangle+M^{-1/2}\sum_{j=1}^M\lvert j\rangle$ be generated?

I was wondering if anybody to help me to generate the following state. It would be preferable if you use only Hadamard, CNOT and T-gates, on $\lceil\log_2(M+1)\rceil$ qubits: $$|\psi\rangle = \frac{1}{...
1
vote
1answer
564 views

Module BasicAer not found

After installing qiskit-terra via git (pip install qiskit), all python programs involving the line ...
1
vote
0answers
76 views

Regarding quantum support vector machine using qiskit [duplicate]

I would like to ask, how can I add my own .csv data file to run a quantum support vector machine using qiskit ? I don't want to use already existing datasets in sklearn, scikit-learn library.
1
vote
3answers
333 views

How can I obtain transformation matrix of a quantum circuit in the Qiskit?

I need to draw a quantum circuit in Clifford+T library and obtain automatically its transformation matrix. Is there any feature on Qiskit in this case?
1
vote
1answer
44 views

Composing teleportation circuit in Qiskit Circuit Composer

I'm trying to create the teleportation circuit in IBM Qiskit Circuit Composer. ...
1
vote
2answers
29 views

Why did “job_manager” submit the same job twice and how to fix it?

In order to avoid the problem posted in Why "job_manager" did not submit some of the jobs?, (the current issue is related but quite different, so I think it is more appropriate to ask ...
0
votes
1answer
24 views

Multiple Bipartite Entangled State in Cirq

I am trying to create this state: rho = = q . rho_{1,2} + r . rho_{2,3} + s . rho{1,3} + (1-q-r-s) . rho_separable And I wrote this code: ...
0
votes
1answer
94 views

Qiskit HHL algorithm BrokenProcessPool error

I try to run HHL algorithm on qasm_simulator. I took the example from here. I try to solve 8x8 random matrix and adjust some parameters in create_eigs. ...
0
votes
1answer
45 views

Best way to compute $\langle a|B|a \rangle$ in Cirq, where a is a state obtained running circuit A. And B is a different Quantum Circuit

I am implementing RQAOA in Cirq. After running regular QAOA to find an optimal state a (This I have done successfully). I need to calculate $\langle a|Z_iZ_j|a\...
0
votes
1answer
92 views

Qiskit get qubits from statevector

How do I get the amplitude of each qubit, like plot_bloch_multivector(), but not output the tensor product of all qubits. In this case I need output ...
0
votes
1answer
117 views

Producing $|ghz\rangle\langle ghz|$ State in Cirq

I could manage to produce 3 qubit ghz state in Cirq. But I don't know how I can produce $|GHZ\rangle\langle GHZ|$ in Cirq Here is my code for 3 qubit ghz state Can you help me please for improving my ...
0
votes
1answer
658 views

Updating qiskit doesn't update qiskit version from Spyder

I installed qiskit using directions at https://qiskit.org/documentation/install.html I also have ...
0
votes
1answer
79 views

A problem with application of multi controlled rotation gates [closed]

This message pops up when I run an mcrx gate The mcrx gate needs a single qubit as target. Here is a part of code I run: ...
0
votes
1answer
80 views

How to get running time for each circuit executed on IBM's quantum processors in one round?

I want to execute multiple circuits in one round on IBM's backends, especially the 16-qubit one, to save time. For instance, ...
0
votes
2answers
190 views

Suppress deprecation warnings from Qiskit

I am running a standard VQE from the example shown in here https://qiskit.org/textbook/ch-applications/vqe-molecules.html, however I keep getting this output constantly (as many times the vqe runs ...
0
votes
2answers
522 views

'IBMQFactory' object has no attribute 'load_accounts'

I am following this qiskit workshop from https://colab.research.google.com/github/mtreinish/qiskit-workshop/blob/master/Workshop.ipynb . After adding my API key I had encountered the error ...
0
votes
3answers
89 views

Suppress Warnings

I wish to know how to suppress the following warning obtained on qiskit when I try to add two different types of noise to a qubit ...
-1
votes
2answers
152 views

How do you pass input to a circuit? [closed]

I've implemented Grover's search algorithm in qiskit, and I'd like to pass in an input to run through the circuit. How is that done?

1 2
3