We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Data class is used to manage and process activation matrices for quantum circuits. It includes the following attributes and methods:
Data
qubits
The number of qubits, which corresponds to the number of rows in the activation matrices.
depth
The circuit depth, which corresponds to the number of columns in the matrices.
activation_matrices
A list of three-dimensional activation matrices that represent the circuits.
get_data
This method loads the values for qubits, depth, and activation_matrices from the file data.json.
data.json
var/data.json
var/train.json
return_matrices
Returns the stored activation matrices.
depth * 3
convert_matrices
This method converts the activation matrices as follows:
Each matrix consists of 3 pages.
They contain as many rows as the number of qubits and as many columns as the circuit depth (depth).
Intermediate check:
Before starting the conversion, verify the following properties in the matrices:
If any of these checks fail, return Error Code: 1031 - Activation matrix invalid before conversion.
Conversion Process:
check_final_matrix
Error Code: 1008 - Activation matrix does not meet required dimensions.
This method checks if a given matrix meets the following conditions:
This check is performed for each individual matrix to ensure the dimensions are correct.
create_training_matrix
This method creates a training matrix based on the existing values:
Error Code: 1007 - Training matrix does not meet required dimensions.
The matrix is then saved in train.json.
train.json
The text was updated successfully, but these errors were encountered:
clausia
Successfully merging a pull request may close this issue.
Class: Data
The
Data
class is used to manage and process activation matrices for quantum circuits. It includes the following attributes and methods:Attributes
qubits
The number of qubits, which corresponds to the number of rows in the activation matrices.
depth
The circuit depth, which corresponds to the number of columns in the matrices.
activation_matrices
A list of three-dimensional activation matrices that represent the circuits.
Methods
get_data
This method loads the values for
qubits
,depth
, andactivation_matrices
from the filedata.json
.var/data.json
cannot be found, it returns Error Code: 1028 - Data.json not found.var/train.json
can be found; if not, it returns Error Code: 1029 - train.json not found.return_matrices
Returns the stored activation matrices.
qubits
.depth * 3
.convert_matrices
This method converts the activation matrices as follows:
Each matrix consists of 3 pages.
They contain as many rows as the number of qubits and as many columns as the circuit depth (
depth
).Intermediate check:
Before starting the conversion, verify the following properties in the matrices:
If any of these checks fail, return Error Code: 1031 - Activation matrix invalid before conversion.
Conversion Process:
activation_matrices
.check_final_matrix
.check_final_matrix
This method checks if a given matrix meets the following conditions:
depth
value.This check is performed for each individual matrix to ensure the dimensions are correct.
create_training_matrix
This method creates a training matrix based on the existing values:
depth
value.check_final_matrix
to ensure the dimensions meet the requirements.The matrix is then saved in
train.json
.The text was updated successfully, but these errors were encountered: