pauli_measurement

pauli_measurement(circuit, pauli, qr, cr, barrier=False)[source]

Add the proper post-rotation gate on the circuit.

Parameters
  • circuit (QuantumCircuit) – the circuit to be modified.

  • pauli (Pauli) – the pauli will be added.

  • qr (QuantumRegister) – the quantum register associated with the circuit.

  • cr (ClassicalRegister) – the classical register associated with the circuit.

  • barrier (bool, optional) – whether or not add barrier before measurement.

Returns

the original circuit object with post-rotation gate

Return type

QuantumCircuit