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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

About how to use the save_density_matrix function in qiskit to visualize the density map of some qubits

https://fr.answacode.com/quantumcomputing/20894/enregistrement-du-vecteur-detat-sur-plusieurs-emplacements-dans-un-circuit-quant The above is a rare reference document about save_density_matrix, but ...
user avatar
  • 159
0 votes
1 answer
35 views

How to select parts of qubits for visualization

This is an experiment. I drew a multi-qubit circuit, but I only need to visualize the qubits 0-3 in the end, that is, use the plot_state_city function, but it seems that something went wrong, and the ...
user avatar
  • 159
0 votes
1 answer
26 views

How I determine the number of units of input and the number of units of output TwoLayerQNN?

I have 2 Linear layers: nn.Linear(64, 10) and nn.Linear(5, 2). I want to add TwoLayerQNN between these 2 linear layers above. How can I set up properly? I saw this example but something is not ...
user avatar
0 votes
1 answer
40 views

How can I plot a complex alpha in qiskit?

I'm new at QC, and one of the Qiskit quick exercises asks me to plot this ($j$ is the imaginary unit): $\frac{1}{\sqrt{2}} \begin{bmatrix} j\\1\end{bmatrix}$, so I deduced $\alpha=j$ and beta= 1. I ...
user avatar
  • 3
1 vote
1 answer
46 views

Invalid option cuStateVec_enable

I was trying to use qiskit with cuQuantum. And was able to build Qiskit Aer with cuQuantum without any errors, but cuStateVec is still not used for simulations. When I pass the ...
user avatar
3 votes
1 answer
39 views

How to actually send Qiskit code to the que to be ran on an IBM Quantum Computer?

Apologies for what I feel is a very simple question, So I've figured out how to work with simulating a quantum circuit in Qiskit, but now I'm trying to figure out how I would actually send the code to ...
user avatar
0 votes
0 answers
32 views

How to solve the problem when the circuit depth and width are deepened during qiskit simulation

Simulation failed and returned the following error message: ERROR: a circuit requires more memory than max_memory_mb. Traceback (most recent call last): Input In [5] in <cell line: 4> counts = ...
user avatar
  • 159
2 votes
1 answer
81 views

How can I know the number of qubits used in a job in qiskit?

How can I know the number of qubits used in a job in qiskit? I can always do something like ...
user avatar
2 votes
0 answers
69 views

What phase should I expect from pauli X?

Here's an example I found that implements the phase estimation algorithm: Here the eigenvector is initialized to the $|+\rangle$ state, which is an eigenvector of Pauli X with eigenvalue 1. The ...
user avatar
  • 305
1 vote
1 answer
56 views

Get probabilistic state of a quantum circuit using Ry gate

Starting with a 2 qubit (each initialized as $|00\rangle$) I need to apply an $R_y(\theta)$ gate to get the following probabilistics: 24% $|00\rangle$ 56% $|01\rangle$ 6% $|10\rangle$ 14% $|11\...
user avatar
  • 11
1 vote
0 answers
9 views

When physically implementing superposition in a Transmon, what is the actual driving amplitude used in the microwave pulses by Qiskit?

I had been playing around with Qiskit Pulse, and I managed to run several single qubit circuits, however throughout these processes, I recurringly came across the driving amplitude and the signal ...
user avatar
2 votes
1 answer
88 views

A fundamental question on multiple rotation of a qubit using $SU(2)$

I am trying to implement qubit rotations using $SU(2)$ from scratch in order to understand and debug what happens under the (physical) hood. The reason why gates and high-level APIs are omitted here ...
user avatar
1 vote
2 answers
53 views

Why does Parity mapping allow 2 qubit reduction?

when mapping from fermionic to qubit hamiltonian, using Parity mapper allow us to reduce 2 qubit in the final hamiltonian. I would like to understand which kind of symmetries are being used and how it ...
user avatar
  • 113
2 votes
0 answers
91 views

Can we teleport an arbitrary two-qubit state? [duplicate]

Can we teleport a quantum register $a\left|00\right> + b\left|01\right> + c\left|10\right> + d\left|11\right>$ ? How can I visualize the output for this? I was looking at the https://...
user avatar
  • 41
0 votes
0 answers
26 views

Use qiskit calibration data for noisy simulation in Qutip

Is it possible to illustrate an example code in which a quantum circuit is taken as an input and the qiskit backend properties are feed to a custom compiler to perform noisy simulation using QuTip? ...
user avatar
  • 181
1 vote
1 answer
38 views

How to adapt TSP to solve currency arbitrage

I came across Qiskit's 'Max-Cut and Traveling Salesman Problem' and would like to adapt it to currency arbitrage problem. I have assigned currencies as nodes in the code below, and written the ...
user avatar
  • 31
2 votes
1 answer
18 views

How to initialise own values instead of using Tsp.create_random_instance

In Qiskit's tutorial 'Max-Cut and Traveling Salesman Problem', below code is used to create the nodes: tsp = Tsp.create_random_instance(n, seed=123) What ...
user avatar
  • 31
0 votes
1 answer
28 views

Hadamard on first qubit for two qubit state doesn't output what it should on Qiskit

I'm using python qiskit==0.36.2. The following code: ...
user avatar
0 votes
1 answer
66 views

I am getting an error like this 'Invalid input data format for Statevector'

I am new at QC. I learn from a course. When I write to this code: ...
user avatar
  • 3
3 votes
1 answer
71 views

Noise model correspondence to qiskit implementation for $CNOT$ gate

My question especially relates to the CNOT because I'd like to carefully understand how Qiskit simulate a CNOT model. Specifically, from my understanding, two independent qubits are affected by a ...
user avatar
2 votes
1 answer
50 views

How can I write if conditions on quantum registers using qiskit

There is a quantum register measured to state $\left|00\right> $ How can i write a code to check weather the first qubit in measured state is 1 or zero and if 1 do some operations or if 0 do other ...
user avatar
  • 41
2 votes
1 answer
42 views

Readout Error in Qiskit: What is a reasonable model?

The Readout Error in Qiskit is described here: https://qiskit.org/documentation/stubs/qiskit.providers.aer.noise.ReadoutError.html Although it is easy to obtain such an error for 1-qubit for IBMs ...
user avatar
  • 505
1 vote
2 answers
126 views

How to write a code to separate two qubits?

Is it possible to write a code to separate $\left|01\right> $ as $\left|0\right> ,\left|1\right> $ or are there any circuits i can use to get output like that?
user avatar
0 votes
1 answer
82 views

How to calculate the sum of $\sum\limits_{j}{\langle A|{{B}_{j}}\rangle |{{C}_{j}}\rangle }$ with quantum circuits?

How to calculate the sum of $\sum\limits_{j}{\langle A|{{B}_{j}}\rangle |{{C}_{j}}\rangle }$ with quantum circuits by qiskit, where $\sum\limits_j \langle A| B_j\rangle |C_j \rangle$, $A,B_j,$ and $...
user avatar
  • 159
3 votes
2 answers
158 views

QuantumCircuit with list of qbits as an argument

How to create a variable qbit QuantumCirciut like this ? I need to put v list on QuantumCircuit() method ...
user avatar
2 votes
1 answer
63 views

Is there a name for a gate that 'moves' one qubit to a new position via multiple SWAP gates?

Let's say there is a qubit at position $i$, and I want to move it to position $i'$. Without loss of generality, let's say $i < i'$. By 'move it' I mean, perform multiple $SWAP$ operations so that ...
user avatar
2 votes
0 answers
46 views

Qiskit QRAM encoding classical data into quantum state

I'm having trouble to encode classical data into quantum state in Qiskit IBM Quantum Lab. Let me explain the problem clearly: For university purpose I have to encode two 4-dimensional vectors with ...
user avatar
2 votes
0 answers
25 views

How can I evaluate the weights of different shares in a portfolio optimization problem?

I'm trying to do a comparison between the classical way to do portfolio selection with Markovitz and the quantum counterpart. With Markovitz I'm able to generate an output representing the best ...
user avatar
1 vote
1 answer
36 views

Qiskit: Get number of iterations for Iterative Amplitude Estimation

Trying to count the number of uses of my circuit $A$ in Grover iterate circuit $Q= -AS_0A^{\dagger}S_x$. However, Qiskit's amplitude estimation algorithms such as IAE or FAE accept only precision ...
user avatar
  • 75
2 votes
1 answer
46 views

what's the point of the first barrier in this circuit?

Does the barrier here won't simplify the circuit between the two H-gates?
user avatar
2 votes
2 answers
51 views

QV circuits fail to execute in real devices

I tried to change a little the code here for running the quantum volume circuits in real devices. My code is ...
user avatar
1 vote
1 answer
46 views

Can someone explain to me what is T gate and tdg like im five?

I'm newbie to quantum computing, i read about these two gates on IBM quantum computing docs, but I can't seem to understand what is t-gate and tdg or t-dagger, can someone give me a simple explanation ...
user avatar
0 votes
1 answer
44 views

Subsystem Composition in Qiskit

I am reading Subsystem Composition in Qiskit Tutorial "Operators" https://qiskit.org/documentation/tutorials/circuits_advanced/02_operators_overview.html#Subsystem-Composition ...
user avatar
  • 23
1 vote
1 answer
31 views

Implementing Readout Error in my circuit seems to have no effect whatsoever

I am trying to perform a simulation using Qasm in order to see how the readout error actually affects my circuit. The circuit I am implementing is a trivial one, the three qubit one that implements ...
user avatar
  • 505
1 vote
1 answer
43 views

CNOT chain vs CNOT fountain in qiskit

I was going through qiskit's synthesis module, their methods take an argument called cx_structure which has two possible values, ...
user avatar
0 votes
0 answers
68 views

Grovers algorithm: Diffuser on a state that isn't a linear superposition of all possible states

I've been trying to get Grover's algorithm to work, where part of the qubits have been measured, before Grovers is iterated. I have found a circuit that works, but I don't get why it does. I have ...
user avatar
4 votes
1 answer
100 views

Train a quantum circuit whose parameters are not the input (Qiskit/PyTorch)

I was trying to write a more elaborate circuit based on Qiskit's tutorial here: https://qiskit.org/textbook/ch-machine-learning/machine-learning-qiskit-pytorch.html When I came to the training part, I ...
user avatar
0 votes
2 answers
55 views

Raising Pauli Gate to power gives TypeError: unsupported operand type(s) for ** or pow(): 'complex' and 'ParameterVectorElement'

I am trying to implement a parameterised circuit in qiskit. Part of the circuit includes the operation $(X \otimes X)^\alpha$ where $X$ is the standard Pauli-X gate, $\otimes$ is the tensor product, ...
user avatar
2 votes
1 answer
85 views

For the same operator, when I use qiskit's VQE and QAOA solutions, the results are completely different

Specifically, I can't get the correct result using QAOA,A total of 6 qubits were used in this work,this is part of my code using VQE and QAOA localsim = BasicAer.get_backend('qasm_simulator') ...
user avatar
  • 21
3 votes
1 answer
99 views

How to estimate Qiskit circuit runtime before sending to run on IBM real quantum device?

Qiskit, I tried to estimate circuit runtime using gate_length from Backend.properties() but its accuracy is very low (real system is 3.5 seconds, estimation is 0.00002 seconds). So, are there other ...
user avatar
1 vote
1 answer
61 views

Qiskit: Mismatch between run_config.parameter_binds and all circuit parameters

I am trying to run the following circuit: ...
user avatar
0 votes
1 answer
25 views

Using QDRIFT on qiskit

I was recently trying to use Qiskit's inbuilt QDRIFT to construct a circuit for a simple Hamiltonian $H = XX + YY$. but I'm having an issue converting the result of ...
user avatar
1 vote
1 answer
29 views

Raise tensor product to float power in qiskit

I am trying to implement the gate $(X \otimes X)^\alpha$ where $X$ is the standard Pauli-X gate, $\otimes$ is the tensor product and $\alpha$ is a real number. Is there a way to implement this in a ...
user avatar
1 vote
1 answer
43 views

What’s the difference between the DriveChannel and the Control Channel?

In my incredibly elementary understanding of superconducting qubits, a qubit is an LC circuit where the inductor has been replaced with a Josephson junction. In this system, microwave pulse operations ...
user avatar
2 votes
1 answer
77 views

How to use a Quantum input in a VQC in Qiskit?

I am currently working on a project about Quantum Image Encoding, mainly with FRQI and NEQR algorithms. These codification methods use different circuit architectures (and not only parameters) ...
user avatar
  • 21
2 votes
1 answer
81 views

Choosing a different optimizer when running QAOA in qiskit

I am trying to reproduce the QAOA example from https://qiskit.org/textbook/ch-applications/qaoa.html and learn how to opt for a different optimizer. The relevant block in the example is (towards the ...
user avatar
  • 505
1 vote
0 answers
11 views

DIMACS Examples with few variables

I am currently working on an SAT Solver using quantum computing. However, since current quantum computers are limited to a few qubits, I am in need of examples ranging from 4-30 variables. I know of a ...
user avatar
1 vote
0 answers
18 views

Azure quantum error message

I am using the IonQ QPU on the Azure quantum provider with a Google Cloud API to access the native gates. As you can see in the image attached, I got this error: ...
user avatar
  • 284
1 vote
0 answers
49 views

Quantum AND† gate

In the paper Implementing Grover oracles for quantum key search on AES and LowMC, the authors use a different construction of AND gate and its adjoint rather than the Toffoli gate to decrease the T-...
user avatar
1 vote
1 answer
57 views

How well different featuremap encode the data?

Recently, I was doing research on QML. Qiskit gave detailed steps on how to encode data into quantum states, but I was confused about one point: there are different feature mapping methods under ...
user avatar

1
2
3 4 5
31