GMS

class GMS(num_qubits, theta)[source]

Global Mølmer–Sørensen gate.

Circuit symbol:

     ┌───────────┐
q_0: ┤0          ├
     │           │
q_1: ┤1   GMS    ├
     │           │
q_2: ┤2          ├
     └───────────┘

Expanded Circuit:

The Mølmer–Sørensen gate is native to ion-trap systems. The global MS can be applied to multiple ions to entangle multiple qubits simultaneously [1].

In the two-qubit case, this is equivalent to an XX(theta) interaction, and is thus reduced to the RXXGate. The global MS gate is a sum of XX interactions on all pairs [2].

\[GMS(\chi_{12}, \chi_{13}, ..., \chi_{n-1 n}) = exp(-i \sum_{i=1}^{n} \sum_{j=i+1}^{n} X{\otimes}X \frac{\chi_{ij}}{2}) =\]

References:

[1] Sørensen, A. and Mølmer, K., Multi-particle entanglement of hot trapped ions. Physical Review Letters. 82 (9): 1835–1838. arXiv:9810040

[2] Maslov, D. and Nam, Y., Use of global interactions in efficient quantum circuit constructions. New Journal of Physics, 20(3), p.033018. arXiv:1707.06356

Create a new Global Mølmer–Sørensen (GMS) gate.

Parameters
  • num_qubits (int) – width of gate.

  • theta (Union[List[List[float]], ndarray]) – a num_qubits x num_qubits symmetric matrix of interaction angles for each qubit pair. The upper triangle is considered.

Attributes

GMS.clbits

Returns a list of classical bits in the order that the registers were added.

GMS.data

Return the circuit data (instructions and context).

GMS.extension_lib

GMS.header

GMS.instances

GMS.n_qubits

Deprecated, use num_qubits instead.

GMS.num_clbits

Return number of classical bits.

GMS.num_parameters

Convenience function to get the number of parameter objects in the circuit.

GMS.num_qubits

Return number of qubits.

GMS.parameters

Convenience function to get the parameters defined in the parameter table.

GMS.prefix

GMS.qubits

Returns a list of quantum bits in the order that the registers were added.

Methods

GMS.AND(qr_variables, qb_target, qr_ancillae)

Build a collective conjunction (AND) circuit in place using mct.

GMS.OR(qr_variables, qb_target, qr_ancillae)

Build a collective disjunction (OR) circuit in place using mct.

GMS.__getitem__(item)

Return indexed operation.

GMS.__len__()

Return number of operations in circuit.

GMS.add_register(*regs)

Add registers.

GMS.append(instruction[, qargs, cargs])

Append one or more instructions to the end of the circuit, modifying the circuit in place.

GMS.assign_parameters(param_dict[, inplace])

Assign parameters to new parameters or values.

GMS.barrier(*qargs)

Apply Barrier.

GMS.bind_parameters(value_dict)

Assign numeric parameters to values yielding a new circuit.

GMS.cast(value, _type)

Best effort to cast value to type.

GMS.cbit_argument_conversion(…)

Converts several classical bit representations (such as indexes, range, etc.) into a list of classical bits.

GMS.ccx(control_qubit1, control_qubit2, …)

Apply CCXGate.

GMS.ch(control_qubit, target_qubit, *[, …])

Apply CHGate.

GMS.cls_instances()

Return the current number of instances of this class, useful for auto naming.

GMS.cls_prefix()

Return the prefix to use for auto naming.

GMS.cnot(control_qubit, target_qubit, *[, …])

Apply CXGate.

GMS.combine(rhs)

Append rhs to self if self contains compatible registers.

GMS.compose(other[, qubits, clbits, front, …])

Compose circuit with other circuit or instruction, optionally permuting wires.

GMS.copy([name])

Copy the circuit.

GMS.count_ops()

Count each operation kind in the circuit.

GMS.crx(theta, control_qubit, target_qubit, *)

Apply CRXGate.

GMS.cry(theta, control_qubit, target_qubit, *)

Apply CRYGate.

GMS.crz(theta, control_qubit, target_qubit, *)

Apply CRZGate.

GMS.cswap(control_qubit, target_qubit1, …)

Apply CSwapGate.

GMS.cu1(theta, control_qubit, target_qubit, *)

Apply CU1Gate.

GMS.cu3(theta, phi, lam, control_qubit, …)

Apply CU3Gate.

GMS.cx(control_qubit, target_qubit, *[, …])

Apply CXGate.

GMS.cy(control_qubit, target_qubit, *[, …])

Apply CYGate.

GMS.cz(control_qubit, target_qubit, *[, …])

Apply CZGate.

GMS.dcx(qubit1, qubit2)

Apply DCXGate.

GMS.decompose()

Call a decomposition pass on this circuit, to decompose one level (shallow decompose).

GMS.depth()

Return circuit depth (i.e., length of critical path).

GMS.diag_gate(diag, qubit)

Deprecated version of QuantumCircuit.diagonal.

GMS.diagonal(diag, qubit)

Attach a diagonal gate to a circuit.

GMS.draw([output, scale, filename, style, …])

Draw the quantum circuit.

GMS.extend(rhs)

Append QuantumCircuit to the right hand side if it contains compatible registers.

GMS.fredkin(control_qubit, target_qubit1, …)

Apply CSwapGate.

GMS.from_qasm_file(path)

Take in a QASM file and generate a QuantumCircuit object.

GMS.from_qasm_str(qasm_str)

Take in a QASM string and generate a QuantumCircuit object.

GMS.h(qubit, *[, q])

Apply HGate.

GMS.hamiltonian(operator, time, qubits[, label])

Apply hamiltonian evolution to to qubits.

GMS.has_register(register)

Test if this circuit has the register r.

GMS.i(qubit, *[, q])

Apply IGate.

GMS.id(qubit, *[, q])

Apply IGate.

GMS.iden(qubit, *[, q])

Deprecated identity gate.

GMS.initialize(params, qubits)

Apply initialize to circuit.

GMS.inverse()

Invert this circuit.

GMS.iso(isometry, q_input, q_ancillas_for_output)

Attach an arbitrary isometry from m to n qubits to a circuit.

GMS.isometry(isometry, q_input, …[, …])

Attach an arbitrary isometry from m to n qubits to a circuit.

GMS.iswap(qubit1, qubit2)

Apply iSwapGate.

GMS.mcmt(gate, control_qubits, target_qubits)

Apply a multi-control, multi-target using a generic gate.

GMS.mcrx(theta, q_controls, q_target[, …])

Apply Multiple-Controlled X rotation gate

GMS.mcry(theta, q_controls, q_target, q_ancillae)

Apply Multiple-Controlled Y rotation gate

GMS.mcrz(lam, q_controls, q_target[, …])

Apply Multiple-Controlled Z rotation gate

GMS.mct(control_qubits, target_qubit[, …])

Apply MCXGate.

GMS.mcu1(lam, control_qubits, target_qubit)

Apply MCU1Gate.

GMS.mcx(control_qubits, target_qubit[, …])

Apply MCXGate.

GMS.measure(qubit, cbit)

Measure quantum bit into classical bit (tuples).

GMS.measure_active([inplace])

Adds measurement to all non-idle qubits.

GMS.measure_all([inplace])

Adds measurement to all qubits.

GMS.mirror()

Mirror the circuit by reversing the instructions.

GMS.ms(theta, qubits)

Apply MSGate.

GMS.num_connected_components([unitary_only])

How many non-entangled subcircuits can the circuit be factored to.

GMS.num_nonlocal_gates()

Return number of non-local gates (i.e.

GMS.num_tensor_factors()

Computes the number of tensor factors in the unitary (quantum) part of the circuit only.

GMS.num_unitary_factors()

Computes the number of tensor factors in the unitary (quantum) part of the circuit only.

GMS.qasm([formatted, filename])

Return OpenQASM string.

GMS.qbit_argument_conversion(…)

Converts several qubit representations (such as indexes, range, etc.) into a list of qubits.

GMS.r(theta, phi, qubit, *[, q])

Apply RGate.

GMS.rcccx(control_qubit1, control_qubit2, …)

Apply RC3XGate.

GMS.rccx(control_qubit1, control_qubit2, …)

Apply RCCXGate.

GMS.remove_final_measurements([inplace])

Removes final measurement on all qubits if they are present.

GMS.reset(qubit)

Reset q.

GMS.rx(theta, qubit, *[, label, q])

Apply RXGate.

GMS.rxx(theta, qubit1, qubit2)

Apply RXXGate.

GMS.ry(theta, qubit, *[, label, q])

Apply RYGate.

GMS.ryy(theta, qubit1, qubit2)

Apply RYYGate.

GMS.rz(phi, qubit, *[, q])

Apply RZGate.

GMS.rzx(theta, qubit1, qubit2)

Apply RZXGate.

GMS.rzz(theta, qubit1, qubit2)

Apply RZZGate.

GMS.s(qubit, *[, q])

Apply SGate.

GMS.sdg(qubit, *[, q])

Apply SdgGate.

GMS.size()

Returns total number of gate operations in circuit.

GMS.snapshot(label[, snapshot_type, qubits, …])

Take a statevector snapshot of the internal simulator representation.

GMS.snapshot_density_matrix(label[, qubits])

Take a density matrix snapshot of simulator state.

GMS.snapshot_expectation_value(label, op, qubits)

Take a snapshot of expectation value <O> of an Operator.

GMS.snapshot_probabilities(label, qubits[, …])

Take a probability snapshot of the simulator state.

GMS.snapshot_stabilizer(label)

Take a stabilizer snapshot of the simulator state.

GMS.snapshot_statevector(label)

Take a statevector snapshot of the simulator state.

GMS.squ(unitary_matrix, qubit[, mode, …])

Decompose an arbitrary 2*2 unitary into three rotation gates.

GMS.swap(qubit1, qubit2)

Apply SwapGate.

GMS.t(qubit, *[, q])

Apply TGate.

GMS.tdg(qubit, *[, q])

Apply TdgGate.

GMS.to_gate([parameter_map])

Create a Gate out of this circuit.

GMS.to_instruction([parameter_map])

Create an Instruction out of this circuit.

GMS.toffoli(control_qubit1, control_qubit2, …)

Apply CCXGate.

GMS.u1(theta, qubit, *[, q])

Apply U1Gate.

GMS.u2(phi, lam, qubit, *[, q])

Apply U2Gate.

GMS.u3(theta, phi, lam, qubit, *[, q])

Apply U3Gate.

GMS.uc(gate_list, q_controls, q_target[, …])

Attach a uniformly controlled gates (also called multiplexed gates) to a circuit.

GMS.ucg(angle_list, q_controls, q_target[, …])

Deprecated version of uc.

GMS.ucrx(angle_list, q_controls, q_target)

Attach a uniformly controlled (also called multiplexed) Rx rotation gate to a circuit.

GMS.ucry(angle_list, q_controls, q_target)

Attach a uniformly controlled (also called multiplexed) Ry rotation gate to a circuit.

GMS.ucrz(angle_list, q_controls, q_target)

Attach a uniformly controlled (also called multiplexed gates) Rz rotation gate to a circuit.

GMS.ucx(angle_list, q_controls, q_target)

Deprecated version of ucrx.

GMS.ucy(angle_list, q_controls, q_target)

Deprecated version of ucry.

GMS.ucz(angle_list, q_controls, q_target)

Deprecated version of ucrz.

GMS.unitary(obj, qubits[, label])

Apply unitary gate to q.

GMS.width()

Return number of qubits plus clbits in circuit.

GMS.x(qubit, *[, label, ctrl_state, q])

Apply XGate.

GMS.y(qubit, *[, q])

Apply YGate.

GMS.z(qubit, *[, q])

Apply ZGate.

GMS.__getitem__(item)

Return indexed operation.

GMS.__len__()

Return number of operations in circuit.