1
$\begingroup$

Is it possible to implement a unitary operator scaled by a factor on a quantum computer?

Let's say the unitary operator is $U$:

$$U=\begin{bmatrix} u_0 & u_1 \\ u_2 & u_3 \end{bmatrix}\newcommand{\ket}[1]{|#1\rangle}$$

If I apply $fU$ with $f\in\mathbb{C}$ to a 1-qubit state $\ket{\psi}$

$$\ket{\psi} = \alpha \ket{0} + \beta\ket{1} = \begin{bmatrix}\alpha \\ \beta\end{bmatrix}$$

the result $\ket{\psi'}$ is just scaled by $f$

$$\ket{\psi'} = fU\ket{\psi} = f\begin{bmatrix}\alpha u_0 + \beta u_1 \\ \alpha u_2 + \beta u_3 \end{bmatrix}$$

Isn't $\ket{\psi'}$ equal to $U\ket{\psi}$ up to a global phase and $fU$ can, therefore, be implemented by $U$ without the factor $f$?

$\endgroup$
1
  • $\begingroup$ Yes, you are totally right! It only makes sense for $|f|=1$ though. $\endgroup$
    – Tristan Nemoz
    Commented Jun 2 at 15:48

1 Answer 1

2
$\begingroup$

That is true. However, if you want a controlled version of the unitary, then $CfU$ is not necessarily equivalent to $CU$.

Take for example 2 qubit system starting at the $|+0\rangle$ state. Applying $C_0U_1$ with $U=X$ will result with the state $\frac{1}{\sqrt2}(|00\rangle+|11\rangle) = |\Phi^+\rangle$ while applying $C_0(fU)_1$ with $f=-1$ will result with the state $\frac{1}{\sqrt2}(|00\rangle-|11\rangle) = |\Phi^-\rangle$, which are two orthogonal bell states.

This can be demonstrated using simulation. See the following code using the classiq platform:

from classiq import *

@qfunc
def main(x: Output[QBit], y: Output[QBit]):
    prepare_state([0.5, 0.5], 0, x)
    allocate(1, y)
    control(x, lambda: X(y))
    
qmod = create_model(main)
qprog = synthesize(qmod)
show(qprog)

which results after execution (using the Execute button in the IDE that pops up, and choosing state vector simulator) on a state vector simulator with the following state: enter image description here

while this code with $C_0(fU)_1$ will result with an orthogonal state:

@qfunc
def main(x: Output[QBit], y: Output[QBit]):
    prepare_state([0.5, 0.5], 0, x)
    allocate(1, y)
    control(x, lambda: (U(0, 0, 0, np.pi, y), X(y)))
    
qmod = create_model(main)
qprog = synthesize(qmod)
show(qprog)

enter image description here

(Disclaimer - I am a Classiq employee)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.