Questions tagged [qiskit]

Quantum Software Development Kit for writing quantum computing experiments, programs, and applications. If appropriate, also use the [programming] tag.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

QISKit not installing in PyCharm

I am attempting to setup a PyCharm project to study and work through the QISKit textbook. However I seem to be running into a propblem seting it up. I have setup a python enviroment via anaconda (...
2
votes
1answer
31 views

Is it better to initialize quantum circuits in Qiskit by passing QuantumRegister and ClassicalRegister objects?

From the perspective of building quantum computation software based on Qiskit, which approach to defining quantum circuits is more robust? ...
0
votes
0answers
17 views

Symmetric Universal Quantum Cloning Machine (UQCM) N --> M for unknown states

Does it exist a schematic diagram of the quantum circuit implementing the symmetric UQCM N--> M for unknown states? If yes, does anyone know a Qiskit implementation of it?
3
votes
1answer
128 views

How can we construct a control-control y-rotation (CCRy) gate in Qiskit?

Qiskit has a CRy gate, however I couldn't find a CCRy (double control Ry) gate implementation. How can we construct the CCRy circuit given below in Qiskit without any ancillary qubits? Edit: A quick ...
1
vote
0answers
26 views

Qiskit: is there a quick way to work out the spherical coordinates for a given qubit statevector?

I am trying to calculate the spherical coordinates of different qubit states (i.e. working out $\theta$ and $\phi$ from: $|\psi\rangle = e^{-i\phi/2}\cos(\theta/2)|0\rangle + e^{i\phi/2}\sin(\theta/2)|...
2
votes
1answer
37 views

Qiskit: how can you use a different state for each shot in a quantum circuit? [duplicate]

I am trying to run a quantum circuit many times, each time using a different random state - a single qubit i.e. $|\psi\rangle= a|0\rangle + b|1\rangle$ with different $a$ and $b$. Once each qubit has ...
0
votes
2answers
40 views

Phase Kickback - factoring Dirac representation

In section 2.3 of the Qiskit textbook (Phase Kickback), there's an example where a controlled-T gate is applied to $|1+\rangle$. You're asked to attempt the same thing with $|0+\rangle$. I've done ...
1
vote
2answers
35 views

Multiple Providers on IBMQ

I am attempting to run parallel computations on two different backends from within the same Jupyter notebook, though it appears these two jobs are running sequentially. I understand the jobs will be ...
1
vote
1answer
25 views

In VQE, what ansatz would be best used for a maximally entangled $n$-qubit $H$?

What ansatz would be best used for a maximally entangled n qubit H? I came across this question in the Qiskit textbook and I really don't know how I would answer it.
2
votes
1answer
69 views

How to implement the swap test with the help of qiskit?

It's creating a real confusion for me especially the parameterized circuit which I have to create. Can anybody please solve this for me? I want to create this circuit.
1
vote
1answer
55 views

What is a good program to practice using a quantum algorithm? Should I use Cirq or Qiskit?

I am starting to learn about Quantum Computers and Quantum Algorithms. I also started reading about Qiskit and Cirq. I really like learning about them and hopefully I can be a Software Engineer with ...
2
votes
2answers
42 views

How to implement $\sqrt{iSWAP}$ in Qiskit

I want to implement the $\sqrt{iSWAP}$ operator using simple operations in Qiskit such as it is done for the $iSWAP$ here or $\sqrt{SWAP}$ gate here. How can I do this? If possible I would like to ...
0
votes
0answers
11 views

unable to install qiskit-aqua[cvx]…While installing, i am getting the below error. If anyone can suggest

I am unable to install qiskit-aqua[cvx]...While installing, i am getting the below error. If anyone can suggest. I have pasted the error snapshot below
0
votes
1answer
32 views

Qiskit textbook - exercise 2.2 - why doesn't the correct answer give the same statevector?

In the Qiskit textbook, I'm stuck on one of the exercises in section 2.2. The question is: Write the state: as two separate qubits. The answer has already been covered in this question here, and is ...
-2
votes
1answer
34 views

IBMQ.load_account() fails with “403 Client Error” [closed]

I alredy save an account but when I want to laod it I get a error like this how can I fix it ? ...
2
votes
1answer
35 views

How does MCPhaseGate/MCU1Gate works internally in qiskit?

I was curious about the implementation of MCPhase/MCU1Gate and how it works without ancilla qubits. I ended up checking the code of the some auxiliary (?) function ...
3
votes
2answers
45 views

From QUBO matrix to Ising model in Qiskit

Given a general QUBO matrix $Q$ for a quadratic minimization problem, is there a Qiskit way to obtain the Pauli gate list or the Ising model for it? A related question is Qiskit: Taking a QUBO matrix ...
1
vote
1answer
33 views

IBM Qiskit QAOA gate implementation question

In section $5.2$ of the QAOA chapter in Qiskit textbook, section $5.2$, state preparation uses the gate $U_{k,l}(\gamma) = e^{\frac{i \gamma}{2} (1-Z_k Z_l)}$. Later, in section $5.3$, this gate is ...
2
votes
1answer
50 views

How can I compose a list of quantum circuits onto different qubits in one command?

This is a follow-up question on composing the quantum circuits. Say if I have the following circuit element: ...
0
votes
1answer
44 views

Can I keep composing a series of quantum circuits into a large quantum circuit?

Suppose I have a series of quantum circuits, each of them has 2 qubits: ...
2
votes
2answers
78 views

How can I convert exponentials of pauli matrices to circuits of this form in Qiskit?

For example the following circuit is for $e^{-i(Z\otimes Z\otimes Z)\Delta t} $ I know this can even be done without the ancilla qubit, having the CNOTs control the last qubit and applying an RZ on ...
2
votes
1answer
46 views

Vertex Cover mappings from QUBO to Ising and vice versa

According to paper Ising formulations of many NP problems, Vertex Cover problem has the following Ising formulation: $$\underset{x}{\text{min }} f(x) = a\sum_{(i,j) \in E}(1-x_i)(1-x_j) + b\sum_{i \in ...
1
vote
0answers
37 views

Will there be any difference in solution for a weighted and unweighted graph? I mean is there any relation between weight and solution?

I was working on max-cut problem. To do I have been given a graph of unweighted version, and I have to convert it into weighted version. I did it using qiskit. Now I was playing around the code, hence ...
2
votes
2answers
96 views

Qiskit: Taking a QUBO matrix into `qubit_op'

I'm trying to solve the maximum independent set problem using Qiskit and the QAOA. I've a nice QUBO Matrix for this simple path graph: as so: My question is, how do I convert this into a general ...
0
votes
0answers
23 views

How to implement Majority Vote

I am trying to boost the success propability of standart phase estimation by repeating the procedure enought times and taking a majority vote that will be encoded in a quantum register. My problem is ...
1
vote
0answers
34 views

How can I create an ADD gate for two quantum states?

I want create an ADD gate like this: in qiskit using elementary gates. Can it be done? How can I proceed?
1
vote
0answers
41 views

Transpiler fails after 1000 iterations

I'm transpiling a set of quantum circuits using ibmq_5_yorktown. However, as the number of circuits gets larger, it shows me the following error message: ...
1
vote
0answers
41 views

Calculating exact expectation values on ibmq_qasm_simulator

In order to calculate the exact expectation value of a Pauli operator in some state using local qasm_simulator, I do ...
0
votes
0answers
30 views

IBMQ - Total samples exceeds the maximum number of samples for channel [8002]

I'm trying to run some pulse schedules on ibmq_bogota but I'm running into this error: There are 99 "circuits"/pulse schedules in this job. When I try to ...
3
votes
1answer
101 views

What are the differences between IBMQJobManager and Qiskit aqua QuantumInstance?

I have been using the Qiskit aqua QuantumInstance for a while, and have recently discovered the IBMQJobManager class and the two seem to be quite similar. Are there differences between them? Will they ...
2
votes
1answer
161 views

Can I 'shuffle' the qubits in my circuit?

If I have such a quantum circuit: quanc = QuantumCircuit(5) quanc.crz(np.pi,1,0) quanc.cx(1,[i for i in range(2,5)]) Can I 'shuffle' the quantum circuit, such ...
-1
votes
1answer
49 views

Handle Qiskit Excpetion while Loading IBMQ Account using Streamlit

I'm trying to build a simple web app for generating random numbers using IBMQ (Qiskit) and Streamlit. However, if there is no IBMQ saved account it should wait for the user to enter the API token and ...
2
votes
0answers
60 views

How to perform a phase operator on register that contains two or more qubits?

My problem is easy to understand, just how to calculate the matrix of phase operator(or phase gate) acts on multi-qubits so that i can perfrom it in quantum circuit on IBM Quantum Experience just like ...
2
votes
0answers
43 views

Qiskit CircuitStateFn.eval() on more than 16 qubits

The definition of Qiskit CircuitStateFn.eval() is as follows: ...
2
votes
1answer
43 views

How can I find a Clifford+T approximation of an arbitrary one qubit gate in Qiskit?

I know the Solovay-Kitaev algorithm can achieve this. Is there an implementation of this or any other algorithm for the same task in Qiskit? Or perhaps some other library that interfaces well with ...
3
votes
1answer
63 views

Can I adjust the quantum circuit after transpiling it?

I have a list of quantum circuits called all_circuits. I tried to run those circuits on a quantum computer by submitting the jobs to the IBM job manager: ...
1
vote
1answer
44 views

processing between sequential executions

Regarding real quantum computers of IBM, can one execute a circuit that contains measurements and afterwards get counts and then, based on the results of measurements (from counts), decide if to build ...
1
vote
1answer
49 views

Generic CNOT gate in qiskit from tensor product

I would like to use qiskit to verify for generalized CNOT gates that, e.g. for 4 qubits \begin{equation} \text{cu(0,3)} = |0\rangle\langle 0|\otimes1\!\!1\otimes1\!\!1\otimes1\!\!1 + |1\rangle\langle ...
1
vote
2answers
109 views

Was the Quantum Circuit Attribute “iden” renamed?

I'm going through some older tutorials for my employer and everything seems to be working fine except the "iden" attribute. The error is listed below. I assume the name was changed but I don'...
2
votes
1answer
58 views

Implementing Grover's oracle with multiple solutions in Qiskit

I want to turn a state $$ |\Psi_1⟩ = \frac{1}{\sqrt{8}}(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩+|101⟩+|110⟩+|111⟩) $$ into $$ |\Psi_2⟩ = \frac{1}{\sqrt{8}}(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩-|101⟩-|110⟩+|111⟩) $$ ...
1
vote
2answers
63 views

Q-Sphere representation of Bell States

I'm currently going through Lab1 of the Qiskit Quantum Computing Course, where one task is to create the Bell State $$\frac{1}{\sqrt{2}}\left(\vert01\rangle + \vert10\rangle\right)$$ Technically it ...
4
votes
2answers
279 views

What's the default value for a quantum register?

I've just started to learn Quantum computing with Qiskit: I'm reading the Qiskit documentation and the book "Quantum Computing in Practice with Qiskit® and IBM Quantum Experience®". In this ...
3
votes
1answer
30 views

Is there a 'retry' logic in job manager?

This is a follow-up question to my earlier post. I'm trying to filter a set of results obtained from job manager, and the following code works when my circuit list doesn't contain too many elements: <...
2
votes
1answer
56 views

API error when trying to access IBM Quantum Computer using IBMQ API Token

I'm trying to write a code so that if the token exists then it loads the account or else it asks the user for the API token. Below is the code for reference: ...
3
votes
1answer
51 views

Filtering a set of results obtained from job manager

I've already generated a filter for readout error mitigation: ...
2
votes
1answer
46 views

How to simulate the density matrix in Qiskit when using the qasm simulator?

When simulating a circuit using qasm simulator, if there is a depolarizing channel in the noise model, then the results could be mixed states. How can I calculate the density matrix of the mixed ...
4
votes
1answer
32 views

CERTIFICATE_VERIFY_FAILED after updating Python when trying to access results in IBM QE

I had a question earlier about the Numpy DeprecationWarning flooding issue. I just updated the Python in my regular jupyter notebook and have trouble running the following cell: ...
0
votes
1answer
31 views

Applying a projector to a qubit in a qiskit circuit

I'd like to be able to apply $|0 \rangle \langle 0|$ to project a qubit to the state $|0 \rangle$ in the middle of qiskit circuit (see, for example, the attached circuit). I wonder if, in general, ...
0
votes
2answers
39 views

How to fix an error : “ QiskitBackendNotFoundError: 'No backend matches the criteria' ”

I am trying to run the Quantum Teleportation Algorithm using Qiskit on Jupyter Notebook. Here is my code below where I am finding an error - ...
2
votes
1answer
65 views

proof that the gate U is equivalent to the given circuit mathematically

I have solved this question by this, but can't able to get my mistake in it.

1
2 3 4 5
17