cutqc2.library.Supremacy package¶
Submodules¶
cutqc2.library.Supremacy.ABCD_layer_generation module¶
- cutqc2.library.Supremacy.ABCD_layer_generation.get_layers(n, m)[source]¶
With the given n, m denoting a (n x m) matrix, return the corresponding A, B, C, and D layers of 2qb-gates that will enact a two qubit interaction between each pair of neighbors.
A, B, C, and D layers are defined in Google’s Supp. Info: (https://www.nature.com/articles/s41586-019-1666-5#Sec9)
cutqc2.library.Supremacy.Qbit_Sycamore module¶
cutqc2.library.Supremacy.Qbit_original module¶
cutqc2.library.Supremacy.Qgrid_Sycamore module¶
- class cutqc2.library.Supremacy.Qgrid_Sycamore.Qgrid(n, m, d, order=None, singlegates=True, barriers=True, measure=False, regname=None)[source]¶
Bases:
objectClass to implement the quantum supremacy circuits as found in Arute, F., Arya, K., Babbush, R. et al. ‘Quantum supremacy using a programmable superconducting processor’. Nature 574, 505–510 (2019) doi:10.1038/s41586-019-1666-5
(https://www.nature.com/articles/s41586-019-1666-5)
Each instance is a 2D array whose entries at Qbit objects. A supremacy circuit can be generated for a given instance by calling the gen_circuit() method.
- n¶
number of rows in the grid
- Type:
int
- m¶
number of columns in the grid
- Type:
int
- d¶
depth of the supremacy circuit (excludes measurement i.e. d+1)
- Type:
int
- regname¶
optional string to name the quantum and classical registers. This allows for the easy concatenation of multiple QuantumCircuits.
- Type:
str
- qreg¶
Qiskit QuantumRegister holding all of the qubits
- Type:
QuantumRegister
- creg¶
Qiskit ClassicalRegister holding all of the classical bits
- Type:
ClassicalRegister
- circ¶
Qiskit QuantumCircuit that represents the supremacy circuit
- Type:
QuantumCircuit
- grid¶
n x m array holding Qbit objects
- Type:
array
- ABCD_layers¶
List of qubit indices for 2-qubit gates for the A, B, C, and D layers of the supremacy circuit.
- Type:
list
- order¶
list of indices indicting the order the cz layers should be placed
- Type:
list
- singlegates¶
Boolean indicating whether to include single qubit gates in the circuit
- Type:
bool
cutqc2.library.Supremacy.Qgrid_original module¶
- class cutqc2.library.Supremacy.Qgrid_original.Qgrid(n, m, d, order=None, singlegates=True, mirror=True, barriers=True, measure=False, regname=None)[source]¶
Bases:
objectClass to implement the quantum supremacy circuits as found in https://www.nature.com/articles/s41567-018-0124-x and https://github.com/sboixo/GRCS. Each instance is a 2D array whose entries at Qbit objects. A supremacy circuit can be generated for a given instance by calling the gen_circuit() method.
- n¶
number of rows in the grid
- Type:
int
- m¶
number of columns in the grid
- Type:
int
- d¶
depth of the supremacy circuit (excludes H-layer and measurement i.e. 1+d+1)
- Type:
int
- regname¶
optional string to name the quantum and classical registers. This allows for the easy concatenation of multiple QuantumCircuits.
- Type:
str
- qreg¶
Qiskit QuantumRegister holding all of the qubits
- Type:
QuantumRegister
- creg¶
Qiskit ClassicalRegister holding all of the classical bits
- Type:
ClassicalRegister
- circ¶
Qiskit QuantumCircuit that represents the supremacy circuit
- Type:
QuantumCircuit
- grid¶
n x m array holding Qbit objects
- Type:
array
- cz_list¶
List of the CZ-gate indices for each layer of the supremacy circuit
- Type:
list
- mirror¶
Boolean indicating whether the cz layers should repeat exactly or in reverse order
- Type:
bool
- order¶
list of indices indicting the order the cz layers should be placed
- Type:
list
- singlegates¶
Boolean indicating whether to include single qubit gates in the circuit
- Type:
bool