check_circuit
- qujax.check_circuit(gate_seq, qubit_inds_seq, param_inds_seq, n_qubits=None, check_unitaries=True)
Basic checks that circuit arguments conform.
- Parameters:
gate_seq (Sequence[str | Array | Callable[[Array], Array] | Callable[[], Array] | Iterable[str | Array | Callable[[Array], Array] | Callable[[], Array]]]) – Sequence of gates. Each element is either a string matching an array or function in qujax.gates, a unitary array (which will be reshaped into a tensor of shape (2,2,2,…) ) or a function taking parameters and returning gate unitary in tensor form. Or alternatively a sequence of the above representing Kraus operators.
qubit_inds_seq (Sequence[Sequence[int]]) – Sequences of qubits (ints) that gates are acting on.
param_inds_seq (Sequence[Sequence[int]]) – Sequence of parameter indices that gates are using, i.e. [[0], [], [5, 2]] tells qujax that the first gate uses the first parameter, the second gate is not parameterised and the third gates used the fifth and second parameters.
n_qubits (int | None) – Number of qubits, if fixed.
check_unitaries (bool) – boolean on whether to check if each gate represents a unitary matrix