State preparation ansatz



I am interested in extending the state preparation tutorial to bigger states.

I don’t understand where the circuit layer ansatz comes from, nor how to extend it for the preparation of product states, let alone entangled ones.

Can you provide any advice or resources?

Thanks, team Xanadu!


Hi there!

It would be great if you extended the tutorial to larger states.

I encourage you to experiment with different circuit ansatze, but I can explain the reasoning behind the one used in the tutorial:

  1. The CNOT gates are chosen to ensure that all qubits can in principle be entangled with each other. To extend this strategy to more qubits, you can use the same idea: add a CNOT between adjacent qubits --> (0,1), (1,2), (2,3),…, (n-1, n). That’s for example what is done in this paper except that they also connect (n, 0).

  2. The single-qubit rotations ensure that the most general local transformation can be applied, since rotating around X, Y, Z is enough to perform an arbitrary rotation on the Bloch sphere.

  3. With sufficiently many layers, that circuit ansatz should allow you to prepare both product states and maximally entangled states. For example, for a maximally entangled state, it is enough to perform a Hadamard gate on all qubits. For a product state, two layers are enough to do the trick: set the first rotations to prepare the desired product state by rotating each quubit. Then, in the second layer, all rotations should be set to zero, such that you apply the sequence of CNOTs twice in a row. A CNOT followed by another CNOT is the identity, so the end result are just the original rotations.

Hope that helps!