braket.ir.jaqcd.instructions module¶
-
class
braket.ir.jaqcd.instructions.
H
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Hadamard gate.
-
type
¶ The instruction type. default = “h”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> H(target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
I
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Identity gate.
-
type
¶ The instruction type. default = “i”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> I(target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
X
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Pauli-X gate.
-
type
¶ The instruction type. default = “x”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> X(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Y
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Pauli-Y gate.
-
type
¶ The instruction type. default = “y”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> Y(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Z
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Pauli-Z gate.
-
type
¶ The instruction type. default = “z”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> Z(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Rx
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.Angle
X-axis rotation gate.
-
type
¶ The instruction type. default = “rx”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
Examples
>>> Rx(target=0, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
Ry
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.Angle
Y-axis rotation gate.
-
type
¶ The instruction type. default = “ry”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
Examples
>>> Ry(target=0, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
Rz
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.Angle
Z-axis rotation gate.
-
type
¶ The instruction type. default = “rz”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
Examples
>>> Rz(target=0, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
S
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
S gate. Applies a 90 degree rotation around the Z-axis.
-
type
¶ The instruction type. default = “s”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> S(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
T
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
T gate. Applies a 45 degree rotation around the Z-axis.
-
type
¶ The instruction type. default = “t”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> T(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Si
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Si gate. Conjugate transpose of S gate.
-
type
¶ The instruction type. default = “si”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> Si(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Ti
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Ti gate. Conjugate transpose of T gate.
-
type
¶ The instruction type. default = “ti”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> Ti(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Swap
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
Swap gate. Swaps the state of the two qubits.
-
type
¶ The instruction type. default = “swap”. (type) is optional. This should be unique among all instruction types.
Type: str
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> Swap(targets=[0, 1])
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.
-
-
class
braket.ir.jaqcd.instructions.
CSwap
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleControl
,braket.ir.jaqcd.shared_models.DoubleTarget
Controlled swap gate.
-
type
¶ The instruction type. default = “cswap”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> Swap(control=0, targets=[1, 2])
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.
-
-
class
braket.ir.jaqcd.instructions.
ISwap
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
- ISwap gate. Swaps the state of two qubits, applying a -i phase to q1 when it is in the 1 state
- and a -i phase to q2 when it is in the 0 state.
This is equivalent to XY(pi)
-
type
¶ The instruction type. default = “iswap”. (type) is optional. This should be unique among all instruction types.
Type: str
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> ISwap(targets=[0, 1])
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.
-
class
braket.ir.jaqcd.instructions.
PSwap
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.Angle
Parameterized swap gate that takes in the angle of the phase to apply to the swapped gates.
-
type
¶ The instruction type. default = “pswap”. (type) is optional. This should be unique among all instruction types.
Type: str
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> PSwap(targets=[0, 1], angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
XY
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.Angle
Rotates between |01> and |10> by the given angle.
-
type
¶ The instruction type. default = “xy”. (type) is optional. This should be unique among all instruction types.
Type: str
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> XY(targets=[0, 1], angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
PhaseShift
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.Angle
Phase shift gate. Shifts the phase between |0> and |1> by a given angle.
-
type
¶ The instruction type. default = “phaseshift”. (type) is optional. This should be unique among all instruction types.
Type: str
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> PhaseShift(target=1, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
CPhaseShift
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
,braket.ir.jaqcd.shared_models.Angle
Controlled phase shift gate.
-
type
¶ The instruction type. default = “cphaseshift”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CPhaseShift(control=0, target=1, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
CPhaseShift00
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
,braket.ir.jaqcd.shared_models.Angle
Controlled phase shift gate that phases the |00> state.
-
type
¶ The instruction type. default = “cphaseshift00”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CPhaseShift00(control=0, target=1, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
CPhaseShift01
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
,braket.ir.jaqcd.shared_models.Angle
Controlled phase shift gate that phases the |01> state.
-
type
¶ The instruction type. default = “cphaseshift01”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CPhaseShift01(control=0, target=1, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
CPhaseShift10
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
,braket.ir.jaqcd.shared_models.Angle
Controlled phase shift gate that phases the |10> state.
-
type
¶ The instruction type. default = “cphaseshift10”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CPhaseShift10(control=0, target=1, angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
CNot
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
Controlled not gate. Also known as the CX gate.
-
type
¶ The instruction type. default = “cnot”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CNot(control=0, target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
CCNot
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.DoubleControl
Doubly-controlled NOT gate. Also known as the Toffoli gate.
-
type
¶ The instruction type. default = “ccnot”. (type) is optional. This should be unique among all instruction types.
Type: str
-
controls
¶ The control qubits. This is a list with two items and all items are int >= 0.
Type: int
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CCNot(control=[0,1], target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
CV
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
Controlled sqrt(NOT) gate. Also known as the CV gate.
-
type
¶ The instruction type. default = “cv”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CV(control=0, target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
CY
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
Controlled Y-gate.
-
type
¶ The instruction type. default = “cy”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit
Type: int
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CY(control=0, target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
CZ
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleControl
Controlled Z-gate.
-
type
¶ The instruction type. default = “cz”. (type) is optional. This should be unique among all instruction types.
Type: str
-
control
¶ The control qubit. This is an int >= 0.
Type: int
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> CZ(control=0, target=1)
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.
-
-
class
braket.ir.jaqcd.instructions.
ECR
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
An echoed RZX(pi/2) gate.
-
type
¶ The instruction type. default = “ecr”. (type) is optional. This should be unique among all instruction types.
Type: str
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> ECR(targets=[0, 1])
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.
-
-
class
braket.ir.jaqcd.instructions.
XX
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.Angle
The Ising (XX) gate.
-
type
¶ The instruction type. default = “xx”. (type) is optional. This should be unique among all instruction types.
Type: str
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> XX(targets=[0, 1], angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
YY
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.Angle
The Ising (YY) gate.
-
type
¶ The instruction type. default = “yy”. (type) is optional. This should be unique among all instruction types.
Type: str
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> YY(targets=[0, 1], angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
ZZ
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.Angle
The Ising (ZZ) gate.
-
type
¶ The instruction type. default = “zz”. (type) is optional. This should be unique among all instruction types.
Type: str
-
angle
¶ The angle in radians. inf, -inf, and NaN are not allowable inputs.
Type: float
-
targets
¶ The target qubits. This is a list with two items and all items are int >= 0.
Type: List[int]
Examples
>>> ZZ(targets=[0, 1], angle=0.15)
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.
-
-
class
braket.ir.jaqcd.instructions.
V
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Square root of NOT gate.
-
type
¶ The instruction type. default = “v”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> V(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Vi
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
Conjugate transpose of square root of NOT gate.
-
type
¶ The instruction type. default = “vi”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> Vi(target=0)
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.
-
-
class
braket.ir.jaqcd.instructions.
Unitary
[source]¶ Bases:
braket.ir.jaqcd.shared_models.TwoDimensionalMatrix
,braket.ir.jaqcd.shared_models.MultiTarget
Arbitrary unitary matrix gate
-
type
¶ The instruction type. default = “unitary”. (type) is optional. This should be unique among all instruction types.
Type: str
-
targets
¶ The target qubits. This is a list with ints and all ints >= 0.
Type: List[int]
-
matrix
¶ The unitary matrix specifying the behavior of the gate.
Type: List[List[List[float]]]
Examples
>>> Unitary(targets=[0], matrix=[[[0, 0], [1, 0]],[[1, 0], [0, 1]]])
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.
-
-
class
braket.ir.jaqcd.instructions.
BitFlip
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleProbability
Bit Flip noise channel.
-
type
¶ The instruction type. default = “bit_flip”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> BitFlip(target=1, probability=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
PhaseFlip
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleProbability
Phase Flip noise channel.
-
type
¶ The instruction type. default = “phase_flip”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> PhaseFlip(target=1, probability=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
PauliChannel
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.TripleProbability
A single qubit Pauli noise channel.
-
type
¶ The instruction type. default = “pauli_channel”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> PauliChannel(target=1, probX=0.1, probY=0.2, probZ=0.3)
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.
-
-
class
braket.ir.jaqcd.instructions.
MultiQubitPauliChannel
[source]¶ Bases:
braket.ir.jaqcd.shared_models.MultiTarget
,braket.ir.jaqcd.shared_models.MultiProbability
Multi-qubit Pauli noise channel.
-
type
¶ The instruction type. default = “multi_qubit_pauli_channel”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit(s). This is list of intergers >= 0.
Type: int
-
The length of the list must match the length of the Pauli strings provided.
Examples
>>> MultiQubitPauliChannel(target=1, probabilities={"X": 0.1}) >>> MultiQubitPauliChannel(target=[0,1], probabilities={"XY": 0.1}) >>> MultiQubitPauliChannel(target=[0,1,2], probabilities={"XYZ": 0.1})
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.
-
-
class
braket.ir.jaqcd.instructions.
Depolarizing
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.SingleProbability_34
Depolarizing noise channel.
-
type
¶ The instruction type. default = “depolarizing”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> Depolarizing(target=1, probability=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
TwoQubitDepolarizing
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.SingleProbability_1516
Two-Qubit Depolarizing noise channel.
-
type
¶ The instruction type. default = “two_qubit_depolarizing”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubits. This is an int >= 0.
Type: int
Examples
>>> TwoQubitDepolarizing(target1=0, target2=1, probability=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
TwoQubitDephasing
[source]¶ Bases:
braket.ir.jaqcd.shared_models.DoubleTarget
,braket.ir.jaqcd.shared_models.SingleProbability_34
Two-Qubit Dephasing noise channel.
-
type
¶ The instruction type. default = “two_qubit_dephasing”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubits. This is an int >= 0.
Type: int
Examples
>>> TwoQubitDephasing(target1=0, target2=1, probability=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
AmplitudeDamping
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.DampingProbability
Amplitude Damping noise channel.
-
type
¶ The instruction type. default = “amplitude_damping”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> AmplitudeDamping(target=1, gamma=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
GeneralizedAmplitudeDamping
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.DampingProbability
,braket.ir.jaqcd.shared_models.DampingSingleProbability
Generalized Amplitude Damping noise channel.
-
type
¶ The instruction type. default = “generalized_amplitude_damping”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> GeneralizedAmplitudeDamping(target=1, gamma=0.1, probability=0.9)
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.
-
-
class
braket.ir.jaqcd.instructions.
PhaseDamping
[source]¶ Bases:
braket.ir.jaqcd.shared_models.SingleTarget
,braket.ir.jaqcd.shared_models.DampingProbability
Phase Damping noise channel.
-
type
¶ The instruction type. default = “phase_damping”. (type) is optional. This should be unique among all instruction types.
Type: str
-
target
¶ The target qubit. This is an int >= 0.
Type: int
Examples
>>> PhaseDamping(target=1, gamma=0.1)
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.
-
-
class
braket.ir.jaqcd.instructions.
Kraus
[source]¶ Bases:
braket.ir.jaqcd.shared_models.TwoDimensionalMatrixList
,braket.ir.jaqcd.shared_models.MultiTarget
Arbitrary quantum channel defined by the input matrices.
-
type
¶ The instruction type. default = “kraus”. (type) is optional. This should be unique among all instruction types.
Type: str
-
targets
¶ The target qubits. This is a list with ints and all ints >= 0.
Type: List[int]
-
matrices
¶ A list of matrices specifying the quantum channel. A complex number is represented as a list of 2 real numbers. So each matrix has type List[List[List[float]]].
Type: List[List[List[List[float]]]]
Examples
>>> matrix1 = [[[1/sqrt(2), 0],[0, 0]],[[0, 0],[1/sqrt(2), 0]]] >>> matrix2 = [[[0, 0],[1/sqrt(2), 0]],[[1/sqrt(2), 0],[0, 0]]] >>> matrices = [matrix1, matrix2] >>> Kraus(targets=[0], matrices=matrices)
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.
-
-
class
braket.ir.jaqcd.instructions.
StartVerbatimBox
[source]¶ Bases:
braket.ir.jaqcd.shared_models.CompilerDirective
StartVerbatimBox is a compiler instruction to start a portion of code that will preserve the instruction within StartVerbatimBox and EndVerbatimBox from being modified in any way by the compiler.
-
type
¶ The instruction type. default = “start_verbatim_box”. (type) is optional. This should be unique among all instruction types.
Type: str
Examples
>>> StartVerbatimBox()
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.
-
-
class
braket.ir.jaqcd.instructions.
EndVerbatimBox
[source]¶ Bases:
braket.ir.jaqcd.shared_models.CompilerDirective
EndVerbatimBox is a compiler instruction to mark the end of a portion of code that preserves the instruction within StartVerbatimBox and EndVerbatimBox from being modified in any way by the compiler.
-
type
¶ The instruction type. default = “end_verbatim_box”. (type) is optional. This should be unique among all instruction types.
Type: str
Examples
>>> EndVerbatimBox()
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.
-