# Tag Info

2

Generally you have to perform the addition modulo some constant; you can't grab another qubit if you need to overflow. Code for modular addition of a constant is available in the Increment.qs file in the Q# standard library, in the IncrementByInteger operation. Check out the documentation here.

0

There are definitely ways to do this; the first one I could find is described in this paper by Thomas Draper (page 6).

-1

I don't know the answer to this question but I will try to put my thoughts. Why do you want to add a number to a state? A state is unknown untill it is measured. and in your equation the sum of squares of probabilities is 2, how could that be possible. A classical 5 means 101 which means presence, absence, presence of electrons(not electron or photon). ...

2

In general, the answer is that you need to find the irreducible representation (irrep) structure of the algebra generated by $\{M_1,M_2,...\}$. This will tell you what the commutant of the algebra looks like (commutant = {all operators that commute with all operators of the algebra}) . Then you can pick $A$ from the commutant. In many cases the irrep of ...

2

If an operator $A$ commutes with $X$ and $Y$ it already must be trivial ($A = c I, c\in \mathbb{C}$). One way to prove this is to note that $A$ also commutes with $Z$ since $Z = \frac{1}{2}i(YX - XY)$, and $A$ trivially commutes with $I$. Since $A$ commutes with $I, X, Y, Z$, which is Pauli basis of all operators, then $A$ commutes with any other operator, ...

1

Wikipedia entry has a nice description of the partial trace and how to compute it. In your case the partial trace of $M=|p\rangle\langle p|$ over $B$ can be computed as $$\text{Tr}_B(M) = \text{Tr}_B\bigg(\sum_{k,l} M_{k,l} \otimes |k\rangle\langle l| \bigg) = \sum_{k} M_{k,k}$$ where $k,l \in \{00,01,10,11\}$. Those $M_{k,l}$ are $4 \times 4$ ...

1

$$|p \rangle = ((aI + bZ + cX + dZX) \otimes 1) | \Phi^+ \rangle = a | \Phi^+ \rangle + b | \Phi^- \rangle + c | \Psi^+\rangle + d | \Psi^- \rangle\\ (aI+bZ+cX+dZX)(\bar{a}I+\bar{b}Z+\bar{c}X+\bar{d}XZ) = 1\\ a = \langle \Phi^+ | p \rangle\\ b = \langle \Phi^- | p \rangle\\ c = \langle \Psi^+ | p \rangle\\ d = \langle \Psi^- | p \rangle\\$$ I'll leave the ...

Top 50 recent answers are included