pyquil.external.rpcq module

class pyquil.external.rpcq.CompilerISA(**extra_data: Any)[source]

Bases: pydantic.main.BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

edges: Dict[str, pyquil.external.rpcq.Edge]
qubits: Dict[str, pyquil.external.rpcq.Qubit]
class pyquil.external.rpcq.Edge(*, ids: List[int], dead: bool = False, gates: List[pyquil.external.rpcq.GateInfo] = None)[source]

Bases: pydantic.main.BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

dead: Optional[bool]
dict(**kwargs: Any) Dict[str, Any][source]

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

gates: List[pyquil.external.rpcq.GateInfo]
ids: List[int]
class pyquil.external.rpcq.GateInfo(*, operator: str = None, duration: float = None, fidelity: float = None, parameters: List[Union[float, str]] = None, arguments: List[Union[int, str]] = None, operator_type: typing_extensions.Literal[gate] = 'gate')[source]

Bases: pyquil.external.rpcq.Operator

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

arguments: List[Union[int, str]]
operator_type: typing_extensions.Literal[gate]
parameters: List[Union[float, str]]
class pyquil.external.rpcq.MeasureInfo(*, operator: str = None, duration: float = None, fidelity: float = None, qubit: Optional[Union[int, str]] = None, target: Optional[Union[int, str]] = None, operator_type: typing_extensions.Literal[measure] = 'measure')[source]

Bases: pyquil.external.rpcq.Operator

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

operator_type: typing_extensions.Literal[measure]
qubit: Optional[Union[int, str]]
target: Optional[Union[int, str]]
class pyquil.external.rpcq.Operator(*, operator: str = None, duration: float = None, fidelity: float = None)[source]

Bases: pydantic.main.BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

duration: Optional[float]
fidelity: Optional[float]
operator: Optional[str]
class pyquil.external.rpcq.Qubit(*, id: int, dead: bool = False, gates: List[Union[pyquil.external.rpcq.GateInfo, pyquil.external.rpcq.MeasureInfo]] = None)[source]

Bases: pydantic.main.BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

dead: Optional[bool]
dict(**kwargs: Any) Dict[str, Any][source]

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

gates: List[Union[pyquil.external.rpcq.GateInfo, pyquil.external.rpcq.MeasureInfo]]
id: int
class pyquil.external.rpcq.Supported1QGate[source]

Bases: object

I = 'I'
MEASURE = 'MEASURE'
RX = 'RX'
RZ = 'RZ'
WILDCARD = 'WILDCARD'
class pyquil.external.rpcq.Supported2QGate[source]

Bases: object

CPHASE = 'CPHASE'
CZ = 'CZ'
ISWAP = 'ISWAP'
WILDCARD = 'WILDCARD'
XY = 'XY'
pyquil.external.rpcq.add_edge(quantum_processor: pyquil.external.rpcq.CompilerISA, qubit1: int, qubit2: int) pyquil.external.rpcq.Edge[source]
pyquil.external.rpcq.add_qubit(quantum_processor: pyquil.external.rpcq.CompilerISA, node_id: int) pyquil.external.rpcq.Qubit[source]
pyquil.external.rpcq.compiler_isa_to_target_quantum_processor(compiler_isa: pyquil.external.rpcq.CompilerISA) rpcq.messages.TargetDevice[source]
pyquil.external.rpcq.get_edge(quantum_processor: pyquil.external.rpcq.CompilerISA, qubit1: int, qubit2: int) Optional[pyquil.external.rpcq.Edge][source]
pyquil.external.rpcq.get_qubit(quantum_processor: pyquil.external.rpcq.CompilerISA, node_id: int) Optional[pyquil.external.rpcq.Qubit][source]
pyquil.external.rpcq.make_edge_id(qubit1: int, qubit2: int) str[source]