Closed ChrisW918 closed 3 years ago
yup! that's the number of parameters for restricted UCCSD. The function definition is pretty clear (https://github.com/quantumlib/OpenFermion/blob/8ef0c8bcadf6c284e854449f30878d776d53e016/src/openfermion/circuits/unitary_cc.py#L106). You can see we are adding together the number of single UCC amplitudes and doubles UCC amplitudes. Since we are working with a restricted ansatz we consider spin-free excitation operators (thus the computations with spatial orbitals).
Hi,
I was testing the ansatz generated by unitary_cc, and want to know the parameter size for a built ccsd circuit.
I saw a function _uccsd_singlet_paramsize( n_qubits, ne), is this my expectated function, namely, return the size of a parameter vector which later is used in optimization?
Following is the code I used