ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
871 stars 270 forks source link

No mapper is present in the compiler engine list! #432

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello! I am trying to run the teleportation example in the link: https://dataespresso.com/en/2018/07/29/Tutorial-Getting-started-with-Quantum-Teleportation-Python/

I am able to run the script using the simulator, but I get the following error when trying a real quantum IBMBackend:

No mapper is present in the compiler engine list!

I have tried all 7 available (to me) quantum backends, but keep getting the same error. Here is how I'm calling the IBMBackend:

device = 'ibmq_lima'
token = open('/path/to/my/IBMqToken.txt').read()
quantum_engine = MainEngine(IBMBackend(use_hardware=True, num_runs=1024, verbose=True, device=device, token=token))

message = 'My quantum message!'
send_full_message(message)

Different variations of the above have been tried to no avail, and I couldn't tell from the help documentation what I needed to change to correct this error.

I am running:

I attached the script because trying to paste it below caused formatting oddities.

DataEspresso.txt

Thank you for your help in advance!

ghost commented 2 years ago

I was able to resolve this by using the backend code block specified in the Running a quantum program on IBM's QE chips section of https://github.com/ProjectQ-Framework/ProjectQ#readme