giri
  • Member for 2 years, 2 months
  • Last seen more than a week ago
  • Bengaluru, Karnataka, India
when we specify quantum states in $\mathbb C^2$, why do we only have $2$ basis states?
Accepted answer
6 votes

Clearly this pair of basis is not an orthonormal basis of $C^2$... $\{\lvert0\rangle,\lvert1\rangle\}$ is an orthonormal basis of $C^2$. $C^2$ is a 2-dimensional complex vector space, which means ...

View answer
How can I create an arbitrary superposition state of two qubits in Qiskit?
Accepted answer
5 votes

qiskit.quantum_info has a useful random_statevector function that you can use to generate a random statevector that's sampled from the uniform measure. For a 2-qubit state, you would call it as ...

View answer
Decomposition of $|110\rangle \leftrightarrow |000\rangle$ Exchange Gate
4 votes

Adding to @DaftWullie's answer, If you're only looking to implement a gate in Qiskit that swaps $\lvert000\rangle$ and $\lvert110\rangle$ without worrying about the underlying gates, the easiest way ...

View answer
How to understand intuitively the Grover diffusion operator?
2 votes

Like @Jonathcraft mentioned, the diffusion operator inverts the probability amplitudes about their mean. What is equally important to note is that the inversion about the mean is the same as a ...

View answer
Can I get the job variable from the job_id?
Accepted answer
2 votes

I take it you're running the jobs on an IBMQ backend and not one of the local simulators. If so, just keep track of job_id, then use the retrieve_job function to retrieve the job at a later point in ...

View answer
How to plot histogram using statevector simulator?
Accepted answer
2 votes

It's a little difficult to tell without looking at your circuit, but I believe this is because your circuit contains a measurement in it. (edit: if there were no measurements the qasm simulator wouldn'...

View answer
Implementing Partial Trace in IBMs quantum computer
Accepted answer
1 votes

qiskit.quantum_info has a partial_trace method you can use for this. It takes as input either a Statevector or a DensityMatrix object. Both these classes implement the from_instruction routine that ...

View answer