Partial trace
I'm a total noob in Sage and I've never used Python before, so my question might be stupid. I'm working on a system of 2 qubits (in a generic state) interacting with the environment (in a state \ket(00)). I have an evolved state of the global system (the system of interest + ambient) and I need to trace out the ambient. I know how to do it analytically but I have no idea how to do it in Sage. I would appreciate any help.