braket.default_simulator.gate_operations module¶

class
braket.default_simulator.gate_operations.
Identity
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Identity gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
Hadamard
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Hadamard gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
PauliX
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
PauliX gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
PauliY
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
PauliY gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
PauliZ
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
PauliZ gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CX
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled PauliX gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CY
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled PauliY gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CZ
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled PauliZ gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
S
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
S gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
Si
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
The adjoint \(S^{\dagger}\) of the S gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
T
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
T gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
Ti
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
The adjoint \(T^{\dagger}\) of the T gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
V
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Square root of the X (not) gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
Vi
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
The adjoint \(V^{\dagger}\) of the square root of the X (not) gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
PhaseShift
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Phase shift gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CPhaseShift
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled phase shift gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CPhaseShift00
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled phase shift gate phasing the \(\ket{00}\) state

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CPhaseShift01
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled phase shift gate phasing the \(\ket{01}\) state

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CPhaseShift10
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled phase shift gate phasing the \(\ket{10}\) state

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
RotX
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Xaxis rotation gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
RotY
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Yaxis rotation gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
RotZ
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Zaxis rotation gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
Swap
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Swap gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
ISwap
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
iSwap gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
PSwap
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Parametrized Swap gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
XY
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
XY gate
Reference: https://arxiv.org/abs/1912.04424v1

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
XX
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Ising XX gate
Reference: https://arxiv.org/abs/1707.06356

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
YY
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Ising YY gate
Reference: https://arxiv.org/abs/1707.06356

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
ZZ
(targets, angle)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Ising ZZ gate
Reference: https://arxiv.org/abs/1707.06356

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CCNot
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled CNot or Toffoli gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
CSwap
(targets)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Controlled Swap gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]


class
braket.default_simulator.gate_operations.
Unitary
(targets, matrix)[source]¶ Bases:
braket.default_simulator.operation.GateOperation
Arbitrary unitary gate

matrix
¶ The matrix representation of the operation.
Type: np.ndarray

targets
¶ The indices of the qubits the operation applies to.
Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. nonidentity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.
Type: Tuple[int, ..]
