All Questions
144 questions
1
vote
0
answers
41
views
Quantum register for variable store - how to encode operations?
Suppose I have a lot of classic variables of a certain number of bits in size, say, 8 bits. Instead of starting each variable from zero in superposition, I want to use the exponential space to encode ...
1
vote
1
answer
76
views
Where are quantum register operations defined?
Suppose I have three registers of many qubits, $$x, y, r$$
I want to define a quantum gate mapping the sum of $x$ and $y$ to $r$, or more generally from any operation over $x$ and $y$ to $r$. The ...
0
votes
0
answers
37
views
How to generate random quantum states in matlab?
I was wondering if there is some academic standard/any way of generating random n times n q-states/density matrices in Matlab without using any other package then QETLAB.
1
vote
1
answer
58
views
Computing expectation of a SparsePauliOp using StateVector
I have a SparsePauliOp object $H$ acting on $N = 21$ qubits, and a statevector $|\psi \rangle$ acting on $N=21$ qubits. I need the expectation of $H$ using this state $|\psi \rangle$: $$\langle H \...
3
votes
1
answer
88
views
How to calculate guessing probability for quantum key distribution?
There are 3 Projections $P_1$, $P_2$, and $P_3$ corresponding to 3 inputs $x = 1, 2, 3$ for Alice. Similarly, the same projections are used by Bob for $y = 1, 2, 3$. Each input has 2 outcomes, $a = 1, ...
1
vote
1
answer
140
views
How does qiskit implement a given superposition in the actual quantum computer?
My question is phrased in 2 parts:
Is there a quantum circuit to implement the following 4-qubit state: $$\frac{1}{2}(|1000 \rangle + |0100 \rangle + |0010 \rangle + |0001 \rangle)$$
When we use the ...
2
votes
1
answer
141
views
Finding Eigenvectors of a Unitary in a Quantum circuit
I have a unitary gate $U$, which is applied on some $n$-qubit quantum circuit ($n=7$ for my scenario). I wish to find the $n$-qubit state, which is the eigenvector (and possibly eigenvalues) of this ...
1
vote
0
answers
60
views
is this a novel approach to visualization of qubits?
I am currently working on my Bachelor's Thesis and would love to hear your opinions about my project.
The idea is to visualize the Binary parts of complex qubit states.
White lines represent binary 0, ...
2
votes
1
answer
46
views
How to apply gates on a subspace of a superposition of qubits?
Let us say that I have the state $a|00\rangle + b|01\rangle + c|10\rangle + d|11\rangle$. I wish to apply a one-qubit unitary (a $2\times2$ matrix) U on the subspace spanned by $|01\rangle$ and $|10\...
2
votes
1
answer
76
views
weird negative sign in a state vector in qiskit
I run the following simple code in qiskit, which get statevector of a quantum circuit.
...
0
votes
1
answer
169
views
How to implement a depolarizing noise channel for qutrits using cirq?
Anyone have any idea how I can implement a depolarizing noise channel for qutrits using cirq? Say using the kraus operators within a class inheriting from cirq.Gate or so?
2
votes
2
answers
79
views
Can save_statevector() be used on a real quantum computer?
In a real quantum computer, can the save_statevector function be used to obtain the state vector of a circuit? I attempted to run the following code on a real ...
1
vote
1
answer
213
views
How to represent unitary evolution in Python?
How to represent $U(t)$ (a unitary operator) in a code? Is there any package available for that in Python?
1
vote
2
answers
195
views
How to generate the Bell state $\frac{1}{\sqrt{2}}(|01\rangle+|10\rangle)$ from the state $|00\rangle$ using Qiskit?
I want to generate the Bell state $(|01\rangle+|10\rangle)/\sqrt{2}$ from the state $|00\rangle$ in qiskit, applying the Hadamard gate followed by the $\text{CNOT}$ gate.
But it generates $(|11\rangle-...
0
votes
2
answers
335
views
How can I get the state of my quantum circuit like save_statevector() in qiskit 1.0.2?
Just as the title, I want to get the state of my quantum circuit when running simulation locally with fake provider. But I cannot use save_statevector since Aer has been removed from qiskit. My code ...
2
votes
2
answers
217
views
How to create a qudit of any dimension $d$ in qiskit?
How to create qudit, not qubit (which is a special case of qudit with $d = 2$) in qiskit of any dimension $d$?
Actually, I searched this on chatgpt, but not-so-helpful info was found. It just uses ...
2
votes
0
answers
56
views
Implement Phase disk in Qiskit
I'm new to qiskit and looking to enhance my output with visualization. Specifically, I'm interested in using the Phase Disk visualization, similar to the one shown in the image below. Can anyone ...
1
vote
1
answer
95
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}{...
1
vote
2
answers
175
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 ...
1
vote
1
answer
95
views
Phase shift on qiskit quantum teleportation simulation
I wonder in Qiskit why the phase shift occurred in my simulation and how I can turn it off.
I posted another question regarding the same simulation here, and while I tried to solve this on my own, I ...
2
votes
1
answer
150
views
Problems trying to plot the classical Fisher information with Pennylane
I'm working with pennylane. My goal is to plot CFI(Classical Fisher Information)with following quantum state.
With the above equation I set gamma as 0. Then It becomes:
If gamma is not equal to zero,...
1
vote
1
answer
63
views
2
votes
1
answer
94
views
What are the theoretical minimum times for quantum and classical logic gates?
I'm interested in better understanding the ultimate limits on how fast quantum and classical logic gates can be performed. Based on principles like the time-energy uncertainty relationship, there ...
1
vote
0
answers
53
views
Converting Qubits to +-1/2 Spin System for Expectation Value Calculation
I have a quantum system that consists of spin states with eigenvalues of +-1/2. However, in quantum computing, qubits are typically represented as states |0⟩ and |1⟩. I want to calculate the ...
1
vote
0
answers
153
views
What is an initial state of a qubit in PennyLane?
I just started trying to use the PennyLane Python package. It seems like the default.qubit device initializes each wire as an up-spin qubit. However, I am not ...
1
vote
1
answer
181
views
How does grid or ring (coupling map topology) affect the depth of the circuit?
Why does different grid maps have different depths, i.e why does a 10x10 grid has more depth than 10x3. Also how does topology affect the depth?
0
votes
2
answers
339
views
Is amplitude encoding a form of performing QRAM?
I'm still confused about what a QRAM should be.
Is amplitude encoding a form of performing QRAM? Or are they related in a way ?
What is today's state of the art about QRAM ?
0
votes
1
answer
282
views
How to decompose the following circuit using just CX and U3 gate?
I am trying to decompose the following circuit using just the CX gate and U3 gate.
This is because IBM uses CX and U3 gates as basis states and trying to understand the same. Is there a function that ...
1
vote
2
answers
96
views
Sorting two numbers using quantum computing
To better understand how quantum computing works, I am trying to sort two numbers using unitary matrix. Based on this definition, I understand a quantum Turing machine to have the automorphism (...
1
vote
0
answers
64
views
How to check the jmat operators on Qutip?
I'm trying to reproduce this Qobject form Qutip
https://qutip.org/docs/latest/guide/guide-tensor.html#a-two-level-system-coupled-to-a-cavity-the-jaynes-cummings-model
but, I'm using the Jmat ...
1
vote
1
answer
30
views
Operating Hamiltonian on discrete variable state [closed]
I have a hamiltonian consisting of combinations of a and a(dragger). i need to act this on discrete variable state like |0,0,0,1> and so on. Is there any library to do these kinds of operations?
4
votes
2
answers
146
views
How to check a given unitary evolution is correct in a real quantum computer in Qiskit?
For a given unitary, I want to know whether this unitary gate is correctly evolved in the circuit. In the simulator, I can use "statevector" to get the state vector to check the correctness ...
3
votes
1
answer
191
views
Entangling two non-physically adjacent qubits
Entanglement can be performed just between two ** adjacent qubits** (e.g. 1 and 2) or even non-physically adjacent qubits on the processor architecture can be entangled (e.g. 2 and 6).
How entangled ...
2
votes
2
answers
271
views
In what state is this 3-qubit state?
So, I have a state of three qubits that is in one of the states below, with $\omega=e^{i\frac{2\pi}{3}}$:
$$|\psi_0\rangle=\frac{1}{\sqrt 3}(|100\rangle+\omega^2|010\rangle+\omega|001\rangle),$$
$$|\...
1
vote
2
answers
350
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
1k
views
Pennylane: take qml.state of one function and use it as the initialization for another
In Pennylane, I created a function to set the initial parameters of my qubit, and then called qml.state() to return the output. I now want to feed this initialization into another circuit, but I'm not ...
4
votes
1
answer
98
views
Symbolic library for qubit states
Is there any symbolic package (in Python or Julia, for example) that can represent qubit state coefficients symbolically?
For example, let's assume we have an initial two-qubit state:
$$ | \psi \...
1
vote
1
answer
94
views
Qubit reset using Grover iteration
Suppose I’m building a long circuit and I need to reuse a qubit from a previous step but I don’t want to use the reset operation (or I’m not using an IBM computer so I don’t even have the reset option)...
0
votes
1
answer
122
views
Expectation values of non-local operators in Qiskit
Is there a convenient way in Qiskit to calculate the expectation value for a non-local operator, i.e. I would like to calculate:
$$ \langle \Psi|O|\Psi \rangle $$
More precisely, I would like to ...
1
vote
0
answers
33
views
How to read data from multiple qubits and feed it to a MLP
Being new in the field of quantum computing, I tried with the implementation of "https://qiskit.org/textbook/ch-machine-learning/machine-learning-qiskit-pytorch.html" using a single qubit. ...
4
votes
1
answer
776
views
How to represent a statevector in Dirac notation form using Qiskit?
I am learning from qiskit textbook, and I was wondering how may I get a statevector of the following form:
$$ \frac{\sqrt{2}}{2}|00\rangle + \frac{\sqrt{2}}{2}|10\rangle $$
If I run code for this in ...
2
votes
0
answers
59
views
A path towards building quantum Computing graduation project for undergraduates
I need help. I'm a computer science student with a Data science major. I have a final graduation project this year. With that, I want to create a project in the Quantum computing field. I'm already ...
2
votes
0
answers
170
views
Add a negative phase to selected states
I have $n$ qubits in superposition. I want to add a negative phase to all states with more than $m$ $1$s, e.g. for $n=3$ qubits and $m=1$ I want to get:
$\frac{1}{\sqrt{N}}(|000\rangle + |001\rangle + ...
2
votes
3
answers
338
views
Is there any way to always output |1> if the measurement has a probability to output 1?
Let's say I have an oracle that outputs 1 on a specific input (there can be multiple inputs x so that f(x)=1), else it outputs 0.
If there is no such input so that f(x)=1, the quantum state of the ...
1
vote
1
answer
1k
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 ...
0
votes
1
answer
51
views
Applying an S gate on which two states leaves the state unchanged
I was going through a guide given by my friend and it had this MCQ which I couldn't get the answer to.
Applying an S gate on which two states leaves the state unchanged?
|0 >
|+ >
|1 >
|- &...
3
votes
1
answer
380
views
Performance metrics in QSVM
I have implemented QSVM on breast cancer dataset using link: "https://qiskit.org/documentation/stable/0.24/tutorials/machine_learning/01_qsvm_classification.html" but unable to compute other ...
1
vote
1
answer
299
views
Converting data into a SHA256 hash using Qiskit quantum computer
I was wondering how can we convert data into a hash using Qiskit quantum computer? e.g, this code below will generate a SHA256 hash based on random data.
...
1
vote
2
answers
110
views
How is the ket of a quantum state calculated in this code?
For the following code
qc = QuantumCircuit(2)
qc.h(1)
qc.cx(1,0)
ket = Statevector(qc)
ket.draw()
the output will be the following:
...
4
votes
0
answers
240
views
How to implement a gate that generate a uniform superposition of all permutation of element
I'm looking for a quantum circuit that permits generating a uniform superposition of all possible permutations for example if we have as input $|0123\rangle$ the output will be the uniform ...