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
0 votes
0 answers
8 views

How can I decode a ZZFeatureMap?

I've encoded a basic 2x2 image into a quantum circuit using a ZZFeatureMap in Qiskit. Is there any way I can verify that this encoding was correctly done? My first thought was to try to decode this ...
Harshil Avlani's user avatar
0 votes
0 answers
12 views

Implementing Custom Gates by using Qiskit Pulse in Qiskit 1.0.0

I'm using Qiskit 1.0.0. I'm trying to define a custom gate from a certain wavefunction and insert it in a quantum circuit that I want to run and measure the counts. The relevant code for the question ...
Roberto Schiattarella's user avatar
1 vote
0 answers
33 views

MPS in (2+1) D quantum many body system (QMBS)

Can the Matrix Product State (MPS) simulator of the QISKIT be used to solve (2+1) D problems? I have seen this paper using the MPS simulator for a (2+1) D problem. However, my understanding is that an ...
Anyon's user avatar
  • 55
0 votes
1 answer
35 views

Can a VQC initial weight be custom initialized?

I am following the tutorial from https://qiskit-community.github.io/qiskit-machine-learning/tutorials/02_neural_network_classifier_and_regressor.html ...
CharonEXE's user avatar
1 vote
1 answer
43 views

Implementing UCCSD ansatz in Amazon Braket

Is there a way to directly implement UCCSD ansatz in braket, without manually defining the circuit? Like in qiskit, one can call UCCSD to create the ansatz circuit. Similarly can we do it in braket? ...
F1_light's user avatar
0 votes
0 answers
15 views

Custom Mapping using up-to-date Machine Characteristics

I'm working to optimize mappings from virtual to hardware qubits using error and calibration data from the backend. I've implemented my algorithm. When I submit a job, it of course takes 1-5 hours to ...
Aaron O's user avatar
1 vote
1 answer
60 views

I would like to understand the meaning of applying permutation to a unitary matrix

$$U = \frac{1}{2} \begin{pmatrix} -1 & -1 & 1 & 1 \\\\ 1 & -1 & 1 & -1 \\\\ 1 & -1 & -1 & 1 \\\\ 1 & -1 & 1 & 1 \end{pmatrix}$$ $$P = \frac{1}{...
junghyunHa's user avatar
2 votes
1 answer
95 views

How to make sense of `Pauli observables` in the gate cutting code here?

I am following the tutorial mentioned in the circuit-knitting-toolbox. This tutorial explains how you can replace non-local gates with local operations in the superoperator representations and ...
Another Random Guy's user avatar
1 vote
0 answers
46 views

Qiskit bad unitary decomposition

I want to decompose a two-qubit unitary gate $U$, $$U = e^{-i \cdot \frac{t}{2} \cdot Z_1 \cdot Z_2}\,,$$ where $t$ is an angle. I already know the right decomposition but Qiskit gives me an ...
Daniele Trisciani's user avatar
0 votes
1 answer
19 views

How to get the simulation method used by AerSimulator(method='automatic')?

Is it possible to obtain the simulation method by a simulation run when using AerSimulator(method='automatic')? For example running a circuit: ...
ZeZe's user avatar
  • 3
1 vote
2 answers
119 views

How to compare the output of statevector_simulator and qasm_simulator in Qiskit

I am stuck with a very difficult problem. Suppose, I execute a circuit on statevector_simulator, and I get all the values negative. Suppose, now i execute the same ...
Manu's user avatar
  • 423
0 votes
0 answers
21 views

Why are the variational parameters not changing in VarQRTE runs for TwoLocal ansatz?

Following the qiskit tutorial on Variational Time Evolution, I've changed the ansatz for VarQRTE from ansatz = EfficientSU2(hamiltonian.num_qubits, reps=1) to <...
squareroottwo's user avatar
1 vote
1 answer
45 views

What is the meaning of complex expected values?

Introduction I am using BQSKIT to compile an approximation of a Toffoli gate (for testing purposes) and output to a QISKIT QuantumCircuit. I want to find the expected value of this approximation to ...
Shadow43375's user avatar
0 votes
1 answer
36 views

How to calculate the expected value of a quantum operator in Qiskit (after deprications)

Background In 2022 Qiskit released a very nice tutorial detailing how the expectation value of an operator could be found using CircuitOp. As of 2024, these techniques (and others that I have found on ...
Shadow43375's user avatar
0 votes
1 answer
23 views

Get the error of basis gates programmatically

I want to get the error rates of the basis gates of a backend. Is there a function that can achieve this functionality? For example, I want the error rates of the basis gates rx, cx of ibmq_mumbai ...
Amey Meher's user avatar
3 votes
1 answer
49 views

How to transpile a quantum circuit using the $\{H,T,CNOT\}$ universal set of gates?

If I'm not mistaken, the $\{H,T,CNOT\}$ set of gates is universal in the sense that any unitary can be approximated arbiratrily close by a combination of these gates. The ...
Tristan Nemoz's user avatar
1 vote
1 answer
40 views

Use of $X$ gates in creating probability distribution in a quantum circuit

I have been trying to understand the Grover-Rudolph scheme for loading a probability distribution into a quantum circuit. This article gives a demonstration of this scheme by creating a probability ...
kerrwe's user avatar
  • 21
1 vote
1 answer
41 views

How can I use surface code measurement data produced with Qiskit to run matching algorithms (e.g. PyMatching)?

I built a complex time-space dependent error model with Qiskit, and I am simulating surface codes with such error model to test their error correction capabilities. Qiskit supplies measurement data as ...
Marzio Vallero's user avatar
0 votes
1 answer
58 views

MS gate in qiskit

Does anyone know how to use the Mølmer–Sørensen (MS) gate in qiskit? The documentation is highly unintuitive and does not provide examples. If one has to use the generalized version, what is actually ...
user2820579's user avatar
0 votes
0 answers
28 views

Capacitance matrix of superconducting qubit

I want to start to do some simulation and design of superconducting qubits. I want to start using qiskit metal, but in order to calculate the capacitance matrix I need to interface it with Ansys. ...
Simona99's user avatar
  • 180
1 vote
1 answer
74 views

What is the current qubit reset mechanism on IBM Quantum devices before running a new circuit?

What is the current qubit reset mechanism on IBM Quantum devices before running a new circuit? One could either wait long enough (as much as 2 ms perhaps) in order to ensure that all qubits decay to ...
Radu M.'s user avatar
  • 218
0 votes
0 answers
23 views

Qiskit unitary_simulator seems not to be working

I'm trying to generate the unitary transformation matrix for a very simple circuit (below): ...
Gustavo Mirapalheta's user avatar
1 vote
0 answers
22 views

Installation Struggles [migrated]

We are doing a Quantum computing project using the Qiskit toolkit. But we are struggling to import or install the packages and libraries. In Qiskit how we can import the libraries and packages?
Bala Sathish's user avatar
2 votes
0 answers
80 views

Problem with SwitchCase in qiskit while using general unitary gate

I am trying to run a circuit using SwithCase Op on one of the 127 qubits backends. My code is the following: ...
Navid Elyasi's user avatar
0 votes
0 answers
15 views

Clarification on the Meaning of Pulse Amplitude in Qiskit Pulse

I'm unclear about the meaning of the pulse amplitude mentioned in the IBM Quantum's Qiskit Pulse documentation. Does the pulse amplitude here refer to the physical amplitude (intensity) of the ...
tare_'s user avatar
  • 51
2 votes
0 answers
36 views

Unitary Matrix for Quantum Random Walk

I am re-working a project which aims to implement a very simple version of a quantum random walk. It actually is a simplified binary random walk on a cyclic graph. The idea is depicted in the ...
zuluratman's user avatar
2 votes
0 answers
40 views

QPE algorithm to the Hubbard Model

I'm trying to perform the Eigenvalue Estimation algorithm to the Hubbard model with two sites, one spin-up fermion and one spin-down fermion, with Qiskit. Given the Hamiltonian: $\hat{H}=u\sum_{i=1}^N\...
Quantum Lele's user avatar
1 vote
1 answer
88 views

Is there any library to create a uniformly random unitary matrix?

Is there any library to create a random special unitary $SU(N)$ that generates from Haar distribution? I understand in PennyLane there is qml.SpecialUnitary ...
Sudhir Kumar's user avatar
-1 votes
0 answers
38 views

What's the time complexity when i initialize a statevector of 8-bit as quantum circuit input and why is it running so slowly?

When I get two certain state vectors, I use qc.initialize(sv1, range(0,8)) qc.initialize(sv1, range(8,16)) for initializing a quantum circuit input. It is only ...
qin guang's user avatar
-2 votes
0 answers
50 views

Qiskit GroverOptimizer - How to draw the circuit?

The following codes works, but as a black box. I'd like to draw the circuit that GroverOptimizer uses. How to do? ...
Maurice Clerc's user avatar
0 votes
0 answers
31 views

How to read the code on a partial NOT gate

In the code I am analyzing, I found the following code being: frac = 1/(num+1) qc.u(frac*math.pi,0,0,q[position]) Where I can insert any number integer to the ...
Noodle Master's user avatar
0 votes
0 answers
13 views

how to get complete memory stats for a qiskit circuit

I am interested in running several qiskit circuits on multiple GPUs and record their memory usage. My issue is when circuit runs successfully I am unable to get exact amount of memory it took during ...
aneela's user avatar
  • 223
0 votes
0 answers
32 views

procedure for making a probability distribution into a quantum circuit

I found this article on loading a probability distribution into a quantum circuit, the Grover-Rudolph scheme: https://arxiv.org/pdf/quant-ph/0208112.pdf I understand the idea of progressively dividing ...
kerrwe's user avatar
  • 21
1 vote
1 answer
38 views

Reducing the text content inside a custom quantum gate in Qiskit

I have prepared a parameterized custom quantum gate in qiskit by converting a quantum circuit into a gate through QuantumCircuit.to_gate(). However, the text ...
user9043261's user avatar
1 vote
1 answer
66 views

Implementation of classical control of multi-qubits gates multiple times

I am implementing classical control of gates multiple times. There is no issue if the gate is a local gate, such as an $X$ gate. However, it seems that if I append the control multi-qubits gates more ...
JiQing's user avatar
  • 15
2 votes
1 answer
104 views

Is there an "in place" Toffoli gate?

I am trying to implement the multiplication of a scalar in $\mathbb{Z}_2$ and a polynomial in $GF(2^n)$ in Qiskit. One naive method of implementation that I can think of is: ...
Ash Ketchum's user avatar
1 vote
1 answer
70 views

Need help regarding building a custom VQE

I want to write code for a custom Variational Quantum Eigensolver (VQE) capable of computing eigenvalue(s) for non-Hermitian systems, based on this paper. I have formulated a cost function (provided ...
Bravyi's user avatar
  • 11
2 votes
1 answer
80 views

Multi-control multi-target gate

I'm using qiskit for simulation. Suppose, I have 6 qubits with indices [0, 1, 2, 3, 4, 5] and I have an operator $U$ of size $4 \times 4$, such that it operates on ...
Марина Лисниченко's user avatar
1 vote
1 answer
65 views

Why there's an issue when a quantum gate is controlled in the same time by 0 on a qubit and 1 or 0 with a classical bit on Qiskit?

I'm doing a project for an internship related to quantum computing and I was trying to do this operation on Qiskit lab: ...
Thomas's user avatar
  • 11
0 votes
0 answers
12 views

mpirun qiskit code doesn't return parallel processing

I am trying to create MPI cluster and run qiskit code on two nodes each with a single GPU installed. Till now I have installed MPI4PY and qiskit-aer-gpu on each node and ran a test script which is do ...
aneela's user avatar
  • 223
0 votes
1 answer
62 views

Expectation value of a given observable computed manually using qiskit.Sampler is different as with qiskit.Estimator

I am trying to calculate the expectation value of a given observable for a certain state $\psi$ using qiskit primitives Sampler (using Sampler requires some further calculations) and Estimator. I ...
ScientiaNatura's user avatar
1 vote
1 answer
28 views

Use qiskit-experiments StateTomographyAnalysis on data previously recorded without qiskit

I would like to use the analysis capabilities of qiskit, i.e. StateTomographyAnalysis of qiskit_experiments on data that were previously measured on a system not ...
Anedar's user avatar
  • 111
0 votes
0 answers
31 views

Error: IBMJobFailureError: 'Job failed: Error while executing OpenQASM 3 circuit

I am running my circuit on ibm_osaka backend and it always brings me up this error: IBMJobFailureError: 'Job failed: Error while executing OpenQASM 3 circuit.' Does anyone know what is the cause of ...
Navid Elyasi's user avatar
1 vote
0 answers
34 views

How to use GPU with qiskit as default and then use parallel GPU setup in distributed computing?

I have a GTX 1600 GPU on my computer and I am confused on how to use cuQuantum, Tensorflow or torch etc to enable GPU for qiskit. Further, one of my friends also have a GPU, we want to use both GPUs ...
Syed Shahmir Kazmi's user avatar
1 vote
0 answers
65 views

Error code 1217, Message: Reduce time between submitting subsequent jobs in a session

I tried running a piece of Qiskit code to minimize a Hamiltonian using QAOA. I tried running the same piece of code that I had used earlier in the IBM Quantum system 'ibm_nairobi' which gave me the ...
Jane's user avatar
  • 51
2 votes
1 answer
49 views

Why are keys in the quasidistribution larger than the maximum number allowed by the number of qubits?

I use the IBM' Qiskit Runtime Sampler on a 4 qubits circuit. ...
Maurice Clerc's user avatar
1 vote
1 answer
171 views

No module named 'qiskit.algorithms.linear_solvers'

I am trying to execute HHL algorithm. I referred to the code from https://quantumpedia.uk/quantum-algorithm-4-hhl-algorithm-for-linear-systems-of-equations-40619daec41d. I tried implementing all the ...
quantipai's user avatar
1 vote
0 answers
27 views

Interpreting Complex Number Results in Quantum State Discrimination

I have a question regarding the explanation in qiskit pulse. The results are displayed as in the figure, with the following code: ...
tare_'s user avatar
  • 51
1 vote
1 answer
30 views

Qiskit ground state solver error

I followed the ground state Eigensolver tutorial in the qiskit document, I got the following error. Is there a solution? My version of qiskit is 0.44.2 and here is the link to that tutorial. https://...
elsh456's user avatar
  • 13
1 vote
0 answers
32 views

Interleaved Randomized Benchmarking experiment with custom PassManager

I have a custom PassManager, which calibrates a few gates in the circuit in the transpiler pass. I want to conduct an Interleaved Randomized Benchmarking experiment ...
Amey Meher's user avatar

1
2 3 4 5
45