Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

Reciprocal

class Reciprocal

GitHub

Base class for reciprocal calculation.

This method should initialize the module and use an exception if a component of the module is not available.


Methods

construct_circuit

abstract Reciprocal.construct_circuit(mode, register=None, circuit=None)

Construct the initial state circuit.

Parameters

  • mode (str) – ‘matrix’ or ‘circuit’
  • register (QuantumRegister) – register for circuit construction.
  • circuit (QuantumCircuit) – circuit for construction.

Returns

The reciprocal circuit.

sv_to_resvec

abstract Reciprocal.sv_to_resvec(statevector, num_q)

Convert statevector to result vector.

Parameters

  • statevector (list) – The statevector from simulation.
  • num_q (int) – Number of qubits of result register.

Returns

The result vector.

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