germsel.find_germs()
does not support operations.ComposedOp()
and is limited in large models.
#481
Labels
enhancement
Request for a new feature or a change to an existing feature
Milestone
germsel.find_germs()
Fails with Composed Gates in Two-Qubit SystemsWhen performing GST on a two-qubit system , the function
germsel.find_germs()
fails to find germs if any of the gates in the model are defined usingoperations.ComposedOp()
. It is usually the case that some layers in two-qubit systems are built using the composition of one-qubit gates via tensor product. If one considers crosstalk, each of those layers should be regarded as an independent gate to characterise. However,germsel.find_germs()
currently only supports gates defined directly in the two-qubit Hilbert space and not those created usingoperations.ComposedOp()
. If that is the case, an error is encountered with the message: TypeError: unsupported operand type(s) for *: 'float' and 'ComposedOp'. This is because the functionrandomize_with_unitary()
contains the code line: mdl_randomized.operations[opLabel] = _op.FullArbitraryOp(_np.dot(randOp, gate)). To solve this issue, I think it would be necessary to substitutegate-> gate.to_dense() in the mentioned code line, so that the.dot()
product is compatible with the format of the matrix.Gate Label Limitation in
Circuit.to_pythonstr()
Additionally, I have observed that
germsel.find_germs()
utilises the functionCircuit.to_pythonstr()
. This encodes circuits as python strings, using a single letter for each gate in the model, and therefore imposes a limit of 26 distinct gates on it. While 26 gates might seem sufficient in most cases, the number of layers to characterise can scale rapidly beyond that limit when crosstalk is considered. I would suggest using a more flexible labelling system.The text was updated successfully, but these errors were encountered: