supermarq.converters
Functions
|
Convert a circuit from cirq to qiskit. |
|
Compute the program communication of the given quantum circuit. |
|
Compute the critical depth of the given quantum circuit. |
|
Compute the entanglement-ratio of the given quantum circuit. |
|
Compute the liveness of the given quantum circuit. |
|
Compute the measurement feature of the given quantum circuit. |
|
Compute the parallelism of the given quantum circuit. |
Module Contents
- supermarq.converters.cirq_to_qiskit(circuit: cirq.Circuit) qiskit.QuantumCircuit
Convert a circuit from cirq to qiskit.
- Parameters:
circuit – A cirq.Circuit to be converted.
- Returns:
An equivalent qiskit.QuantumCircuit.
- supermarq.converters.compute_communication_with_qiskit(circuit: qiskit.QuantumCircuit) float
Compute the program communication of the given quantum circuit.
Program communication = circuit’s average qubit degree / degree of a complete graph.
- Parameters:
circuit – A quantum circuit.
- Returns:
The value of the communication feature for this circuit.
- supermarq.converters.compute_depth_with_qiskit(circuit: qiskit.QuantumCircuit) float
Compute the critical depth of the given quantum circuit.
Critical depth = # of 2-qubit gates along the critical path / total # of 2-qubit gates.
- Parameters:
circuit – A quantum circuit.
- Returns:
The value of the depth feature for this circuit.
- supermarq.converters.compute_entanglement_with_qiskit(circuit: qiskit.QuantumCircuit) float
Compute the entanglement-ratio of the given quantum circuit.
Entanglement-ratio = ratio between # of 2-qubit gates and total number of gates in the circuit.
- Parameters:
circuit – A quantum circuit.
- Returns:
The value of the entanglement feature for this circuit.
- supermarq.converters.compute_liveness_with_qiskit(circuit: qiskit.QuantumCircuit) float
Compute the liveness of the given quantum circuit.
Liveness feature = sum of all entries in the liveness matrix / (num_qubits * depth).
- Parameters:
circuit – A quantum circuit.
- Returns:
The value of the liveness feature for this circuit.
- supermarq.converters.compute_measurement_with_qiskit(circuit: qiskit.QuantumCircuit) float
Compute the measurement feature of the given quantum circuit.
Measurement feature = # of layers of mid-circuit measurement / circuit depth.
- Parameters:
circuit – A quantum circuit.
- Returns:
The value of the measurement feature for this circuit.
- supermarq.converters.compute_parallelism_with_qiskit(circuit: qiskit.QuantumCircuit) float
Compute the parallelism of the given quantum circuit.
Parallelism feature = max((((# of gates / depth) - 1) /(# of qubits - 1)), 0).
- Parameters:
circuit – A quantum circuit.
- Returns:
The value of the parallelism feature for this circuit.