This function should only be called on density matrices that are known to
be separable, such as immediately after a measurement or reset operation.
It does not verify that the provided density matrix is indeed separable,
and will return nonsense results for matrices representing entangled
states.

Args

t

The density matrix to factor.

axes

The axes to factor out. Only the left axes should be provided.
For example, to extract [C,A] from density matrix of shape
[A,B,C,D,A,B,C,D], axes should be [2,0], and the return value
will be two density matrices ([C,A,C,A], [B,D,B,D]).

validate

Perform a validation that the density matrix factors cleanly.

atol

The absolute tolerance for the validation.

Returns

A tuple with the (extracted, remainder) density matrices, where
extracted means the sub-matrix which corresponds to the axes
requested, and with the axes in the requested order, and where
remainder means the sub-matrix on the remaining axes, in the same
order as the original density matrix.

[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]