Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow tomography Rivet transpile error on IONQ sim #3

Open
RomanNoven opened this issue Oct 23, 2024 · 1 comment
Open

Shadow tomography Rivet transpile error on IONQ sim #3

RomanNoven opened this issue Oct 23, 2024 · 1 comment

Comments

@RomanNoven
Copy link


AttributeError Traceback (most recent call last)
Cell In[188], line 15
11 for rotation_circuit in rotation_tracker:
13 measurement_circuit = rotation_circuit.measure_all(inplace=False)
---> 15 shadow_circuit = transpile_right(
16 transpiled_central_circuit,
17 measurement_circuit,
18 backend=backend,
19 seed_transpiler=SEED,
20 optimization_level=OPTIMIZATION_LEVEL)
22 shadow_circuits.append(shadow_circuit)

File ~.ai-navigator\conda\envs\rivet\lib\site-packages\rivet_transpiler\transpiler.py:153, in transpile_right(central_circuit, right_circuit, backend, **key_arguments)
138 """
139 Transpile a right quantum circuit and combine it with already transpiled central circuit.
140
(...)
148 QuantumCircuit: The resulting quantum circuit.
149 """
151 # Transpile and Compose
--> 153 if backend is not None and backend.coupling_map is not None:
155 full_map = get_full_map(central_circuit)
157 key_arguments['initial_layout'] = full_map[:right_circuit.num_qubits]

AttributeError: 'IonQSimulatorBackend' object has no attribute 'coupling_map'

@ogorodnikov
Copy link
Collaborator

Hello @RomanNoven )

Thank you for the information!

Please note that according to the documentation - Qiskit backend should have a coupling_map attribute:

https://docs.quantum.ibm.com/api/qiskit/qiskit.providers.BackendV2#coupling_map

https://github.com/Qiskit/qiskit/blob/main/qiskit/providers/backend.py#L408

Perhaps you could set coupling_map to None?

backend.coupling_map = None

Best Regards,
Mykhailo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants