MultiQubitFrame¶
- class MultiQubitFrame(list_operators, *, shape=None)¶
Bases:
BaseFrame
[LabelMultiQubitT
]Class that collects all information that any frame of multiple qubits should specify.
This is a representation of an operator-valued vector space frame. The effects are specified as a list of
Operator
.Note
This is a base class which collects functionality common to various subclasses. As an end-user you would not use this class directly. Check out
povm_toolbox.quantum_info
for more general information.Initialize from explicit operators.
- Parameters:
- Raises:
ValueError – if the length of
list_operators
is not compatible withshape
.ValueError – if the frame operators do not have a correct shape. They should all be hermitian and of the same dimension.
Attributes
- dimension¶
The dimension of the Hilbert space on which the effects act.
- informationally_complete¶
If the frame spans the entire Hilbert space.
- num_operators¶
The number of effects of the frame.
- operators¶
Return the list of frame operators.
- pauli_operators¶
Convert the internal frame operators to Pauli form.
Warning
The conversion to Pauli form can be computationally intensive.
- Returns:
The frame operators in Pauli form. Each frame operator is returned as a dictionary mapping Pauli labels to coefficients.
- Raises:
QiskitError – when the frame operators could not be converted to Pauli form (e.g. when they are not N-qubit operators).
- shape¶
Return the shape of the frame.
Inherited Attributes
- num_subsystems¶
The number of subsystems which the frame operators act on.
For qubits, this is always
dimension
.
Methods
- analysis(hermitian_op, frame_op_idx=None)¶
Return the frame coefficients of
hermitian_op
.This method implements the analysis operator
of the frame :where
are called the frame coefficients of the Hermitian operator .- Parameters:
hermitian_op (SparsePauliOp | Operator) – a hermitian operator whose frame coefficients to compute.
frame_op_idx (LabelMultiQubitT | set[LabelMultiQubitT] | None) – label or set of labels indicating which coefficients are queried. If
None
, all coefficients are queried.
- Returns:
Frame coefficients, specified by
frame_op_idx
, of the Hermitian operatorhermitian_op
. If a specific coefficient was queried, afloat
is returned. If a specific set of coefficients was queried, a dictionary mapping labels to coefficients is returned. If all coefficients were queried, an array with all coefficients is returned.- Raises:
TypeError – when the provided single or sequence of labels
frame_op_idx
does not have a valid type.ValueError – when the dimension of the provided
hermitian_op
does not match the dimension of the frame operators.
- Return type:
- classmethod from_vectors(frame_vectors)¶
Initialize a frame from non-normalized bloch vectors.
The non-normalized Bloch vectors are given by
. The resulting frame operators are where is the trace of the ’th frame operator.