Questions tagged [qiskit]
Qiskit is an open source SDK for working with quantum computers at the level of pulses, circuits and application modules. If appropriate, also use the [programming] tag. Please include the version of Qiskit you use when using this tag.
2,469
questions
1
vote
1
answer
18
views
Noisy expectation value of non-Pauli observable in qiskit
I would like to calculate an expectation value of a general operator in a noisy simulation with qiskit.
The usual way of doing this is via an Estimatorwith a noise ...
0
votes
0
answers
14
views
Error Mitigation in Dynamic Quantum Circuits: Alternatives to Dynamical Decoupling?
"I have a regular quantum circuit (i.e., not a dynamic one), let's call it qc. When I run it on a real quantum computer without using dynamical decoupling, the result is poor. However, when I ...
0
votes
0
answers
46
views
Find inner product or coefficient from a quantum state in quantum circuit and qiskit [closed]
From a 4 qubit circuit, I prepared state $|w \rangle = a|1000\rangle + b|1010\rangle +c|1110\rangle$. Now I need to find 'a' with sign(+/-), that is I want to find $\langle 1000|w\rangle$. How do I ...
0
votes
1
answer
39
views
Analogy between Jones waveplates calculus and Qiskit unitary gates calculus
I am trying to understand a relation between Jones calculus, where we work with polarization, and the same implementation in Qiskit quantum schemes.
Let me explain what I mean with examples. After ...
0
votes
0
answers
18
views
Do control flow in quantum computing works on sequential in run time?
In classical computing, we have notion of compile time and run time?
How about quantum computing? For example from qiskit docs ...
1
vote
1
answer
37
views
How would you write $ e^{i \frac{\pi}{4} \text{CNOT}}$ in ZX calculus?
How would you write $ e^{i \frac{\pi}{4} \text{CNOT}}$ operation in ZX calculus? Is there any simple method to write gates of the form $e^{i \frac{\pi}{4} \sigma_z^{(1)} \sigma_x^{(2)}}
$?
0
votes
1
answer
37
views
Qiskit pulse with qiskit >1.0
I am experiencing some difficulties with Qiskit Pulse when upgrading to version 1.0. Specifically, I am trying to adapt this notebook. What I will ask here refers only to the first section (...
0
votes
0
answers
24
views
Fermions to Qubits mapping in Qiskit
I am currently studying the mathematical aspects of fermion-to-qubit mapping available in Qiskit here. While I am interested in understanding the underlying transformation, I am having trouble ...
0
votes
0
answers
15
views
What is the range of expectation value in quantum machine learning
If I want to build a quantum circuit to solve a regression problem in machine learning, and the target value is 200~300. In qiskit, we can use VQR to easily implement it, and it will output the ...
-1
votes
1
answer
53
views
How to prepare a cluster state $\frac12(|0000\rangle+|0110\rangle+|1001\rangle-|1111\rangle)$ in Qiskit?
Build the circuit in Qiskit, cluster state.
1
vote
1
answer
18
views
Visualizing the Effect of a Parameterized Gate on a Qubit Using the Bloch Sphere in Qiskit 1.0
I am seeking assistance with visualizing the effect of a parameterized gate on a qubit using the Bloch Sphere representation. I have a preliminary code snippet as follows:
...
-1
votes
0
answers
36
views
Liouvillian Spectrum of Spin chains in qutip [closed]
Is it possible within qutip only to find the Liouvillian Spectrum of a xxz spin chain or I have to import some commands from other libraries such as scipy.linalg etc.
By finding the spectrum, I mean ...
0
votes
0
answers
61
views
How to Implement a Recursive Circuit into Qiskit?
I am currently trying to recreate a quantum error correction circuit as said in this paper.
Aliferis, Panos; Preskill, John . (2009). Fibonacci scheme for fault-tolerant quantum computation. Physical ...
1
vote
1
answer
82
views
Can we find the quantum state using the Bloch vector in the Bloch sphere?
I had a question about qft. When we apply QFT in a circuit, we can display the qubits separately in the bloch sphere with the plot_bloch_multivector function. I realized that the bloch vectors do not ...
0
votes
1
answer
51
views
Why is the Qiskit Developer Exam given in v0.2x?
The most recent version of QisKit is 1.2.0. I'm curious if there is a good reason that the developer exam is given in a deprecated version.
According to the ...
1
vote
1
answer
83
views
Expectation Value of Observable from evolved statevectors using qiskit on Hardware
I want to compute this <Zi Zj> - <Zi><Zj> for an entangled n-qubit initial state under the application of a general XY Hamiltonian for a range of ...
0
votes
1
answer
32
views
How to program Grover's Operator?
I understand the theory behind Grover's operator but I still am unsure how to code it. I have a quantum circuit with 13 qubits. Could someone please tell me step by step the code to use for Grover's ...
0
votes
1
answer
31
views
How to get the state preparation circuit using StatePreparation function in Qiskit
I want to use the StatePreparation function in qiskit to prepare a state.
For example I want to prepare the statevector [0, 1, 0, 0]. Here is the code that I use:
...
0
votes
1
answer
48
views
Coding a hamiltonian in qiskit
I have a hamiltonian of the form:
$H=\sum_{i=1}^N Z_i Z_{i+1}-Z_NZ_1$
And another one as:
$H=-\sum_{i=1}^N X_i$
I need it to it for N terms.
I am a bit lost can anybody help. I tried looking for ...
2
votes
0
answers
22
views
Why is my graph wrong when trying to visualize the max-cut in qiskit?
I think my QAOA code is correctly solving the max-cut but the visualization is wrong.
I am working on solving the Max-cut problem using QAOA. I started small-scale with a 5 node bipartite graph. I ...
1
vote
1
answer
40
views
RX gate in series
I have to apply two Rx gates in series. How do I do it?
...
1
vote
1
answer
38
views
Qiskit Grover search with QasmSimulator
I'm working through a Qiskit tutorial on Grover search. Unfortunately it was published in 2023 and the tutorial's version of Qiskit (earlier than v1.00) is now out of date. I tried to rewrite the ...
1
vote
1
answer
96
views
How to get all energy values in qiskit in the vibrational tutorial [closed]
I am running the vibrational turorial for CO2: 02_vibrational_structure.ipynb https://qiskit-community.github.io/qiskit-nature/tutorials/02_vibrational_structure.html I use it with the standard input ...
2
votes
0
answers
61
views
VarQITE from scratch: troubles understanding the Variational Quantum Time Evolution (VarQTE) algorithm from Qiskit
At the moment I am trying to implement variational imaginary time evolution in Pennylane from scratch. To get a feeling if it works, I compare the results of my own implementation with the solutions ...
1
vote
0
answers
24
views
Parameterized Gates [duplicate]
I am trying to create my own custom parameterized gate and then transpile it to the AerSimylatorGate. I have been able to create the virtual circuit but in the transpilation to the backend basis set ...
0
votes
0
answers
146
views
Dynamic decoupling error mitigation
I am trying to understand dynamic decoupling error suppression. What are some python code and resources of qiskit related to dynamic decoupling supported on the ...
0
votes
1
answer
52
views
Custom Quantum Gate equivalence to backend basis gate set
Hello I am using Qiskit and I have defined a custom gate which implements the array shown in the image:
This array is unitary and the function R(theta) works by tuning a continious variable into 0 of ...
0
votes
0
answers
27
views
Changing pulse frequency on Qiskit Pulse
I'm just starting to explore the Qiskit Pulse module. In order to conserve my allocated time on the IBM platform, I’m trying to work with a simulator first (FakeBackend). However, when I create a ...
-1
votes
1
answer
58
views
Why Won't My Visualize_Transition Work Anymore?
I recently downgraded my qiskit from 1.1.1 to 0.46.2, and ever since then, my visualize_transition will not work. It worked perfectly before, and now it has a very long error message that I can't ...
0
votes
0
answers
36
views
How can I lower the number of qubits needed in a search algorithm?
I am trying to use quantum computing to iterate through an array with rows of 129 bits. So evidently I need 129 qubits. However, I am unable to simulate this amount of qubits on the qiskit Aer backend....
0
votes
1
answer
16
views
Why Measure method doen't work in Colab?
I'm a beginner in Qiskit. When I use Statevector and then measure method in Colab as follows
...
1
vote
0
answers
43
views
How to simulate circuit on a simulator with more than 129 qubits?
Currently I am using the Aer simulator and I get the error: CircuitTooWideForTarget: 'Number of qubits (129) in circuit-166 is greater than maximum (29) in the coupling_map'? Is there any simulator in ...
0
votes
0
answers
16
views
Allowed statements inside a `SubroutineDefintion` for openqasm
I am currently building a semantic analyser for the openqasm3 specificcation. While referring to the openqasm specification I could only find that QubitDeclarations ...
0
votes
0
answers
13
views
DEJMPS and EXPEDIENT distillation protocols implementation in qiskit
I am new to Qiskit and distillation protocols. I am wondering if there is a tutorial or a link to the implementation of the DEJMPS and EXPEDIENT distillation protocols in Qiskit.
What I want to ...
1
vote
1
answer
42
views
eigenstate is missing in the solution of vqe.compute_minimum_eigenvalue API in qiskit==1.0
I am using an API result= vqe.compute_minimum_eigenvalue using different version of qiskit. The qiskit==0.46 gives ...
0
votes
0
answers
10
views
How can I implement continous Z by using qiskit pulse?
I want to implement gate $e^{iXt+iYt+iZt}$ by using qiskit pulse. $e^{iXt+iYt}$ can be made when I change the Drive pulse phase. But I don't know how to implement additional iZt.
I think if there's ...
1
vote
1
answer
74
views
Getting negative probabilities in the count result
I am struggling with a very basic concept.
What exactly is the negative probability means in count result?
When I run a circuit without error mitigation and with error mitigation using a really great ...
1
vote
2
answers
99
views
What is the name of the algorithm used in the qc.unitary API?
I am trying to understand the paper: Quantum circuits for isometries (PRA 93, 032318, arXiv:1501.06911).
This paper basically proposes an algorithm called as column column decomposition (CCD), which ...
1
vote
1
answer
147
views
Substitute for QuantumInstance in latest qiskit==1.0
I have a old version of qiskit==0.46 code which uses the below syntax:
...
0
votes
2
answers
51
views
qiskit.exceptions.QiskitError: 'Invalid input data for Pauli.'
I have some old version qiskit==0.46 code which uses an API as below:
...
0
votes
0
answers
26
views
Using BreakLoopOp in Qiskit
While looking at the Qiskit documentation, I saw that using control flow was also a loop breaking process, so I added a condition with the BreakLoopOp class and ...
1
vote
1
answer
49
views
Using statevector in latest version of qiskit==1.0
I am trying to use migrate my code from old version of qiskit to the latest version qiskit==1.0 for the statevector.
...
0
votes
1
answer
39
views
qiskit.providers.basic_provider.exceptions.BasicProviderError: 'basic_simulator encountered unrecognized operation "ucry"'
I need some help in running circuit on qiskit==1.0 simulator.
The documents says:
https://docs.quantum.ibm.com/migration-guides/qiskit-1.0-features
...
0
votes
1
answer
25
views
AttributeError: Options field max_parallel_threads is not valid for this backend
I am working on migrating my code to the latest version of qiskit==1.0. Below is a part of my code:
...
2
votes
1
answer
91
views
AttributeError: 'QuantumCircuit' object has no attribute 'ucry'. Did you mean: 'cry'?
I am trying to update my code to latest version of qiskit==1.1.1 Earlier we used to have a gate called as qc.ucry, but now I am ...
1
vote
0
answers
15
views
How to use GoemansWilliamsonOptimizer from qiskit_optimization.algorithms?
I have created a big instance of a max cut problem, which is in a QuadraticProgram. Now when I try to do this:
...
3
votes
0
answers
49
views
Do we really apply both single-qubit and two-qubit gates in the same layer in experiments?
I'm doing experiments using superconducting computers, and my question is as follows:
Performing quantum gates requires isolating the coupling between a target qubit and other neighboring qubits.
To ...
0
votes
0
answers
25
views
Qiskit runtime backen cannot state_preperation
I am trying to run a circuit on hardware, for that I need to initialise the state.
...
0
votes
0
answers
40
views
3
votes
2
answers
53
views
qiskit DraperQFTAdder
my code:
...