print_circuit
- qujax.print_circuit(gate_seq, qubit_inds_seq, param_inds_seq, n_qubits=None, qubit_min=0, qubit_max=inf, gate_ind_min=0, gate_ind_max=inf, sep_length=1)
Returns and prints basic string representation of circuit.
- 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.
qubit_min (int | None) – Index of first qubit to display.
qubit_max (int | None) – Index of final qubit to display.
gate_ind_min (int | None) – Index of gate to start circuit printing.
gate_ind_max (int | None) – Index of gate to stop circuit printing.
sep_length (int | None) – Number of dashes to separate gates.
- Returns:
String representation of circuit
- Return type:
List[str]