Skip to main content

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.

Filter by
Sorted by
Tagged with
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 ...
a_member's user avatar
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 ...
ali khosravi's user avatar
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 ...
tra sh's user avatar
  • 1
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 ...
Bohdan Bilash's user avatar
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 ...
Muhammad Ikhwan Perwira's user avatar
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)}} $?
HypnoticZebra's user avatar
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 (...
kernel123's user avatar
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 ...
user3116936's user avatar
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 ...
Neon's user avatar
  • 1
-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.
user31848's user avatar
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: ...
user3116936's user avatar
-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 ...
user31832's user avatar
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 ...
Eric Kim's user avatar
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 ...
Süleyman Emir Yılmaz's user avatar
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 ...
underdog987's user avatar
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 ...
CuriousMind's user avatar
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 ...
Colin Benaissa's user avatar
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: ...
peachnuts's user avatar
  • 1,393
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 ...
Lelouch's user avatar
  • 123
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 ...
karen's user avatar
  • 41
1 vote
1 answer
40 views

RX gate in series

I have to apply two Rx gates in series. How do I do it? ...
Lelouch's user avatar
  • 123
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 ...
Medulla Oblongata's user avatar
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 ...
Bram's user avatar
  • 618
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 ...
L Toku's user avatar
  • 21
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 ...
Guillermo's user avatar
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 ...
Manu's user avatar
  • 53
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 ...
Guillermo's user avatar
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 ...
kernel123's user avatar
-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 ...
Isha Bhadauria's user avatar
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....
Colin Benaissa's user avatar
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 ...
Wisdom's user avatar
  • 103
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 ...
Colin Benaissa's user avatar
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 ...
Harshit Gupta's user avatar
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 ...
Shahrooz Pooryousef's user avatar
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 ...
Manu's user avatar
  • 53
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 ...
Lee's user avatar
  • 21
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 ...
Manu's user avatar
  • 53
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 ...
Manu's user avatar
  • 53
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: ...
Manu's user avatar
  • 53
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: ...
Manu's user avatar
  • 53
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 ...
Süleyman Emir Yılmaz's user avatar
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. ...
Manu's user avatar
  • 53
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 ...
Manu's user avatar
  • 53
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: ...
Manu's user avatar
  • 53
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 ...
Manu's user avatar
  • 53
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: ...
Another Random Guy's user avatar
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 ...
jtlearner's user avatar
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. ...
Thick Harry's user avatar
0 votes
0 answers
40 views

Is this the right code to run a QSVC algorithm on a dataset?

...
Sai Vellanki's user avatar
3 votes
2 answers
53 views

qiskit DraperQFTAdder

my code: ...
Lexiang Xue's user avatar

1
2 3 4 5
50