pdft.circuit.contract_circuit#
- pdft.circuit.contract_circuit(tensors, code, m, n, pic)[source]#
Run
codeonpiclaid out one axis per qubit, and give back a(2**m, 2**n)array.Nothing is cast and nothing is checked: the precision of the result is what the tensors and the image promote to, and any
picwith2**(m + n)elements is accepted.loss_functionand the Rich, RealRich and Blocked transforms have always applied a circuit this way, which is why single-precision tensors stay single precision through them.