modules.applications.qml.qleet.interface.circuit

This module provides the interface to the circuits that the user specifies and library uses.

This makes the abstractions which ensures all operations in the library are backend agnostic, by allowing us to get the circuit back in the desired library's form, qiskit or pytket. It allows the user to specify the circuit in any form. It also takes the loss function specification as a Pauli String.

It also exposes functions that the user can use to convert their circuits to a qiskit backend. WARNING: the conversion is done through a OpenQASM intermediate, operations not supported on QASM cannot be converted directly, please provide your circuit in a Qiskit backend in that case.

Functions

convert_to_qiskit(circuit)

Converts any circuit to qiskit :type circuit: Circuit in any supported library :param circuit: input circuit in any framework :raises ValueError: if the circuit is not from one of the supported frameworks :return: circuit in qiskit :rtype: qiskit.QuantumCircuit

Classes

CircuitDescriptor(circuit, params[, ...])

The interface for users to provide a circuit in any framework and visualize it in qLEET.