My question is in the context of both classical and quantum mechancis and field theory. Generally, how can one define/find the (canonically) conjugate of some variable/operator/field?
Examples include classical Ising spins $s_i=\pm1$, classical spin variables or quantum spin operators, fermion and boson creation and annihilation operators.
A follow up question would be: is it always possible to define Lagrangian if we are given the Hamiltonina, or vice versa?
Any reference would also be appreciated.