quantumlib / Cirq

A python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.19k stars 995 forks source link

`NoiseModelFromGoogleNoiseProperties` should raise an error when simulations use qubits not on the device or an uncompiled circuit #6608

Open NoureldinYosri opened 1 month ago

NoureldinYosri commented 1 month ago

Description of the issue Noisy Simulation describes how to run simulations with realistic noise obtained from a real quantum device. however when using that noise model with a gate that is not native to the device the simulation, no noise gets added (e.g. https://github.com/quantumlib/Cirq/issues/6607#issuecomment-2118721221). another issue is that when the circtuit uses qubits not on the device a key error is raised with little information explaining why that is.

Proposed Solution Before (or while) running the simulation validate that the qubits and gets in the circuit uses supported qubits and gates.

How to reproduce the issue https://github.com/quantumlib/Cirq/issues/6607

Cirq version 1.4.0.dev20240419073809

shef4 commented 3 weeks ago

Hi, I'm interested in taking on this issue. Will look more into the current implementation.

NoureldinYosri commented 3 weeks ago

@shef4 thanks for offering to help