Pauli.update_z

Pauli.update_z(z, indices=None)[source]

Update partial or entire z.

Parameters
  • z (numpy.ndarray or list) – to-be-updated z

  • indices (numpy.ndarray or list or optional) – to-be-updated qubit indices

Returns

self

Return type

Pauli

Raises

QiskitError – when updating whole z, the number of qubits must be the same.