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
0 answers
21 views

Running Pulse Schedules with different resilience levels

Is there a way to run a Pulse schedule with different resilience levels? I was thinking about passing the resilience level values in the options of Sampler primitive, but when I tried to run, it says ...
Amey Meher's user avatar
2 votes
0 answers
135 views

How to build the quantum circuit ansatz to implement a diagonal unitary operator with just 1 and -1 elements?

Let's consider a set of $N = 2^n$ binary values $S_i \in \left\{-1, 1\right\}$ and define the diagonal matrix $W$ as a quantum unitary operator acting on a system of $n$ qubits: $$ W = \begin{pmatrix} ...
SimoneGasperini's user avatar
1 vote
1 answer
60 views

How to work with SwitchCaseOp?

Does anyone know how to work with SwitchCaseOp? I want to use it as a tool to execute conditioned circuits. I have read the documentation, however, I can not figure out how to use it and run it on a ...
Navid Elyasi's user avatar
1 vote
1 answer
69 views

How to collapse the subcircuits in a QuantumCircuit?

Suppose I have a QuantumCircuit object named FC, which explicitly contains the identity gate, and convert it into a gate using <...
Bard's user avatar
  • 325
2 votes
1 answer
29 views

Is it possible to do the transpilation with a priori retired devices?

Is it possible to do the transpilation with "any" device in qiskit? I would be interested in doing this with already retired devices.
user2820579's user avatar
2 votes
1 answer
35 views

Retrieve backend functionality of retired qiskit device

I am doing some analysis from a now retired device (lima) and I would like to access its "logic" construction in qiskit. Specifically, I would like to ...
user2820579's user avatar
2 votes
0 answers
59 views

Qiskit Transpiler Error: Unknown Operation Type

I am trying to use the reset function and recieving the following error: ...
lightly's user avatar
  • 21
1 vote
1 answer
206 views

How does depolarization error accumulate?

Here's my code to define the depolarization error using Qiskit, which included both one and two-qubit errors: ...
IGY's user avatar
  • 361
2 votes
0 answers
44 views

Efficient gate executing the time evolution of a Hamiltonian using Runge-Kutta method

You can find a minimal working example below. In particular, I want to replace the scipy.linalg.expm() matrix exponential by a Runge Kutta time evolution method as ...
ANDREAS kruckenhauser's user avatar
1 vote
0 answers
42 views

How to create a 3-D state (array) of qubits in qiskit or cirq etc?

I want a 3-D cube-like array for state of qubits, on which I want further to implement different sets of rotations, etc, for cryptographic means. You can create a 2D grid qubit in cirq with ...
Syed Shahmir Kazmi's user avatar
1 vote
0 answers
62 views

Error: cannot pickle '_global_parameters' object while performing state tomography with qiskit [closed]

Qiskit version: 0.44.2 Operating system: 64-bit operating system, Windows 10 Pro ...
Satish Seth's user avatar
2 votes
1 answer
94 views

AerError: 'unknown instruction: c-unitary' while using control unitary operator

I'm using the following code : ...
Young Kindaichi's user avatar
2 votes
1 answer
53 views

Qiskit qubit ordering

In their to_ising documantation page, Qiskit devs mark the comment: Variables are mapped to qubits in the same order, i.e., $i$-th variable is mapped to $i$-th ...
Alternative7's user avatar
0 votes
1 answer
250 views

Error while installing Qiskit 0.44.2: "Preparing metadata (pyproject.toml) did not run successfully." [closed]

I am trying to install Qiskit 0.44.2 on a mac mini (macOS Sonoma) following instructions given in the page https://qiskit.org/documentation/getting_started.html. I am getting the following error at ...
Syam's user avatar
  • 11
1 vote
0 answers
26 views

An unexpected result of the Implementation of a finding minimum values algorithm using a qRAM

Motivated by the article Quantum algorithm for finding minimum values in a Quantum Random Access Memory, I'm training to implement a simplified version of the proposed algorithm. But the output isn't ...
j__j's user avatar
  • 11
0 votes
2 answers
75 views

Help debugging implementation of Draper QFT adder

I am attempting to implement the adder found in this paper. Here is the code: ...
Jackson Walters's user avatar
0 votes
0 answers
36 views

Error: module 'rustworkx' has no attribute 'visit' when trying to execute a quantum circuit in a real quantum computer from IBM

I am trying to use a real quantum computer from IBM. I have the next code: ...
Marcos Quintas Pérez's user avatar
0 votes
1 answer
25 views

DeprecationWarning: Back-references to from Bit instances to their containing Registers have been deprecated

I have the following code for instruction, qargs, cargs in qc.data: qbit: qiskit.circuit.Qubit = qargs[0] print(qbit.register) print(qbit.index) the ...
Evan Camilleri's user avatar
0 votes
0 answers
20 views

Background job in Qiskit not showing output on .ipynb file?

I've successfully run jobs to measure circuits on Qiskit (Shor's algorithm for $N=15$ or simpler). However, it appears when I close out of everything and leave, the output of the job doesn't show in ...
Jackson Walters's user avatar
3 votes
1 answer
136 views

4 qubit QFT decomposition in the qiskit textbook

I am reading about the quantum Fourier transform (QFT) in the qiskit textbook, but got stuck at the last part of it which shows a decomposed version of the 4 qubit QFT circuit. It seems that the ...
pilsungk's user avatar
1 vote
0 answers
43 views

How does Qiskit's oracle synthesizer work?

Qiskit provides a phase oracle method that takes a Boolean formula as input and returns a phase oracle circuit for that function as output. Their source code informed me that the synthesis uses the ...
이희원's user avatar
  • 195
1 vote
0 answers
36 views

Why EfficientSU2 in QGAN

In Qiskit's QGAN example, the parameterised quantum circuit to be trained is the EfficientSU2. I have not found any citation there on the choice of this circuit, and the only justification is that it ...
Wolfman Jack's user avatar
0 votes
1 answer
57 views

How to simulate a $CNOT$ only using a single qubit?

I am looking to do a $CNOT$ on itself, i.e., if the qubit is in $|0\rangle$ it stays in $|0\rangle$ and if it is in $|1\rangle$ it becomes $|0\rangle$. We are allowed to use $H$, $X$, $Z$, and $CNOT$ ...
Sowrya Gali's user avatar
1 vote
0 answers
54 views

MissingOptionalLibraryError: "The 'pdflatex' library is required to use 'LaTeX circuit drawing' [closed]

Trying to run the below code block in a jupyter notebook in Windows 10: ...
ulbgo lee's user avatar
2 votes
1 answer
128 views

Calculating the Expectation Value After Mid-Circuit Measurements in Qiskit

I've been trying to implement a QML algorithm but I've run into a problem with calculating the expectation value of a certain part of the circuit after doing mid circuit measurements. I have a ...
Frans Perkkola's user avatar
1 vote
0 answers
70 views

How can I simulate EPR and Bell’s inequalities in qiskit?

According to Bernard Zygelman "A First Introduction to Quantum Computing and Information", I can compute the $QS|f\rangle$ with $|f\rangle = \frac{1}{\sqrt{2}} (|00\rangle -|11\rangle)$, ...
Piero Fariselli's user avatar
0 votes
1 answer
80 views

How can one obtain all calibration data which is needed to plot error_map of the ibm backend from few month ago?

I want to plot the error map of an IBM Quantum backend from the calibration data I saved a month ago. The saved file just contain qubit properties and to plot error map I would need all information ...
Shil S's user avatar
  • 27
1 vote
1 answer
49 views

Statevector from Density matrix of non-pure state

I have a state vector of a 16 qubit system. I want to get the wave function (in the form of a state vector) for half and quarter of this system. When I try to make a ...
VladislavOkatev's user avatar
1 vote
1 answer
37 views

Step Optimize1qGatesDecomposition in qiskit transpilation

Is there a way to know what does it does qiskit in the step Optimize1qGatesDecomposition? What I can see is that each time qiskit wants to represent a rotation in ...
user2820579's user avatar
0 votes
2 answers
67 views

How can visualise the old error map of Ibm backend if one save the calibration data of the backend at that time?

I have the calibration data of an Ibm backend and now I want to plot the error map of the device at that specific time. How can I do this?
Shil S's user avatar
  • 27
1 vote
1 answer
74 views

How to implement non-unitary operator in qiskit?

I am trying to make a operator for S-Box for AES. The matrix is non-unitary. When I use Operator command for declaring it as a function. It gives error, the matrix is non-unitary. Thus, the qiskit ...
Syed Shahmir Kazmi's user avatar
3 votes
1 answer
69 views

Is it possible to get step-by-step information about qiskit transpilation?

Is it possible to get the information about the step by step transpilation? I have circuits that I know how it is more or less structured after the transpilation, but when I join them to create a ...
user2820579's user avatar
1 vote
0 answers
33 views

Retrive IQ Data from Fake Backend in Qiskit

Is it possible to retrieve IQ data from Fake Backends in Qiskit? I'm trying with the following code, but even by setting meas_level=1, I get only count vectors. <...
Roberto Schiattarella's user avatar
2 votes
0 answers
66 views

Is it possible to convert a qudit to a qubit?

I am trying to write a Qiskit code for a algorithm which uses qudits. I want to use qubits instead because $p$ value can go pretty high. Is it mathematically possible to convert qudit to qubit for ...
videet.acharya's user avatar
0 votes
1 answer
40 views

Given a COMPLEX unitary matrix, how can I construct a unitary gate in Qiskit?

It seems that it is fairly easy to construct a unitary gate given a real unitary matrix. However, I have tried several methods with a complex unitary matrix, but they all seem to be not working. How ...
JiQing's user avatar
  • 3
1 vote
0 answers
24 views

Optimizing Selection of the Optimal Qubit in a 30-Qubit Quantum Circuit

I am working with a quantum circuit consisting of 30 qubits, and for each qubit, I have allocated a dedicated classical register to record individual measurement results. When I execute this circuit ...
Alaa eddine's user avatar
2 votes
1 answer
60 views

Half Adder using CNOT Gates

As per this schematic of qubits, how this explanation is correct --"If you look again at the four possible sums, you’ll notice that there is only one case for which this is 1 instead of 0: 1+1=10....
Piyush Kumar Sinha's user avatar
1 vote
0 answers
31 views

Running multiple amplitude estimations simulations

I am working on a mini project investigating the scalability of quantum computing in the context of option pricing. I have been following the above Finance API from Qiskit as an introduction, however, ...
quantum_noob_16's user avatar
1 vote
0 answers
71 views

Converting Ising Hamiltonian to a Circuit in Qiskit

I tried to solve a 2-node TSP (travelling salesman problem) by implementing QAOA on Qiskit. The graph looks like: Then I used the related Qiskit functions to convert the graph to the QUBO and map it ...
Alternative7's user avatar
1 vote
0 answers
50 views

Building a problem unitary circuit for QAOA on Qiskit

I am trying to build a circuit for QAOA that solves a Traveling Salesman's Problem, which can be represented as a complete graph with 4 nodes. After formulating the problem as a QUBO and mapping it ...
Alternative7's user avatar
0 votes
1 answer
100 views

Design a full adder to add two 4-bits integer and measuring on 4 quantum states

I am trying to implement a full adder with minimum of 8 qubits to add two 4 bit integers. Integer 1 will be added on q[0-3] while integer 2 will be added on q[4-7]. The output will be measured on q[0-...
Bob's user avatar
  • 1
1 vote
0 answers
76 views

Representing networks with qubits as edges

I am looking to take a classical non-negative real valued network and generalize it to the quantum case for processing. A network is given by an adjacency matrix, essentially edge weights $e_{ij}$ for ...
Jackson Walters's user avatar
1 vote
2 answers
127 views

How to design a circuit which produces the state $|\psi\rangle = \frac{1}{2}|{010}\rangle + \frac{\sqrt{3}}{2} |{101}\rangle$?

The quantum state to achieve is: $$ |{\psi}\rangle= \frac{1}{2}|{010}\rangle + \frac{\sqrt{3}}{2} |{101}\rangle $$ So far I know how to produce the $$\frac{1}{2}|{010}\rangle$$ state in qiskit as ...
Bob's user avatar
  • 11
0 votes
0 answers
25 views

Can't run QubitSpectroscopy from qiskit experiments library

So this question inherits from my previous problem , but owing to its perceptible distinction, I decided to write it separately. Long story short, I want to construct a Qubit Spectroscopy experiment ...
Ikaryssik's user avatar
1 vote
1 answer
52 views

Limited qubit number available in Aer Statevector simulator

I tried to run a calculation of 37 qubits with a Statevector simulator on Qiskit. The following is a demo code. ...
Marxmas's user avatar
  • 107
0 votes
2 answers
75 views

Trying to run qubit spectroscopy on FakeManila backend, got unknown instruction error

Right now I'm trying to delve into qiskit pulses and its usage with quantum hardware. First of all I decided to run spectroscopy experiment with FakeManila backend: ...
Ikaryssik's user avatar
0 votes
0 answers
19 views

How do I implement implicit identity error in Qiskit?

I recently noticed a difficulty I'm having with Qiskit Aer. I want to simulate a quantum circuit where idling qubits suffer some noise. The problem is that AerSimulator doesn't implement noise on ...
Visipi's user avatar
  • 149
0 votes
0 answers
25 views

Functional form of the drive of IBMQ machines

I am trying to apply some ML techniques to try and find out pulse sequences to implement different kinds of gates using Qiskit Pulse. For the ML part, it is necessary for me to know the Hamiltonian of ...
MAAN2498's user avatar
1 vote
1 answer
58 views

Implementing swap test on quantum register

I'm interested in implementing a controlled-swap operation on quantum registers. However, it appears that Qiskit's documentation primarily focuses on single qubits rather than registers. Could you ...
Yuval Idan's user avatar
0 votes
1 answer
37 views

qiskit with our own backend

In our laboratory we have our own cryostat and quantum chips, so I wondered if is it even possible to mate our own hardware (HDAWG, etc.) with qiskit framework? It would be great to build pulse ...
Ikaryssik's user avatar

1
2
3 4 5
44