pygsti.extras.devices
Exteneral Device Specifications Sub-package
Submodules
pygsti.extras.devices.devcore
pygsti.extras.devices.experimentaldevice
pygsti.extras.devices.ibmq_algiers
pygsti.extras.devices.ibmq_athens
pygsti.extras.devices.ibmq_auckland
pygsti.extras.devices.ibmq_belem
pygsti.extras.devices.ibmq_bogota
pygsti.extras.devices.ibmq_brisbane
pygsti.extras.devices.ibmq_burlington
pygsti.extras.devices.ibmq_cairo
pygsti.extras.devices.ibmq_cambridge
pygsti.extras.devices.ibmq_casablanca
pygsti.extras.devices.ibmq_essex
pygsti.extras.devices.ibmq_guadalupe
pygsti.extras.devices.ibmq_hanoi
pygsti.extras.devices.ibmq_kolkata
pygsti.extras.devices.ibmq_lagos
pygsti.extras.devices.ibmq_lima
pygsti.extras.devices.ibmq_london
pygsti.extras.devices.ibmq_manhattan
pygsti.extras.devices.ibmq_manila
pygsti.extras.devices.ibmq_melbourne
pygsti.extras.devices.ibmq_montreal
pygsti.extras.devices.ibmq_mumbai
pygsti.extras.devices.ibmq_nairobi
pygsti.extras.devices.ibmq_nazca
pygsti.extras.devices.ibmq_ourense
pygsti.extras.devices.ibmq_perth
pygsti.extras.devices.ibmq_quito
pygsti.extras.devices.ibmq_rome
pygsti.extras.devices.ibmq_rueschlikon
pygsti.extras.devices.ibmq_santiago
pygsti.extras.devices.ibmq_sherbrooke
pygsti.extras.devices.ibmq_sydney
pygsti.extras.devices.ibmq_tenerife
pygsti.extras.devices.ibmq_toronto
pygsti.extras.devices.ibmq_vigo
pygsti.extras.devices.ibmq_yorktown
pygsti.extras.devices.rigetti_agave
pygsti.extras.devices.rigetti_aspen4
pygsti.extras.devices.rigetti_aspen6
pygsti.extras.devices.rigetti_aspen7
Package Contents
Classes
Specification of an experimental device. |
Functions
|
|
|
|
|
|
|
TODO: docstring |
|
todo |
|
calformat: 'ibmq-v2018', 'ibmq-v2019', 'rigetti', 'native'. |
|
todo |
- pygsti.extras.devices.get_device_specs(devname)
- pygsti.extras.devices.basic_device_information(devname)
- pygsti.extras.devices.edgelist(device)
- pygsti.extras.devices.create_clifford_processor_spec(device, one_qubit_gates, qubitsubset=None, removeedges=(), clifford_compilation_type='absolute', what_to_compile=('1Qcliffords',), verbosity=0)
TODO: docstring
Parameters
device one_qubit_gates qubitsubset removeedges clifford_compilation_type what_to_compile verbosity
Returns
QubitProcessorSpec
- pygsti.extras.devices.create_processor_spec(device, one_qubit_gates, qubitsubset=None, removeedges=())
todo
- clifford compilation type & what_to_compile = {‘paulieq’: (‘1Qcliffords’,),
‘absolute’: (‘paulis’, ‘1Qcliffords’)}
- pygsti.extras.devices.create_error_rates_model(caldata, device, one_qubit_gates, one_qubit_gates_to_native=None, calformat=None, model_type='TwirledLayers', idle_name=None)
calformat: ‘ibmq-v2018’, ‘ibmq-v2019’, ‘rigetti’, ‘native’.
- pygsti.extras.devices.create_local_depolarizing_model(caldata, device, one_qubit_gates, one_qubit_gates_to_native=None, calformat=None, qubits=None)
todo
Note: this model is * NOT * suitable for optimization: it is not aware that it is a local depolarization with non-independent error rates model.
- class pygsti.extras.devices.ExperimentalDevice(qubits, graph, gate_mapping=None)
Bases:
object
Specification of an experimental device.
Initialize an IBMQ device from qubits and connectivity info.
Parameters
- qubits: list
Qubit labels
- graph: QubitGraph
QubitGraph depicting device connectivity.
- gate_mapping: dict, optional
Mapping between pyGSTi gate names (keys) and IBM native gates (values). If None, simply use {‘Gcnot’: ‘cx’} to recover legacy behavior.
- qubits
- graph
- gate_mapping
- classmethod from_qiskit_backend(backend, gate_mapping=None)
Construct a ExperimentalDevice from Qiskit provider backend information.
- Provider backends can be obtained via:
IBMQ.load_account() provider = IBMQ.get_provider() # with potential optional kwargs backend = provider.get_backend(<device name>)
Parameters
- backend: IBMQBackend
Backend obtained from IBMQ
- gate_mapping: dict, optional
Mapping between pyGSTi gate names (keys) and IBM native gates (values). If None, simply use {‘Gcnot’: ‘cx’} to recover legacy behavior.
Returns
Initialized ExperimentalDevice
- classmethod from_legacy_device(devname)
Create a ExperimentalDevice from a legacy pyGSTi pygsti.extras.devices module.
Parameters
- devname: str
Name of the pygsti.extras.devices module to use
Returns
Initialized ExperimentalDevice
- create_processor_spec(gate_names=None, qubit_subset=None, subset_only=False, remove_edges=None)
Create a QubitProcessorSpec from user-specified gates and device connectivity.
Parameters
- gate_names: list of str
List of one-qubit and two-qubit gate names. If None, use the keys of self.gate_mapping.
- qubit_subset: list
A subset of qubits to include in the processor spec. If None, use self.qubits.
- subset_only: bool
Whether or not to include all the device qubits in the processor spec (False, default) or just qubit_subset (True).
- remove_edges: list
A list of edges to drop from the connectivity graph.
Returns
The created QubitProcessorSpec
- create_error_rates_model(caldata=None, calformat='ibmq-v2019', model_type='TwirledLayers', idle_name=None)
Create an error rates model (OplessModel) from calibration data.
Parameters
- caldata: dict
Calibration data. Currently, this can be retrieved via backend.properties().to_dict().
- calformat: One of [‘ibmq-v2018’, ‘ibmq-v2019’, ‘rigetti’, ‘native’]
Calibration data format, defaults to ibmq-v2019. TODO: It seems this has been changed, what version are we actually on?
- model_type: One of [‘TwirledLayers’, ‘TwirledGates’, ‘AnyErrorCausesFailure’, ‘AnyErrorCausesRandomOutput’]
Type of OplessModel to create
- idle_name: str
Name for the idle gate
Returns
OplessModel
- create_local_depolarizing_model(caldata=None, calformat='ibmq-v2019', qubits=None)
Create a LocalNoiseModel with depolarizing noise based on calibration data.
Note: this model is * NOT * suitable for optimization: it is not aware that it is a local depolarization with non-independent error rates model.
Parameters
- caldata: dict
Calibration data. Currently, this can be retrieved via backend.properties().to_dict().
- calformat: One of [‘ibmq-v2018’, ‘ibmq-v2019’, ‘rigetti’, ‘native’]
Calibration data format, defaults to ibmq-v2019. TODO: It seems this has been changed, what version are we actually on?
- qubits: list
Qubit labels to include in the model
Returns
OplessModel