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

mitiq from_qiskit() error

I am receiving the following error while using mitiq for zero noise extrapolation. frontend is qiskit, backend is Fakelima. Can anyone expert in mitiq know the source of error? The final error message ...
  • 33
1 vote
1 answer
47 views

How to input "-1" into a quantum circuit?

I'm a beginner and I'm working on a question where I need to do a quantum fourier transformation on an input string that consists of "-1"s and "1"s. In Qiskit's documentation on ...
0 votes
0 answers
6 views

Specifying the shape of pulse in RoughFrequencyCal

I've been following upon this document for device calibration. https://qiskit.org/documentation/experiments/tutorials/calibrating_real_device.html Is there any way to specify the pulse shape for the ...
2 votes
1 answer
35 views

Which backend does the QSVM run on?

I'm trying to create a QSVM classifier model. I wanted to know which backend the fit() method uses to train the model. I checked on the IBM portal to see if there were any jobs being created, but ...
0 votes
0 answers
37 views

Why QECC amplitude damping error syndrome and qiskit simulation are different?

The [[3,0,2]] code, stabilizers are X1Z2I3,Z1X2Z3,I1Z2X3. Use the circuit to decode and measure stabilizers: As for amplitude damping error syndrome, use $\left[\begin{array}{cc}1 & 0 \\ 0 & ...
0 votes
0 answers
22 views

How to implement this circuit either using Jupiter notbook or qiskit

I am new to quantum-computaions and learning qiskit. I am trying to construct a two qubits circuit that performs a bell measurement using $\{|\beta_{01}\rangle \langle \beta_{01}| \} $ projectors. ...
  • 1
0 votes
1 answer
41 views

Why does taking a measurement completely change my probabilities of states

I am trying to vary the "quantumness" of this simple circuit by inserting some cnot gates into the circuit with an RY gate to control the "quantumness" When I change RY the ...
0 votes
0 answers
28 views

Why marked state still be negative after inversion about mean (Grover's search)?

From my understanding, after phase flip only the marked state will be negative and every state should be positive. But it's not. I think my initial state And marked state Are correct. And after ...
1 vote
0 answers
37 views

How to rewrite this Cirq problem into Qiskit?

I have a following example problem in Cirq, representing a very simple operator given by $$ \hat{H} = a^\dagger_0a_2 + a_0a^\dagger_1 + 0.9\, a^\dagger_0a_1a^\dagger_2a^\dagger_3 + a^\...
  • 211
1 vote
0 answers
23 views

How does qiskit metal calculate T1 time

We are a group of students working on a project about superconducting qubits. We have used Qiskit Metal to do some simulation and got sets of results of Ec, Ej and coherence time T1. However, we are ...
  • 11
1 vote
1 answer
25 views

How to create Parametrized Operator

How to transform the U3 gate of parameters (theta, phi, lambda) to an Operator. (in qiskit) The following code don't work ...
0 votes
1 answer
51 views

problem with parametrized circuits

I used a circuit with one parametrized gate U(theta, phi, lambda), than I fixed the parameters with qc.bind_parameters and it's worked well. But the only step that don't work is the execution in a ...
2 votes
1 answer
45 views

How the real IBM quantum computers apply arbitrary Rz(θ) gate rotation? [closed]

I want to ask the following questions: (1) The basis gate set of IBM quantum computers is { Id, Rz(θ),√X, X, CNOT, reset}. Somebody said that IBM didn’t really apply Rz(θ) gate on the machine. The ...
0 votes
2 answers
41 views

Qiskit ERROR: Circuit contains invalid instructions

Recently I encountered a weird qiskit error which produces a pretty useless traceback. To replicate this error, I create a very simple circuit given below: When I run it on a simulator, I get an ...
  • 1,308
1 vote
2 answers
32 views

Label Qubit Starting State in Qiskit

$ \def \ket#1{|#1\rangle} \def \bra#1{\langle#1|} $Is there a way to set qubits to be a specific value outside of resetting them like so? I understand that all qubits are initialized to the $\ket 0$ ...
1 vote
2 answers
42 views

Draw Circuit with 'latex' with to_gate involved

The circuit draw command doesn't work when there is a custom gate as follows: ...
1 vote
1 answer
59 views

Solve sudoku using Grover's algorithm

The Qiskit tutorial shows the application of Grover's Algorithm to solve a 2x2 sudoku. However, I don't understand how why its diffuser works as intended. Precisely, why the control bit is on a "...
  • 23
0 votes
2 answers
28 views

Qiskit - Statevector measurement of single qubit in GHZ state collapses the entire state

I have a GHZ state. I want to measure the third qubit in Hadamard basis, after which the state left behind should be a maximally entangled state as mentioned here. But when I measure the third qubit, ...
0 votes
0 answers
23 views

'RuntimeJob' object has no attribute 'queue_position'

I was trying to run a QAOA job using the below script: ...
0 votes
2 answers
25 views

In Qiskit, add amplitude_damping_error to qubits in the circuit, how to know T1?

In Qiskit, add amplitude_damping_error to qubits in the circuit, how to know T1? amplitude_damping_error(param_amp, excited_state_population=0, canonical_kraus=True)...
0 votes
0 answers
14 views

Can I set the gate time of ibmq_qasm_simulator or what is the default time?

Actually I want to know how the noise model add error to circuit gate. Thank you.
0 votes
1 answer
135 views

Number of qubits does not match the number of qubits of the observable

I have to compute $\langle\psi_1(\theta)|H_1|\psi_1(\theta)\rangle$ where $$H_1 = X_1Z_2 +3Y_0Y_4$$ ...
0 votes
1 answer
38 views

Implementing Grover's algorithm on 4 qubits

I have the below Oracle function. Below are the marked states for this Oracle function. I wanted to implement Grover's algorithm on 4 qubits. I've been following the below Qiskit notebook: https://...
0 votes
0 answers
26 views

Error importing machine Learning library Qiskit

I'm on MAC and I'm trying to do an example of implementing QSVM but am running into an error when trying to import my libraries. ImportError: cannot import name 'BaseBackend' from 'qiskit.providers' (/...
  • 1
1 vote
0 answers
9 views

Qiskit: What is the corrrect equilibrium distribution in the thermal relaxation error?

In Qiskit, temperature is a parameter for simulating gate errors in a noise model from backend properties. It is used to calculate the equilibrium state of thermal relaxation errors by ...
  • 116
0 votes
2 answers
48 views

How to perform the measurements on a quantum circuit in W state basis?

I need to perform the measurements on a quantum circuit in the basis $\{ \eta^\pm,\zeta^\pm \} $. Where $ \eta^\pm,\zeta^\pm $ are given as follows: $$\eta^\pm = \frac{1}{2}|001\rangle + \frac{1}{2}|...
  • 53
1 vote
1 answer
35 views

Not understanding gates being generated by MCX in "recursion" mode

I was curious about the various ways of generating code for MCX when there are multiple controls. I saw that qiskit provided multiple algorithms for generating code, depending on the number of ...
0 votes
1 answer
17 views

Aray_to_latex not outputting anything in Jupyter Notebook

Here is my basic code ...
0 votes
1 answer
34 views

How to initialize a function in Qiskit with 3 qubit? [closed]

I would like to know how I can make an initialization with 3 qubits to get |000> ,|100> , |111> ( 1 qubit --> |000> , |ψ⟩ = |000⟩ ⊗ |100⟩ ⊗ |111⟩) the need to know how I can represent ...
0 votes
0 answers
18 views

Writing a qiskit code for a encryption problem

Bob wants to send his friend Alice a message in the form of a string of bits, s. In order to make it harder for an eavesdropper to read s, Bob does the following: Defines a function $ f: \{0,1\}^n → \...
  • 1
0 votes
1 answer
29 views

What is the difference between using qiskit AerSimulator backends and just calling a simulator backend

So for instance is there any difference between using backend = Aer.get_backend('aer_simulator_statevector') or ...
1 vote
2 answers
138 views

what quantum computing simulator can achieve drag-and-drop programing fuction without internet like IBM web composer?

I reallt need some kind of simulator can work like this.Quirk is similar but also require internet.can anyone know how to achieve this?It is very important for some eaducational lesson to students.
2 votes
1 answer
49 views

Why are quantum systems fabricated to be anharmonic?

I was following the Qiskit textbook: https://qiskit.org/textbook/ch-quantum-hardware/calibrating-qubits-pulse.html In this, there is a statement as indicated below: With superconducting qubits, ...
3 votes
2 answers
123 views

Qiskit Transpiler function - Why does Toffoli + Hadamard not work as a Basis Gate set?

It is a well established fact that Hadamard + Toffoli is a computationally universal gate set. Therefore I thought that the transpiler function in Qiskit would be able to decompose any valid quantum ...
1 vote
0 answers
30 views

ZZFeaureMap, TwoLocal and NLocal in Qiskit

Can anyone please explain me the ZZFeaureMap, TwoLocal and NLocal in Qiskit. I am able to understand that they are used in some machine learning applications but don't understand how to use them and ...
0 votes
1 answer
58 views

Using qiskit on mutiple cores

I would like to be able to set the number of cores the AerSimulator should be running. For now I've tried ...
0 votes
0 answers
86 views

'Error: cannot import name 'BaseBackend' from 'qiskit.providers'' from qiskit.providers.ibmq.runtime import ResultDecoder

I want to migrate my qiskit code that uses qiskit.providers.ibmq.runtime to use qiskit_ibm_runtime.QiskitRuntimeService. I guess ...
1 vote
0 answers
36 views

Time Complexity (Big O Notation)

What is the time complexity of the two error-mitigation methods that are implemented in qiskit.ignis. 1- pseudo inverse. 2- least squares.
1 vote
1 answer
25 views

Qiskit: Extract individual Pauli strings from a PauliSumOp

Suppose I have a PauliSumOp as follows: from qiskit.opflow import X, Z, I, Y h = (X ^ X ^ I) + (I ^ Y ^ Y) + (Z ^ Z ^ X) I ...
1 vote
1 answer
26 views

How to get measurement result one by one in qiskit? [duplicate]

For example, run the following code: ...
1 vote
2 answers
41 views

How to find angle for Pauli-Z in U3

What are the angles (lambda, phi and theta) for Pauli-Z gate in U3 ?
0 votes
0 answers
84 views

Qiskit: Kraus decompostion of phase amplitude damping error is not appropriate

The phase_amplitude_damping_error(param_amp, param_phase, excited_state_population=0, canonical_kraus=True) in Qiskit allows only the parameter range $p_a + p_p \le ...
  • 116
1 vote
1 answer
55 views

How to interface stim to a generic qiskit decoder?

I can generate encoder/decoder circuits for arbitrary QECC in qiskit. I tested a number of codes : $[[5,1,3]], [[7,1,3]],[[8,3,3]],\cdots$ and everything seems to work fine. The problem is that the ...
  • 1,390
0 votes
1 answer
31 views

Why does the runtime of Qiskit's job.result() scale with the number of shots?

I have a list of transpiled circuits that I run on Aer.get_backend('aer_simulator'). ...
1 vote
0 answers
52 views

How to factorize a big number using Shor's algorithm with Qiskit

There is codes for only modulus 15 in textbook. (function c_amod15) So I tried to use the function Shor in library (...
  • 11
0 votes
1 answer
29 views

What is the interpretation of the qubit labels when drawing a qiskit circuit with 'with_layout=True'?

When using with_layout=True as argument in qc.draw() where qc is a QuantumCircuit object the ...
1 vote
0 answers
22 views

Implementing controlled rotation for FRQI by using controlled Ry and NOT Gate

I was reading about Flexible Representation of Quantum Images (FRQI) encoding in Qiskit textbook. It says that, given $$\{\theta_0, \theta_1, ..., \theta_{4^{n}-1}\} \quad (\theta_i \in [0,\pi/2])$$ ...
0 votes
2 answers
38 views

What is an instruction when we `add_all_qubit_quantum_error`?

I'm trying to understand how the noise model works in Qiskit Aer noise simulator. From this information page, add_all_qubit_quantum_error() has two required ...
  • 349
1 vote
1 answer
67 views

How do I apply depolarization error on 2 qubits using Qiskit?

I'm trying to apply depolarization error on a 2-qubit circuit using the Qiskit Aer noise module. My question is how can I apply the depolarization error to each of the qubits in my circuit? Does the ...
  • 349
1 vote
1 answer
25 views

Creating a plot of groundstate energy (for a set distance) against noise

I am trying to create a plot of groundstate energy against noise like mentioned in the title. I do this in the aim of finding some sort of correlation between the two meaning I can find what the ...

1
2 3 4 5
35