Open
Description
Currenlty, the wrapper takes a list of exactly 15 parameters, e.g.
@squin.kernel
def main():
q = squin.qubit.new(2)
two_qubit_noise = squin.noise.two_qubit_pauli_channel(
[
0.036,
0.007,
0.035,
0.022,
0.063,
0.024,
0.006,
0.033,
0.014,
0.019,
0.023,
0.058,
0.0,
0.0,
0.064,
]
)
squin.qubit.apply(two_qubit_noise, q)
This is not very user friendly, especially when you have a lot of 0
values in there. Also, it's easy to make mistakes.
I'd suggest we add syntax sugar that allows passing a dict
similar to cirq's error_probabilities
in the AsymmetricDepolarizingChannel
, so you could just write e.g.
@squin.kernel
def main():
q = squin.qubit.new(2)
two_qubit_noise = squin.noise.two_qubit_pauli_channel({'XX': 0.1, 'YY': 0.2, 'ZZ': 0.15})
squin.qubit.apply(two_qubit_noise, q)
Anything omitted here should default to 0.