QiskitBackend#
- class QiskitBackend(backend=None, port=None)[source]#
This class instantiates a VirtualBackend using a Qiskit backend. This allows easy access to Qiskit backends through the qrisp interface.
- Parameters:
- backendQiskit backend object, optional
A Qiskit backend object, which runs QuantumCircuits. The default is
AerSimulator()
.- portint, optional
The port to listen. The default is 8079.
Examples
We evaluate a QuantumFloat multiplication on the Aer simulator.
>>> from qrisp import QuantumFloat >>> from qrisp.interface import QiskitBackend >>> from qiskit_aer import AerSimulator >>> example_backend = QiskitBackend(backend = AerSimulator()) >>> qf = QuantumFloat(4) >>> qf[:] = 3 >>> res = qf*qf >>> res.get_measurement(backend = example_backend) {9: 1.0}