peropq.unconstrained_variational_unitary ======================================== .. py:module:: peropq.unconstrained_variational_unitary Classes ------- .. autoapisummary:: peropq.unconstrained_variational_unitary.UnconstrainedVariationalUnitary Module Contents --------------- .. py:class:: UnconstrainedVariationalUnitary Bases: :py:obj:`peropq.variational_unitary.VariationalUnitary` class representing the variational unitary ansataz, with no prior constraint on the variational parameters. .. py:method:: update_theta(new_array) Update theta. :param new_array: the new array containing the variational parameters. It's shape must be (R, n_terms). .. py:method:: flatten_theta(theta) Returns an input theta as flatten depth*n_terms array. Useful to pass to a minimization function. .. py:method:: unflatten_theta(flat_theta) Returns the flattened variational parameters as an array with shape (depth,n_terms). .. py:method:: get_flattened_theta() Return the flatten current variational parameters. .. py:method:: get_initial_trotter_vector() Get the variational parameters corresponding to the Trotterization. Useful to initialize the optimization. .. py:method:: set_theta_to_trotter() Sets the variational parameters to the Trotter parameters.