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.
LocalMeasurementBasis¶
- class LocalMeasurementBasis(name, instructions=None, default_povms=None, qubit_povms=None)[source]¶
Local tensor-product measurement basis.
This basis consists of a set of 1-qubit instructions which are used to define a tensor-product basis on N-qubits to rotate a desired multi-qubit measurement basis to the Z-basis measurement.
Initialize a fitter preparation basis.
- Parameters:
name (
str
) – a name to identity the basis.instructions (
Optional
[Sequence
[Instruction
]]) – list of instructions for rotating a desired measurement basis to the standard computational basis measurement.default_povms (
Optional
[Sequence
[Union
[List
[Statevector
],List
[DensityMatrix
],QuantumChannel
]]]) – Optional, list if positive operators valued measures (POVM) for of the measurement basis instructions. A POVM can be input as a list of effects (Statevector or DensityMatrix) for each possible measurement outcome of that basis, or as a single QuantumChannel. For the channel case the effects will be calculated by evolving the computation basis states by the adjoint of the channel. If None the input instructions will be used as the POVM channel.qubit_povms (
Optional
[Dict
[Tuple
[int
,...
],Sequence
[Union
[List
[Statevector
],List
[DensityMatrix
],QuantumChannel
]]]]) – Optional, a dict with physical qubit keys and a list of POVMs corresponding to each basis measurement instruction for the specific qubit. The default POVMs will be used for any qubits not specified in this dict.
- Raises:
QiskitError – If the input instructions or POVMs are not valid, or if no instructions or POVMs are provided.
Attributes
Return the basis name
Methods
LocalMeasurementBasis.circuit
(index[, qubits])Return the basis preparation circuit.
Return the shape for the specified number of indices.
LocalMeasurementBasis.matrix
(index, outcome)Return the POVM element for the basis index and outcome.
Return the shape of subsystem dimensions of a POVM attr:~matrix.
Return the shape of allowed measurement outcomes on specified qubits.