7

Firstly simply rewrite probability amplitudes of returned states as columns of a matrix: $$ U = \begin{pmatrix} \frac{1}{\sqrt{2}} & \frac{1-i}{2} \\ \frac{1+i}{2} & -\frac{1}{\sqrt{2}} \end{pmatrix} $$ Now do some algebra $$ U = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & \frac{1-i}{\sqrt{2}} \\ \frac{1+i}{\sqrt{2}} & -1 \end{pmatrix} = \frac{1}{...


6

Superposition is a basis dependent concept. Namely the $|0\rangle$ and $|1\rangle$ states are commonly said not to be superposition states exactly because one of the two coefficients in the $\{|0\rangle,|1\rangle\}$ basis expansion is zero. However, using the x-basis representation, $\{|+\rangle, |-\rangle\}$ one finds $|0\rangle = (|+\rangle + |-\rangle)/\...


5

Prepare a qubit in state $|\psi\rangle=\mathrm{cos}\frac{\theta}{2}|0\rangle+\mathrm{e}^{i\phi}\mathrm{sin}\frac{\theta}{2}|1\rangle$, given the angles $\psi$ and $\theta$. Let's start with a qubit in the $|0\rangle$ state, as is customary for Q#. You can use one of the general library operations to prepare the state, such as PrepareArbitraryState. Or you ...


4

Just to expand on the detail of why writing out the columns works: Start by writing the action of the unitary: \begin{align*} U|0\rangle=\frac{1}{\sqrt{2}}|0\rangle+\frac{1+i}{2}|1\rangle \\ U|1\rangle=\frac{1-i}{2}|0\rangle-\frac{1}{\sqrt{2}}|1\rangle \end{align*} Before proceeding, it's always worth checking that both sides are correctly normalised. In ...


4

The Hadamard gate is described by this matrix \begin{equation} H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \end{equation} Conjugate transpose of $H$ is again $H$. Hence we have to check if $HH$ is $I$. Multiplication goes as follows ($h_{ij}$ denotes elements of resulting matrix): $h_{11} = 1\cdot1 + 1\cdot1 = 2$ $h_{12} = 1\...


3

The $|+⟩$ and $|-⟩$ are states given by the following decomposition in the Z-basis: \begin{equation} \begin{aligned} |+⟩ &= \frac{1}{\sqrt{2}} \Big(|0⟩ + |1⟩\Big)\\ |-⟩ &= \frac{1}{\sqrt{2}} \Big(|0⟩ - |1⟩\Big) \end{aligned} \end{equation} As from quantum mechanics, you can see that there's a 50% chance for both states to be found in the |0⟩ or |1⟩ ...


3

Mixed states are represented by vectors inside Bloch sphere. Suppose you have mixed state with density matrix $$\rho=q|\psi\rangle\langle\psi| + (1-q)|\phi\rangle\langle\phi|$$ where $|\psi\rangle$ and $|\phi\rangle$ are pure states with vectors $\overset{\rightarrow}{r_{\psi}}$ and $\overset{\rightarrow}{r_{\phi}}$ on Bloch sphere, and $0<q<1$; then ...


3

It is known that: $$ \left| 0 \right\rangle = \frac{1}{\sqrt{2}} \left( \left| + \right\rangle + \left| - \right\rangle \right) \qquad \left| 1 \right\rangle = \frac{1}{\sqrt{2}} \left( \left| + \right\rangle - \left| - \right\rangle \right) $$ By substituting in the initial state: $$ \left| \varphi \right\rangle = \frac{i}{\sqrt{3}}\left| 0 \right\rangle ...


3

This can be done using the statevector_simulator provided with Qiskit Aer. It will return the statevector that describes the quantum state at the end of your circuit. It can be used in the same way as the qasm_simulator, only your circuit shouldn't have measurement gates at the end. There is more information about this simulator in this tutorial.


3

In last time there is a lot of questions how to find $\theta$ and $\phi$ for this particular state on Bloch sphere: $$ \left| \varphi \right>=\frac{1+i}{\sqrt{3}} \left| 0 \right> + {\sqrt{\frac{1}{3}}} \left| 1\right> $$ I will try to demonstrate how to do so in more details in comparison with previous answer. Generally, a quantum state can be ...


2

If first qubit is $|1\rangle$ there is no other possibility than second qubit to be $|1\rangle$ as well since probability of state $|10\rangle$ is zero. Hence probability of measuring $|1\rangle$ in second qubit is $1$. In case first qubit is $|0\rangle$ there are two possibe results: $|00\rangle$ or $|01\rangle$. Since probability of state $|00\rangle$ is ...


2

You have normalized state $$|\psi\rangle=\alpha|0\rangle + \beta|1\rangle$$ First, write the state as $$|\psi\rangle=\frac{\alpha}{|\alpha|}\left({|\alpha|}|0\rangle + \frac{\beta|\alpha|}{\alpha}|1\rangle\right)$$ The factor $$\frac{\alpha}{|\alpha|}$$ is a global phase and not important. Now you have $$\cos{\frac{\theta}{2}}=|\alpha|$$ which gives the ...


2

See below: $$\left| \varphi \right>=\frac{1}{\sqrt{\sqrt{2}}}\left(\left(\frac{1+i}{\sqrt{2}} \right)\left| 0 \right> + \left| 1\right>\right) = \frac{1+i}{\sqrt{\sqrt{2}}}\left(\frac{1}{\sqrt{2}}\left| 0 \right> + \frac{1}{\sqrt{2}}\frac{1-i}{\sqrt{2}} \left| 1\right>\right) = \frac{1+i}{\sqrt{\sqrt{2}}}\left(\cos(\pi/4)\left| 0 \right> + \...


2

$$ \left\langle a| b \right\rangle= \begin{pmatrix} {1} & {1} & {1} \ \end{pmatrix} \begin{pmatrix} {1} & {2} & {k} \ \end{pmatrix} $$ Since the two vectors are orthogonal,so the inner product of them is zero: $$ 0=1+2+k \\ k=-3 $$


2

Standard inner product on space $\mathbb{C}^{n}$ is defined as $$ \langle a|b \rangle = \sum_{i=1}^{n} a_{i}b_{i}^{\dagger}, $$ where $b^{\dagger}$ is complex conjugate (i.e. for $x \in \mathbb{C}$: if $x = x_{re} + ix_{im}$ then $x^{\dagger} = x_{re} - ix_{im}$). In your case $a_{1} = \cos(\theta)$ and $a_{2} = i\sin(\theta)$. Since you are interested in ...


2

First you need eigenvalues; $$X=\begin{pmatrix} 0&1 \\ 1&0\end{pmatrix}$$ so you need to solve equation $$\begin{vmatrix}0-\lambda &1 \\ 1 &0-\lambda\end{vmatrix}=0$$ or $$\lambda^2-1=0$$ which gives eigenvalues $$\lambda_{1,2}=\pm 1$$ Since $X$ is Hermitian, eigenvalues are real. Now you can find eigenvectors; for example, for the first ...


1

You asked "What is wrong in my calculation?" My guess is that your mistake is in forgetting that $\langle \psi | = \cos{\theta}\langle 0| - i \sin{\theta}\langle 1|$ instead of $\cos{\theta}\langle 0| + i \sin{\theta}\langle 1|$ (because $i$ becomes $-i$ when you take the complex conjugate).


1

Yes, the state of a qubit can be described by a point inside the Bloch sphere. However, you cannot use the state vector formalism to describe it, you have to generalise to the concept of mixed states. For a qubit, these have three parameters: the two angles and the length of the vector.


1

If you have one parameter (one $\theta$) for both circuits then I think the first one is better... they are doing the same job, but the second one is creating extra gates. So the first one will be faster and will have fewer errors because there are fewer gates in the first circuit. But if you are obtaining the second circuit with two parameters (two ...


1

$\newcommand{\ket}[1]{\lvert #1\rangle}\newcommand{\PP}{\mathbb{P}}$Given an arbitrary state $\ket a$, let us write the corresponding density matrix/projector as $\PP_a$. Any such density matrix can be decomposed using a basis of Hermitian traceless operators (think the Bloch sphere representation for qubits) as $\PP_a\equiv 1/2(I + \sum_i a_i\sigma_i)$, ...


1

The return from result.data(qc) is information about the result of running the circuit qc. In your example, there are 2 pieces of information returned - the statevector and the counts. The statevector is a way of describing the state of the qubit, and the result contains the statevector from the end of the circuit. Each of the arrays in the overall array ...


1

Intraphoton entanglement uses the degrees of freedom from one photon only to create entanglement. So, here either polarization and linear momentum or polarization and angular momentum can be used to create entanglement. Interphoton entanglement is the entanglement created between 2 spatially separated photons. So, naturally latter is less stable than former. ...


Only top voted, non community-wiki answers of a minimum length are eligible