zhao-andrew / symmetry-adjusted-classical-shadows

Classical shadows codes for quantum simulations of fermions and qubits, with error-mitigation routines for systems with symmetries
Apache License 2.0
17 stars 5 forks source link

Optimal givens decomposition not equal to optimal gaussian circuirts #1

Open franappi11 opened 2 weeks ago

franappi11 commented 2 weeks ago

According to documentation of the function "embed_unitary_into_orthogonal_matrix" the following should be true :optimal_givens_decomposition(qubits, unitary) = optimal_gaussian_circuit(qubits, orthogonal_matrix), but it seems to me that it isn't the case. I tried to compare both the circuits and their unitary representations. Am I missing something ? A separated question is: the spin adapted protocol, assumes a convention over the labelling of the qubits? Are the first n_up qubits representing the n_up modes and the rest of the qubits the n_down modes or even and odd qubits represents up and down qubits? Thank you!

franappi11 commented 2 weeks ago

Issue solved, I indeed found that : optimal_givens_decomposition(qubits, unitary) = optimal_gaussian_circuit(qubits, orthogonal_matrix). Sorry for the naive question. The second question remains.

zhao-andrew commented 2 weeks ago

Hi, glad you resolved the issue. As for the second question, yes the spin-adapted protocol assumes that qubits are labeled such that the first n/2 qubits represent the spin-up modes.