Skip to content

BAQIS-Quantum/Causal-Q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Causal-Q (self-contained)

All working copies of legacy scripts are under CausCal-Q/scripts/; original repo files stay untouched.

Dependencies

pip install numpy scipy torch matplotlib networkx npeet tqdm ipywidgets

Common commands (run from repo root)

# 1) Generate data
python CausCal-Q/cli.py gen-data --width 4 --length 4 --samples 40000 \
  --coupling dense --out CausCal-Q/fullinterac_dataset_gpu_4_4_dense_withoutF.npz --compute-F

# 2) Layer-1 PC
python CausCal-Q/cli.py pc --npz CausCal-Q/fullinterac_dataset_gpu_4_4_dense_withoutF.npz \
  --alpha1 0.0 --out CausCal-Q/P1_graph.json --fig CausCal-Q/layered_graph.pdf

# 3) MI on P1 edges
python CausCal-Q/cli.py mi --npz CausCal-Q/fullinterac_dataset_gpu_4_4_dense_withoutF.npz \
  --graph CausCal-Q/P1_graph.json --out CausCal-Q/mi_results.npz \
  --heatmap phi_to_omega_heatmap.pdf --scatter hij_vs_mi_scatter.pdf

# 4) Bipartite causal plot
python CausCal-Q/cli.py bipart --mi CausCal-Q/mi_results.npz --out CausCal-Q/bipartite_mi.pdf

# 5) Coupling heatmap
python CausCal-Q/cli.py hij --npz CausCal-Q/fullinterac_dataset_gpu_4_4_dense_withoutF.npz \
  --out CausCal-Q/hij_heatmap.pdf

Pipeline mapping

  1. gen-datascripts/unified_calibration_model_v4_GPU.py
  2. pcscripts/pc_analysis_with_unified_model-v5.py (defaults to P1 only)
  3. miscripts/load_directed_plot.py (MI on P1 edges)
  4. bipartscripts/plot_bipart_graph.py
  5. hij / scatter → data/MI visualizations

To add more PC layers or extra plots, extend CausCal-Q/causal_q/pipeline.py.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages