QPDBasis¶
- class QPDBasis(maps, coeffs)[source]¶
Bases:
object
Basis in which to decompose an operation.
This class defines a basis in which a quantum operation will be decomposed. The ideal (noise-free) quantum operation will be decomposed into a quasiprobabilistic mixture of noisy circuits.
Assign member variables.
- Parameters:
- Returns:
None
Attributes
- coeffs¶
Quasiprobability decomposition coefficients.
- kappa¶
Get the square root of the sampling overhead.
This quantity is the sum of the magnitude of the coefficients.
- maps¶
Get mappings for each qubit in the decomposition.
- num_qubits¶
Get number of qubits that this decomposition acts on.
- overhead¶
Get the sampling overhead.
The sampling overhead is the square of the sum of the magnitude of the coefficients.
- probabilities¶
Get the probabilities on which the maps will be sampled.
Methods
- static from_instruction(gate, /)[source]¶
Generate a
QPDBasis
object, given a supported operation.This static method is provided for convenience; it simply calls
qpdbasis_from_instruction()
under the hood.- Parameters:
gate (
Instruction
) – The instruction from which to instantiate a decomposition- Return type:
- Returns:
The newly-instantiated
QPDBasis
object