Pauli6PreparationBasis

class Pauli6PreparationBasis[source]

Over-complete 6-element Pauli preparation basis.

This is an over-complete size 6 preparation basis where each qubit index corresponds to the following initial state density matrices:

Table 3 Single-qubit preparation circuits and states

Index

State

Preparation Circuit

Density Matrix

0

Zp

-[I]-

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

1

Zm

-[X]-

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

2

Xp

-[H]-

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

3

Xm

-[H]-[Z]-

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

2

Yp

-[H]-[S]-

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

3

Ym

-[H]-[Sdg]-

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

Initialize a fitter preparation basis.

Parameters:
  • name – a name to identify the basis.

  • instructions – list of 1-qubit instructions for preparing states from the \(|0\rangle\) state.

  • default_states – Optional, default density matrices prepared by the input instructions. If None these will be determined by ideal simulation of the preparation instructions.

  • qubit_states – Optional, a dict with physical qubit keys and a list of density matrices prepared by the list of basis instructions for a specific qubit. The default states will be used for any qubits not specified in this dict.

Raises:

QiskitError – If input states or instructions are not valid, or no instructions or states are provided.

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.

Return type:

QuantumCircuit

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, qubits=None)

Return the density matrix data array for the index and qubits.

This state is used by tomography fitters for reconstruction and should correspond to the target state for the corresponding preparation circuit().

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

  • 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 density matrix prepared by the specified index and qubits.

matrix_shape(qubits)

Return the shape of subsystem dimensions of the state matrix.

Parameters:

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

Returns:

A tuple of subsystem dimensions for the specified qubits.

Return type:

Tuple[int, …]