Questions tagged [qubit]

Wikipedia

26 questions
11
votes
2 answers

What is the difference between a physical and a logical qubit?

What is the difference between a physical and a logical qubit? I hope someone can help me with this question, I can't figure out exactly what the difference is. Best, Dirma
5
votes
1 answer

Can the difference between qubit and bit be explained with a simple code example?

The only places I know that you can play with quantum computing are the google quantum playground and the ibm's quantum experience. While the first one uses qscript and the second qasm languages (which are easy to learn) their usage still do not…
npocmaka
  • 55,367
  • 18
  • 148
  • 187
4
votes
1 answer

Microsoft Liquid: How to show the current quantum state

I am programming quantum algorithms in Microsoft Liquid (F#). For debugging, it would be really nice to see what the current quantum state is. I can use: for q in qs do show "q[%d]=%s" q.Id (q.ToString()) where qs is my list of qubits, but this…
mvdl1996
  • 41
  • 1
3
votes
1 answer

Quantum V gate 1/sqrt(5) ( I + 2iZ)

By definition, the gate 1/sqrt(5) (I + 2iZ) should act on a qubit a|0> + b|1> to transform it into 1/sqrt(5) ((1+2i)a|0> + (1-2i)b|1>) but transformations of each RUS step does the following- The ancillas are in |+> state at first Starting form: …
3
votes
2 answers

Find the length of the array that was passed to you in Q#

I have an operation as follows to which the driver needs to send an array of qubits. operation myOp(qubits: Qubit[]) : () { // uses elements from the qubit array } How do I find the length of this array from within the code?
Mahathi Vempati
  • 1,238
  • 1
  • 12
  • 33
2
votes
1 answer

Errors when using MCMT to create a multi control cz gate and trying to measure

Multi control cz gate: The error is saying that: [Experiment 0] Circuit mcmt contains invalid instructions {"gates": {ccz}} for "statevector" method. , ERROR: Circuit mcmt contains invalid instructions {"gates": {ccz}} for "statevector" method.'
2
votes
1 answer

How does CLR compile Q# code that uses or does not make use of qubits?

If a Q# operation does not use qubits or quatum specific gates, will then the CLR generate bytecode that will be executed by the CPU and not the QPU(quantum processor)?
2
votes
1 answer

Effect of S-gate on one qubit of a combined(maybe entangled) state of 3 qubits

Suppose I have a register(qs) of 3 qubits (first 2 being used solely for control, the last one is the input) . The first two control qubits are in the |+> state and the state of the 3rd input is unknown. Let it be a|0> + b|1>. Now I apply…
1
vote
2 answers

2 entangled qubit gives all states with 25 %

We entangle two quarks; after measurement gives either |01> or |10> with probability of 50%.(regardless of their prior states ,they always give opposite states) when I entangle 2 qubits using Cnot it gives |00> ,|01> ,|10> ,|11> all with 25%…
Ayan Bhunia
  • 479
  • 3
  • 14
1
vote
0 answers

How can I find the partial transpose for three qubit density matrix usign mathematica?

I know that the density matrix of a three-qubit is an 8x8 matrix. How can I use Mathematica to find the partial transpose of this 8x8 matrix with respect to the first, second, or the third qubit?
Bekaso
  • 135
  • 5
1
vote
1 answer

Reason for the exponential speed-up expected from quantum computers

In quantum computers those 2 effects should be seen: 1) If an operator acts on an arbitrary QuBit Qn of a quantum system S consisting of several QuBits than we get a new quantum system S' where the amplitues of ALL QuBits have changed. 2) If an…
1
vote
1 answer

Can you send a subarray of qubits as a parameter in Q#?

Is it possible to send array slices of qubits as parameters? Something like this: using(q : Qubit[5]){ myOp(q[2:3]); }
Mahathi Vempati
  • 1,238
  • 1
  • 12
  • 33
0
votes
0 answers

Plotting Superposition of Qubits on a Bloch Sphere in Qiskit

I've been trying to plot the state $\frac{|0>-|1>}{\sqrt{2}}$ using Qiskit. As a result, I need to apply the NOT gate on $|0>$ to get $|1>$ and then apply the Hadamard gate on $|1>$ to get the required state. Here's my code - from qiskit import…
0
votes
1 answer

Quantum: Define superposition as linear combination of orthonormal basis

I'm testing a code for define a superposition state using a percentage of both basis. All seems to run well, when the linear percentage is real. But it fails when the percentage is complex parameter. from cmath import sqrt from typing import List,…
Sourcerer
  • 1,891
  • 1
  • 19
  • 32
0
votes
1 answer

Measurement of unentangled qubits

If I have two independent (unentangled) qubits, let's say one in state |1> and the other one in some superposition state with equal amplitudes and arbitrary phases. If I measure the qubit that is in the superposition state (and let's say get 0), it…
1
2