1

So I have a discreet functional $f(x_{1},x_{2},...,x_{k})$ that I want to encode in a variational state: $|\psi(\lambda)>$. The number of variables in my functional takes values $k=9,18,30$.

I want the parameters $x_{1},x_{2}...x_{k}$ to be the amplitudes of my state. I can encode $2^n$ parameters with $n$ qubits, however as for the number of variables given $k=9,18,30$, I can not write $k=2^{n}$, where $n$ is an integer for these values of $k$. I was wondering if there is any nice way around this. Thank you

glS
  • 24,708
  • 5
  • 34
  • 108
C W
  • 31
  • 1
  • Typically what is done is to set all the remaining basis states' amplitudes to zero. So for $k=9$ you can choose $n=4$ and have $x_1|0000\rangle + x_2|0001\rangle + ... + x_9|1000\rangle + 0|1001\rangle + ... + 0|1111\rangle$ which can simply be written as $x_1|0000\rangle + x_2|0001\rangle + ... + x_9|1000\rangle$ . – sheesymcdeezy Mar 03 '21 at 20:54

0 Answers0