Skip to main contentIBM Quantum Documentation

QPDBasis

class QPDBasis(maps, coeffs)

GitHub

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

  • maps (Sequence[tuple[Sequence[Instruction], ...]]) – A sequence of tuples describing the noisy operations probabilistically used to simulate an ideal quantum operation.
  • coeffs (Sequence[float]) – Coefficients for quasiprobability representation. Each coefficient can be any real number.

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

from_instruction

static from_instruction(gate, /)

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

QPDBasis

Returns

The newly-instantiated QPDBasis object

Was this page helpful?
Report a bug or request content on GitHub.