Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

PauliMeasurementBasis

class PauliMeasurementBasis(mitigator=None)[source]

Standard Pauli measurement basis.

This basis has 3 indices each with with 2 measurement outcomes. The corresponding single-qubit measurement circuits and outcome POVM matrices are:

Table 1 Single-qubit measurement circuits and POVM matrices

Index

Basis

Circuit

Outcome

POVM Matrix

0

Z

-[I]-

0

[[1, 0], [0, 0]]

1

[[0, 0], [0, 1]]

1

X

-[H]-

0

[[0.5, 0.5], [0.5, 0.5]]

1

[[0.5, -0.5], [-0.5, 0.5]]

2

Y

-[SDG]-[H]-

0

[[0.5, -0.5j], [0.5j, 0.5]]

1

[[0.5, 0.5j], [-0.5j, 0.5]]

Initialize Pauli measurement basis

Attributes

name

Return the basis name

Methods

circuit(index, qubits=None)

Return the basis preparation circuit.

Parameters:
  • index (Sequence[int]) – a list of basis elements to tensor together.

  • qubits (Sequence[int] | None) – Optional, the physical qubit subsystems for the index. If None this will be set to (0, ..., N-1) for a length N index.

Returns:

The logical basis circuit for the specified index and qubits.

Note

This returns a logical circuit on the specified number of qubits and should be remapped to the corresponding physical qubits during experiment transpilation.

index_shape(qubits)

Return the shape for the specified number of indices.

Parameters:

qubits (Sequence[int]) – the basis subsystems to return the index shape for.

Returns:

The shape of allowed values for the index on the specified qubits.

Return type:

Tuple[int, …]

matrix(index, outcome, qubits=None)

Return the POVM element for the basis index and outcome.

This POVM element is used by tomography fitters for reconstruction and should correspond to the target measurement effect for the corresponding measurement circuit() and outcome.

Parameters:
  • index (Sequence[int]) – a list of subsystem basis indices.

  • outcome (int) – the composite system measurement outcome.

  • qubits (Sequence[int] | None) – Optional, the physical qubit subsystems for the index. If None this will be set to (0, ..., N-1) for a length N index.

Returns:

The POVM matrix for the specified index and qubits.

matrix_shape(qubits)

Return the shape of subsystem dimensions of a POVM matrix.

Parameters:

qubits (Sequence[int]) – the physical qubit subsystems.

Returns:

A tuple of subsystem dimensions for the specified qubits.

Return type:

Tuple[int, …]

outcome_shape(qubits)

Return the shape of allowed measurement outcomes on specified qubits.

Parameters:

qubits (Sequence[int]) – the physical qubit subsystems.

Returns:

A tuple of the number of measurement outcomes for specified qubits.

Return type:

Tuple[int, …]