  We propose an algorithm to convert a projected entangled pair state (PEPS)
into a canonical form, analogous to the well-known canonical form of a matrix
product state. Our approach is based on a variational gauging ansatz for the QR
tensor decomposition of PEPS columns into a matrix product operator and a
finite depth circuit of unitaries and isometries. We describe a practical
initialization scheme that leads to rapid convergence in the QR optimization.
We explore the performance and stability of the variational gauging algorithm
in norm calculations for the transverse-field Ising and Heisenberg models on a
square lattice. We also demonstrate energy optimization within the PEPS
canonical form for the transverse-field Ising and Heisenberg models. We expect
this canonical form to open up improved analytical and numerical approaches for
PEPS.
